.hero-visual img,
.news-teaser__media img,
.service-card__media img,
.product-sector-card__media img {
  opacity: 0;
  transform: scale(1.03);
  filter: blur(6px);
  transition:
    opacity 0.45s ease,
    transform 0.55s ease,
    filter 0.55s ease;
}

.hero-visual img.is-ready,
.news-teaser__media img.is-ready,
.service-card__media img.is-ready,
.product-sector-card__media img.is-ready {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}


.topbar a {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: color .2s ease, opacity .2s ease;
}

.topbar a:hover {
  color: #fff;
}

/* =========================================================
   MENU BASE
   ========================================================= */

.primary-menu,
.menu-fallback,
.primary-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu,
.menu-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.primary-menu > li,
.menu-fallback > li {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 auto;
}

.primary-menu > li > a,
.menu-fallback > li > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: #11351a;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.primary-menu > li > a:hover,
.menu-fallback > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current_page_item > a,
.menu-fallback > li.current-menu-item > a,
.menu-fallback > li.current_page_item > a {
  color: #0b5f1f;
  background: rgba(15, 122, 40, 0.08);
}

/* =========================================================
   DROPDOWN DESKTOP
   ========================================================= */

.primary-menu .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 250px;
  display: none;
  z-index: 999;
  padding: 10px;
  border: 1px solid rgba(17, 53, 26, 0.08);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.12);
}

.primary-menu .sub-menu li + li {
  margin-top: 4px;
}

.primary-menu .sub-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
  text-decoration: none;
  white-space: normal;
  transition: background .2s ease, color .2s ease;
}

.primary-menu .sub-menu a:hover {
  background: #f6f6f1;
  color: var(--color-primary);
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  display: block;
}

.primary-menu > li > .sub-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

/* =========================================================
   BOTTONI
   ========================================================= */
.btn--header{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #102512;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease;
}

.btn--header:hover{
  transform: translateY(-2px);
  color: #102512;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.btn--header img{
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--color-accent);
  color: #102512;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  color: #102512;
  background: var(--color-accent-hover);
  box-shadow: 0 12px 24px rgba(243, 188, 0, 0.22);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid rgba(15, 122, 40, 0.28);
}

.btn--secondary:hover {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: none;
}



/* =========================================================
   CARD GENERICHE
   ========================================================= */

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

.service-card {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}

/* =========================================================
   HAMBURGER
   ========================================================= */

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(17, 53, 26, 0.12);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16, 37, 18, 0.06);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #0f5f23;
  border-radius: 999px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1360px) {
  .primary-menu,
  .menu-fallback {
    gap: 2px;
  }

  .primary-menu > li > a,
  .menu-fallback > li > a {
    padding: 8px 8px;
    font-size: 14px;
  }

  .btn--header {
    padding-inline: 18px;
    font-size: 14px;
  }
}

@media (max-width: 1180px) {
  .primary-menu,
  .menu-fallback {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .primary-menu > li,
  .menu-fallback > li {
    width: 100%;
    display: block;
  }

  .primary-menu > li > a,
  .menu-fallback > li > a {
    justify-content: flex-start;
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    white-space: normal;
    color: #11351a;
    background: rgba(15, 122, 40, 0.05);
  }

  .primary-menu > li > a:hover,
  .menu-fallback > li > a:hover {
    color: #0b5f1f;
    background: rgba(15, 122, 40, 0.10);
  }

  .primary-menu .sub-menu {
    position: static;
    min-width: 100%;
    display: block;
    margin-top: 4px;
    padding: 8px 0 0 14px;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .primary-menu > li > .sub-menu::before {
    display: none;
  }

  .primary-menu .sub-menu a {
    padding: 6px 0;
    border-radius: 0;
    color: rgba(17, 53, 26, 0.78);
    background: transparent;
  }

  .primary-menu .sub-menu a:hover {
    color: #0b5f1f;
    background: transparent;
  }

  .nav-toggle {
    display: inline-block;
  }

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





/* =========================
   REVEAL
   ========================= */

.home-intro__media,
.home-intro__content,
.chi-manifesto-item,
.product-sector-card,
.news-teaser,
.contact-panel {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

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


/* =========================
   HEADER SCROLL
   ========================= */

.site-header {
  transition:
    box-shadow 0.25s ease,
    backdrop-filter 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}


/* =========================
   ACCESSIBILITY
   ========================= */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    transform: none !important;
  }
}