
/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  font-family: 'Inter', sans-serif;
  color: #333;
  background-color: #fafafa;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }
  
  .navbar {
    background: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
  }
  
  .nav-link {
    color: #e0e0e0 !important;
  }
  
  .nav-link:hover {
    color: #C9A66B !important;
  }
  
  .logo-text {
    color: #C9A66B !important;
  }
  
  .logo-subtitle {
    color: #8B1538 !important;
  }
  
  .section-title {
    color: #C9A66B !important;
  }
  
  .section-subtitle {
    color: #b0b0b0 !important;
  }
  
  .about {
    background: #222 !important;
    color: #e0e0e0 !important;
  }
  
  .about-intro p, .about-details p {
    color: #c0c0c0 !important;
  }
  
  .qualifications-list li {
    color: #c0c0c0 !important;
  }
  
  .experience {
    background: #1f1f1f !important;
    color: #e0e0e0 !important;
  }
  
  .timeline-content {
    background: #2a2a2a !important;
    border: 1px solid #333;
  }
  
  .timeline-content p {
    color: #c0c0c0 !important;
  }
  
  .timeline-company {
    color: #b0b0b0 !important;
  }
  
  .skill-tag {
    background: #333 !important;
    color: #C9A66B !important;
  }
  
  .services {
    background: #222 !important;
    color: #e0e0e0 !important;
  }
  
  .service-card {
    background: #2a2a2a !important;
    border: 1px solid #333;
  }
  
  .service-card p {
    color: #c0c0c0 !important;
  }
  
  .service-features li {
    color: #c0c0c0 !important;
  }
  
  .skills {
    background: linear-gradient(135deg, #2a1a1a, #1a1a0a) !important;
    color: #e0e0e0 !important;
  }
  
  .skill-category {
    background: rgba(139, 21, 56, 0.2) !important;
    border: 1px solid rgba(201, 166, 107, 0.3);
  }
  
  .skill-bar {
    background: rgba(255, 255, 255, 0.1) !important;
  }
  
  .skill-progress {
    background: linear-gradient(90deg, #C9A66B, #8B1538) !important;
  }
  
  .cv-download {
    background: #222 !important;
    color: #e0e0e0 !important;
  }
  
  .cv-text p {
    color: #c0c0c0 !important;
  }
  
  .cv-feature {
    color: #c0c0c0 !important;
  }
  
  .contact {
    background: #1f1f1f !important;
    color: #e0e0e0 !important;
  }
  
  .contact-details p {
    color: #c0c0c0 !important;
  }
  
  .contact-details a {
    color: #C9A66B !important;
  }
  
  .footer {
    background: #111 !important;
    color: #e0e0e0 !important;
    border-top: 1px solid #333;
  }
  
  .footer-info p {
    color: #b0b0b0 !important;
  }
  
  .footer-links a {
    color: #b0b0b0 !important;
  }
  
  .footer-links a:hover {
    color: #C9A66B !important;
  }
  
  .footer-contact p {
    color: #b0b0b0 !important;
  }
  
  .footer-bottom {
    border-top: 1px solid #333 !important;
    color: #888 !important;
  }
  
  /* Button styles for dark mode */
  .btn-primary {
    background: linear-gradient(135deg, #C9A66B, #8B1538) !important;
    color: white !important;
  }
  
  .btn-primary:hover {
    background: linear-gradient(135deg, #8B1538, #C9A66B) !important;
  }
  
  .btn-secondary {
    background: transparent !important;
    color: #C9A66B !important;
    border: 2px solid #C9A66B !important;
  }
  
  .btn-secondary:hover {
    background: #C9A66B !important;
    color: #1a1a1a !important;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.2;
}

.section-title {
  font-size: 3rem;
  color: #8B1538;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #666;
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  margin-bottom: 4rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 24px;
  border: none;
  border-radius: 50px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #8B1538, #C9A66B);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6B0F2A, #A68B4F);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 21, 56, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #8B1538;
  border: 2px solid #8B1538;
}

.btn-secondary:hover {
  background: #8B1538;
  color: white;
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.nav-logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #8B1538;
}

.logo-subtitle {
  font-size: 0.8rem;
  color: #C9A66B;
  font-weight: 500;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #8B1538;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #8B1538;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: #8B1538;
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); /* oppure "none" se vuoi nessuna sovrapposizione */
  display: flex;
  align-items: center;
  justify-content: center;
}


.slide-content {
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Carousel Controls */
.carousel-controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 10;
}

.carousel-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: #C9A66B;
  transform: scale(1.2);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.scroll-arrow {
  color: white;
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* About Section */
.about {
  padding: 6rem 0;
  background: white;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text {
  padding-right: 2rem;
}

.about-intro {
  margin-bottom: 2rem;
}

.about-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
}

.about-details {
  margin-bottom: 2rem;
}

.about-details p {
  font-size: 1rem;
  line-height: 1.7;
  color: #666;
}

.qualifications {
  margin-top: 2rem;
}

.qualifications h3 {
  color: #8B1538;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.qualifications-list {
  list-style: none;
}

.qualifications-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #555;
}

.qualifications-list i {
  color: #C9A66B;
  width: 20px;
}

.about-image {
  position: relative;
}

.image-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.image-overlay {
  position: absolute;
  top: 2rem;
  right: 2rem;
}

.experience-badge {
  background: rgba(139, 21, 56, 0.9);
  color: white;
  padding: 1rem;
  border-radius: 15px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.badge-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

.badge-text {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Experience Section */
.experience {
  padding: 6rem 0;
  background: #f8f9fa;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #C9A66B;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: #8B1538;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(139, 21, 56, 0.3);
}

.timeline-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 45%;
  margin: 0 2.5%;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.timeline-header h3 {
  color: #8B1538;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.timeline-period {
  color: #C9A66B;
  font-weight: 600;
  font-size: 0.9rem;
}

.timeline-company {
  color: #666;
  font-weight: 500;
  margin-bottom: 1rem;
}

.timeline-content p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.timeline-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: #f0f0f0;
  color: #8B1538;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Services Section */
.services {
  padding: 6rem 0;
  background: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #8B1538, #C9A66B);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 2rem;
}

.service-card h3 {
  color: #8B1538;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.service-card p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.service-features {
  list-style: none;
  text-align: left;
}

.service-features li {
  color: #555;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #C9A66B;
  font-weight: bold;
}

/* Skills Section */
.skills {
  padding: 6rem 0;
  background: linear-gradient(135deg, #8B1538, #C9A66B);
  color: white;
}

.skills .section-title {
  color: white;
}

.skills .section-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.skill-header i {
  font-size: 2rem;
  color: #C9A66B;
}

.skill-header h3 {
  color: white;
  font-size: 1.2rem;
}

.skill-item {
  margin-bottom: 1rem;
}

.skill-name {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.skill-bar {
  background: rgba(255, 255, 255, 0.2);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, #C9A66B, #fff);
  border-radius: 4px;
  transition: width 1s ease-in-out;
  width: 0;
}

/* CV Download Section */
.cv-download {
  padding: 6rem 0;
  background: #f8f9fa;
}

.cv-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.cv-text h2 {
  color: #8B1538;
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.cv-text p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.cv-features {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.cv-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #555;
}

.cv-feature i {
  color: #C9A66B;
}

.cv-download-btn {
  text-align: center;
}

/* Contact Section */
.contact {
  padding: 6rem 0;
  background: white;
  display: none; /* Temporarily hidden until form is active */
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #8B1538, #C9A66B);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-details h3 {
  color: #8B1538;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-details p {
  color: #666;
  line-height: 1.5;
}

.contact-details a {
  color: #8B1538;
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-form {
  background: #f8f9fa;
  padding: 2.5rem;
  border-radius: 20px;
}

.contact-form h3 {
  color: #8B1538;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8B1538;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background: #8B1538;
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-info h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.footer-info p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.footer-links h4,
.footer-contact h4 {
  color: #C9A66B;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #C9A66B;
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-contact i {
  color: #C9A66B;
  width: 16px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
  margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-text {
    padding-right: 0;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 60px;
  }

  .timeline-item:nth-child(odd) {
    flex-direction: column;
  }

  .timeline-marker {
    left: 30px;
    transform: translateX(-50%);
  }

  .timeline-content {
    width: 100%;
    margin: 0;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cv-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .nav-container {
    padding: 1rem 15px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .service-card,
  .contact-form {
    padding: 1.5rem;
  }

  .timeline-content {
    padding: 1.5rem;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Disabilita dark mode automatica */
/* Disabilita dark mode automatica (forza sempre tema chiaro) */
:root {
  color-scheme: only light;
}

html, body {
  background-color: #fafafa !important;
  color: #333 !important;
  -webkit-text-size-adjust: 100%; /* migliora resa su iOS Safari */
  forced-color-adjust: none !important; /* blocca dark mode forzata su Android */
  color-scheme: light !important;
  supported-color-schemes: light !important;
}

@media (prefers-color-scheme: dark) {
  html, body {
    background-color: #fafafa !important;
    color: #333 !important;
  }
  img {
    filter: none !important;
  }
}

/* Migliora visualizzazione responsive del carosello */
.hero {
  min-height: 100vh;
  height: auto;
  margin-top: 70px; /* evita che la navbar copra la sezione */
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Ridimensiona testo hero su schermi piccoli */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
}
/* --- Fix menu mobile in dark mode --- */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
  /* Sfondo più scuro per il menu mobile */
  .nav-menu {
    background-color: #1a1a1a !important;
    border-top: 1px solid #333;
  }

  /* Colore testo chiaro per visibilità */
  .nav-link {
    color: #f5f5f5 !important;
  }

  /* Hover dorato */
  .nav-link:hover {
    color: #C9A66B !important;
  }

  /* Barre dell’hamburger in colore oro */
  .bar {
    background: #C9A66B !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
}

