/* ============================================
   GRAPPOLO VINI - Design System & Styles
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700&family=Lato:wght@300;400;500;700&display=swap');

/* CSS Variables - Color Palette */
:root {
  /* Colors */
  --color-bg: #FDFBF7;
  --color-primary: #5D3A9B;
  --color-accent: #E2725B;
  --color-text: #2D2D2D;
  --color-text-light: #5A5A5A;
  --color-white: #FFFFFF;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, rgba(93, 58, 155, 0.1) 0%, rgba(226, 114, 91, 0.08) 100%);
  --gradient-primary: linear-gradient(135deg, #5D3A9B 0%, #7B52C4 100%);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(93, 58, 155, 0.08);
  --shadow-md: 0 8px 30px rgba(93, 58, 155, 0.12);
  --shadow-lg: 0 20px 50px rgba(93, 58, 155, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Skip-to-content link per accessibilità tastiera */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  z-index: 9999;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse at center, #ffffff 0%, #fcf9f2 50%, #f5f0e6 100%);
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
}

h4 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 12px;
}

p {
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition-smooth);
}

.navbar .logo,
.navbar .nav-links a {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  transition: var(--transition-fast);
}

.navbar .nav-links a:hover {
  color: var(--color-accent);
}

.navbar.scrolled {
  background: rgba(195, 160, 120, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 15px 0;
}

.navbar.scrolled .logo,
.navbar.scrolled .nav-links a {
  color: #fff;
}

.navbar.scrolled .nav-links a:hover {
  color: var(--color-accent);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.logo:hover {
  color: var(--color-accent);
}

.logo-icon {
  width: auto;
  max-width: 150px;
  height: 40px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--color-primary);
}

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

.nav-links a.active-page {
  color: var(--color-primary);
  font-weight: 600;
}

.nav-links a.active-page::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition-fast);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(60, 40, 20, 0.55) 0%,
      rgba(60, 40, 20, 0.25) 12%,
      rgba(253, 251, 247, 0.4) 30%,
      rgba(253, 251, 247, 0.55) 55%,
      rgba(253, 251, 247, 0.7) 100%);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  width: 90%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Responsive hero content - scales with viewport */
@media (min-width: 1200px) {
  .hero-content {
    max-width: 950px;
  }

  .hero h1 {
    font-size: 4.2rem;
  }

  .hero p {
    font-size: 1.4rem;
    max-width: 680px;
    padding: 26px 40px;
  }
}

@media (min-width: 1600px) {
  .hero-content {
    max-width: 1100px;
  }

  .hero h1 {
    font-size: 5rem;
  }

  .hero p {
    font-size: 1.55rem;
    max-width: 780px;
    padding: 30px 48px;
  }

  .hero .btn-primary {
    padding: 20px 48px;
    font-size: 1.15rem;
  }
}

@media (min-width: 1920px) {
  .hero-content {
    max-width: 1250px;
  }

  .hero h1 {
    font-size: 5.5rem;
  }

  .hero p {
    font-size: 1.65rem;
    max-width: 850px;
    padding: 34px 54px;
  }
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(93, 58, 155, 0.15);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin-bottom: 24px;
  animation: fadeUp 1s ease;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.5);
  font-style: normal;
  text-align: center;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 40px;
  animation: fadeUp 1s ease 0.2s backwards;

  /* Contrast improvement */
  background: rgba(93, 58, 155, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px 30px;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: 0 8px 25px rgba(93, 58, 155, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(93, 58, 155, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 8px 25px rgba(226, 114, 91, 0.3);
}

.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(226, 114, 91, 0.4);
}

/* ============================================
   SECTIONS
   ============================================ */
section {
  padding: var(--section-padding);
  position: relative;
}

/* Vertical framing lines */
section>.container {
  position: relative;
}

section>.container::before,
section>.container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(93, 58, 155, 0.15) 20%,
      rgba(93, 58, 155, 0.15) 80%,
      transparent 100%);
  pointer-events: none;
}

section>.container::before {
  left: -40px;
}

section>.container::after {
  right: -40px;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.1rem;
}

/* ============================================
   CHI SIAMO / LA NOSTRA MISSIONE
   ============================================ */
.about {
  background: var(--color-white);
  position: relative;
  overflow: hidden;
}

/* Subtle decorative grape pattern */
.about::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(93, 58, 155, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.about::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(114, 47, 55, 0.03) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image-main {
  width: 100%;
  height: 500px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.about-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image-accent {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 200px;
  height: 200px;
  background: var(--color-accent);
  border-radius: 20px;
  opacity: 0.15;
  z-index: -1;
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.about-features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--color-bg);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
}

.about-feature svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}

/* ============================================
   SERVIZI
   ============================================ */
.services {
  background: var(--color-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--color-white);
  padding: 48px 36px;
  border-radius: 24px;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 24px;
  background: rgba(93, 58, 155, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  font-size: 3.5rem;
}

.service-icon img {
  width: 55px;
  height: 55px;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
  transform: translateY(-8px) scale(1.05);
}

.service-card:hover .service-icon img {
  filter: drop-shadow(0 8px 24px rgba(93, 58, 155, 0.3));
}

.service-card h3 {
  margin-bottom: 16px;
  color: var(--color-text);
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.service-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.service-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(139, 58, 36, 0.12);
  color: #8B3A24;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50px;
}

.service-cta {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.service-card:hover .service-cta {
  color: var(--color-accent);
}

/* ============================================
   CATALOGO - CENTERED VERSION
   ============================================ */
.catalog {
  background: var(--color-white);
  position: relative;
}

.catalog-centered {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 40px;
  background: var(--color-bg);
  border-radius: 30px;
  box-shadow: var(--shadow-md);
}

.catalog-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.catalog-centered h2 {
  margin-bottom: 20px;
}

.catalog-centered p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.catalog-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   CONTATTI & FOOTER
   ============================================ */
.contact {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
}

.contact h2 {
  color: var(--color-white);
  margin-bottom: 16px;
}

.contact p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 40px;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  background: var(--color-white);
  color: var(--color-primary);
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-contact:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-contact.whatsapp {
  background: #1A7A3E;
  color: var(--color-white);
}

.btn-contact.whatsapp:hover {
  background: #146330;
}

.btn-contact svg {
  width: 22px;
  height: 22px;
}

/* Footer */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Footer Top Row */
.footer-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-white);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.footer-logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  margin-right: 8px;
}

.footer-social {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--color-white);
  transition: var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-accent);
  transform: translateY(-3px);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

/* Footer Bottom Row */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
  font-size: 0.9rem;
  margin: 0;
}

/* Iubenda Legal Links */
.footer-legal {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-legal a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--color-white);
}

.footer-legal-separator {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--color-white);
  border-radius: 24px;
  padding: 48px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 2001;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  text-align: center;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-text-light);
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-accent);
}

.modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.modal h2 {
  margin-bottom: 12px;
}

.modal-intro {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.modal-content {
  text-align: left;
  margin-bottom: 32px;
}

.modal-content h4 {
  margin-top: 24px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(93, 58, 155, 0.1);
}

.modal-content h4:first-child {
  margin-top: 0;
}

.modal-content ul {
  list-style: none;
  padding: 0;
}

.modal-content li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.modal-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

/* ============================================
   GALLERY CAROUSEL
   ============================================ */
.gallery {
  background: var(--color-bg);
  overflow: hidden;
}

.carousel-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  position: relative;
  aspect-ratio: 4/3;
}

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

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 30px 30px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
}

.carousel-caption span {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Navigation Arrows */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--color-primary);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn:hover svg {
  stroke: var(--color-white);
}

.carousel-btn svg {
  stroke: var(--color-primary);
  transition: var(--transition-fast);
}

.carousel-btn-prev {
  left: -25px;
}

.carousel-btn-next {
  right: -25px;
}

/* Dots Navigation */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  background: rgba(93, 58, 155, 0.2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 0;
}

.carousel-dot:hover {
  background: rgba(93, 58, 155, 0.4);
}

.carousel-dot.active {
  background: var(--color-primary);
  transform: scale(1.2);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Animations (JS will add .visible class) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    order: -1;
  }

  .about-image-main {
    height: 350px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  /* Nasconde le decorazioni 'uva' su mobile: non si vedono e rompono il layout */
  .about::before,
  .about::after {
    display: none !important;
  }

  /* Fix di sicurezza nucleare per la barra bianca laterale */
  html,
  body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
  }

  h1 {
    font-size: 2rem;
  }

  /* Permetti al titolo hero di andare a capo su mobile */
  .hero h1 {
    white-space: normal;
  }

  .container {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    padding: 20px;
    gap: 20px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.active {
    display: flex;
  }

  /* Fix: mobile dropdown links must always be dark on light background */
  .nav-links a {
    color: var(--color-text) !important;
    text-shadow: none !important;
  }

  .nav-links a:hover {
    color: var(--color-primary) !important;
  }

  /* Fix: quando scrollato, i link del dropdown devono restare scuri sul fondo chiaro */
  .navbar.scrolled .nav-links a {
    color: var(--color-text);
  }

  .navbar.scrolled .nav-links a:hover {
    color: var(--color-primary);
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding-top: 100px;
  }

  .hero p {
    font-size: 1rem;
    padding: 15px;
  }

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

  .catalog-centered {
    padding: 40px 24px;
  }

  .catalog-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-buttons .btn {
    text-align: center;
    justify-content: center;
  }

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

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }

  .footer-social {
    position: static;
    transform: none;
    margin-top: 0;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
  }

  .footer-legal {
    justify-content: center;
  }

  .modal {
    padding: 32px 24px;
    max-height: 90vh;
  }

  .modal-icon {
    font-size: 3rem;
  }

  /* Carousel responsive */
  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .carousel-btn-prev {
    left: 10px;
  }

  .carousel-btn-next {
    right: 10px;
  }

  .carousel-caption span {
    font-size: 0.9rem;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 16px;
  }

  .btn {
    padding: 14px 28px;
    font-size: 0.95rem;
  }

  .service-card {
    padding: 36px 24px;
  }

  .about-image-main {
    height: 280px;
  }
}

/* Print styles */
@media print {

  .navbar,
  .modal,
  .modal-overlay {
    display: none;
  }
}

/* Iubenda banner styling */
#iubenda-cs-banner .iubenda-cs-container {
  border-radius: 20px !important;
}

#iubenda-cs-banner .iubenda-cs-content {
  border-radius: 20px !important;
}

/* Responsive zoom for large screens */
@media (min-width: 1600px) {
  html {
    zoom: 1.25;
  }
}
