/* ============================================================
   API Trentine — Components
   ============================================================ */

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--secondary);
  color: var(--white);
}
.btn-primary:hover { background: var(--secondary-dark); }
.btn-outline {
  border: 2px solid var(--secondary);
  color: var(--secondary);
  background: transparent;
}
.btn-outline:hover { background: var(--secondary); color: var(--white); }
.btn-white {
  background: var(--white);
  color: var(--secondary);
}
.btn-white:hover { background: var(--beige); }
.btn-outline-white {
  border: 2px solid rgba(255,255,255,.6);
  color: var(--white);
}
.btn-outline-white:hover { border-color: var(--white); background: rgba(255,255,255,.1); }
.btn-sm { padding: 8px 20px; font-size: .875rem; }
.btn-nav {
  background: var(--secondary);
  color: var(--white);
  padding: 8px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .9rem;
  transition: var(--transition);
}
.btn-nav:hover { background: var(--secondary-dark); }
.full-width { width: 100%; justify-content: center; }

/* ─── NAVBAR ─────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
}
.logo-img { height: 60px; width: auto; display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  transition: color var(--transition), text-decoration-color var(--transition);
  position: relative;
}
.nav-links a:not(.btn-nav) { color: var(--text); }
.nav-links a:not(.btn-nav)::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--honey);
  border-radius: 2px;
  transition: width var(--transition);
}
.nav-links a:not(.btn-nav):hover,
.nav-links a:not(.btn-nav).active { color: var(--text); }
.nav-links a:not(.btn-nav):hover::after,
.nav-links a:not(.btn-nav).active::after { width: 100%; }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  padding-top: 68px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: #fff;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 32px 80px;
}
.hero-media {
  width: min(54vw, 740px);
  z-index: 1;
  margin-top: 60px;
}
.hero-media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100svh - 150px);
  object-fit: contain;
}
/* Let the video grow on larger screens so the top (h1) and bottom (sub)
   text stay close to it instead of drifting far away. */
@media (min-width: 1200px) { .hero-media { width: min(54vw, 820px); } }
@media (min-width: 1500px) { .hero-media { width: min(55vw, 920px); } }
@media (min-width: 1800px) { .hero-media { width: min(56vw, 1000px); } }
.hero-tag {
  display: inline-block;
  background: var(--amber);
  color: var(--white);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.hero h1 {
  position: absolute;
  top: 40px;
  left: 24px;
  z-index: 3;
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 7.5vw, 6.8rem);
  font-weight: 400;
  line-height: 0.9;
  color: var(--secondary);
}
.hero h1 span { display: block; text-align: right; } /* "Trentini" right-aligned to the line above */
.hero-sub {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero .hero-sub {
  position: absolute;
  right: 24px;
  bottom: 120px; /* clear the 80px bottom wave so the last line isn't cut off */
  z-index: 3;
  max-width: 380px;
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.5;
}
.hero-wave {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
}
.hero-wave svg { display: block; width: 100%; height: 80px; }

/* Homepage hero: orchestrated entrance on load — title, then video, then text.
   Soft, overlapping timing for a smooth cascade. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1,
  .hero-media,
  .hero .hero-sub {
    opacity: 0;
    animation: hero-in 1s cubic-bezier(.22, .61, .36, 1) both;
    will-change: opacity, transform;
  }
  .hero h1        { animation-delay: .10s; }
  .hero-media     { animation-delay: .30s; }
  .hero .hero-sub { animation-delay: .50s; }
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ─── STATS ──────────────────────────────────────────── */
.stats {
  background: var(--white);
  padding-block: 48px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 28px 24px;
}
.stat-item + .stat-item { border-left: 1px solid var(--border); }
.stats-card {
  position: relative;
  isolation: isolate;
  background-color: #000; /* fallback so white stats stay readable if the image fails */
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 420px 24px 32px;
  overflow: hidden;
}
/* image layer — oversized so it can be shifted for parallax (js in index.html) */
.stats-card::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -30%;
  height: 160%;
  background: url('images/bees-bg.jpg') center / cover no-repeat;
  transform: translateY(var(--stats-py, 0px));
  will-change: transform;
  z-index: 0;
}
/* static dark filter on top of the image (does NOT move) */
.stats-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.35) 40%, rgba(0,0,0,0) 75%);
  z-index: 1;
}
.stats-card > * { position: relative; z-index: 2; }
.stats-card .stat-num { color: var(--white); }
.stats-card .stat-label { color: rgba(255,255,255,.85); }
.stats-card .stat-item + .stat-item { border-left-color: rgba(255,255,255,.3); }
.stat-num {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}
.stat-label {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* ─── SECTIONS ───────────────────────────────────────── */
.section { padding-block: 88px; }
.section-alt { background: #f6f6f5; }
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  color: var(--amber);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-tag.light { color: rgba(255,255,255,.75); }
.section-header h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 14px;
  line-height: 1.2;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin-inline: auto;
}

/* ─── CARDS (Servizi) ────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}
.card-icon { font-size: 2rem; margin-bottom: 16px; }
.card-icon svg { width: 30px; height: 30px; color: var(--secondary); display: block; }

/* Bento layout (homepage Servizi offerti) */
.cards-grid.bento { grid-template-columns: repeat(4, 1fr); }
.cards-grid.bento .card { transition: border-color var(--transition); }
.cards-grid.bento .card:hover { border-color: var(--text); }
.cards-grid.bento .card:nth-child(1) { grid-column: span 2; }
.cards-grid.bento .card:nth-child(4) { grid-column: span 2; }
.cards-grid.bento .card:nth-child(5) { grid-column: span 2; }
.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--secondary);
}
.card p { font-size: .92rem; color: var(--text-muted); line-height: 1.65; }

/* ─── NEWS / INIZIATIVE ──────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-card.featured {
  grid-column: span 2;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 40px;
  background: var(--white);
  transition: border-color var(--transition);
}
.news-card.featured:hover { transform: none; box-shadow: none; border-color: var(--text); }
.news-thumb {
  width: 260px;
  align-self: stretch;
  object-fit: cover;
  border-radius: 999px;
  flex-shrink: 0;
}
.news-card.featured h3 { font-size: 1.9rem; line-height: 1.25; }
.news-more { margin-top: 28px; text-align: center; }
.iniziative-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  text-align: left;
  margin-bottom: 48px;
}
.iniziative-intro h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.2;
}
.iniziative-intro .section-desc { margin-inline: 0; }
.iniziative-intro .news-more { text-align: left; margin-top: 0; }
.iniziative-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.bando-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  min-height: 420px;
  transition: border-color var(--transition);
}
.bando-card:hover { border-color: var(--text); }
.bando-cat {
  font-size: .95rem;
  color: var(--text);
  margin-bottom: 14px;
}
.bando-card h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--text);
}
.bando-desc {
  margin-top: auto;
  padding-top: 48px;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.45;
}
.news-more .news-link { font-size: 1rem; }
.news-badge {
  display: inline-block;
  background: var(--honey);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  white-space: nowrap;
  align-self: flex-start;
}
.news-category {
  font-size: .78rem;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.news-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; line-height: 1.35; }
.news-card p { font-size: .9rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; }
.news-link { font-size: .88rem; font-weight: 600; color: var(--amber); }
.news-link:hover { text-decoration: underline; }

/* ─── CORSI (carousel) ───────────────────────────────── */
.corsi-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* bleed out of the container to the right viewport edge */
  margin-right: calc(50% - 50vw);
  padding-right: calc(50vw - 50%);
}
.corsi-carousel::-webkit-scrollbar { display: none; }
.corsi-carousel { cursor: grab; }
.corsi-carousel.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}
.corsi-carousel .corso-card {
  /* exactly three cards fill the container width */
  flex: 0 0 calc((100% - 40px) / 3);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.corsi-carousel .corso-thumb-wrap {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.corsi-carousel .corso-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #f0efeb;
  transition: transform var(--transition);
}
.corsi-carousel .corso-card:hover .corso-thumb { transform: scale(1.05); }
.corsi-carousel .corso-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.corsi-carousel .corso-card p { font-size: .9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }
.corsi-carousel .corso-card .news-link { margin-top: auto; }
.carousel-nav { display: flex; gap: 10px; }
.corsi-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
}
.corsi-header .section-desc { margin-inline: 0; }
.carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  transition: border-color var(--transition), background var(--transition);
}
.carousel-btn svg { width: 18px; height: 18px; }
.carousel-btn:hover { border-color: var(--secondary); }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.carousel-btn:disabled:hover { border-color: var(--border); }

/* ─── CORSI (split image/text) ───────────────────────── */
.corsi-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}
.corsi-split-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg) 120px 120px var(--radius-lg);
}
.corsi-split-text h2 {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 14px;
}
.corsi-split-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 28px;
}

/* ─── CTA SECTION ────────────────────────────────────── */
.cta-box {
  background:
    linear-gradient(rgba(65,84,44,.7), rgba(65,84,44,.7)),
    url('images/cta-bg.jpg') center / cover no-repeat;
  background-color: #000; /* fallback so white text stays readable if the image fails */
  color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* full viewport width minus 24px side margins */
  margin-inline: calc(50% - 50vw + 24px);
}
.cta-inner {
  padding: 200px 64px;
  text-align: center;
}
.cta-text p { margin-inline: auto; }
.cta-actions { justify-content: center; }
.cta-text .section-tag { color: rgba(255,255,255,.7); }
.cta-text h2 {
  font-family: var(--font-head);
  font-size: clamp(4.2rem, 9.5vw, 6.8rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--white);
}
.cta-text p { font-size: 1.15rem; color: var(--white); line-height: 1.7; margin-bottom: 32px; max-width: 560px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── CONTATTI ───────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-icon { font-size: 1.4rem; flex-shrink: 0; }
.contact-item strong { display: block; font-weight: 700; margin-bottom: 2px; font-size: .9rem; }
.contact-item p { font-size: .9rem; color: var(--text-muted); }
.contact-item a { color: var(--amber); }
.contact-item a:hover { text-decoration: underline; }

/* ─── FORM ───────────────────────────────────────────── */
.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-form h3 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--honey);
}
.form-group textarea { resize: vertical; }

/* ─── FOOTER ─────────────────────────────────────────── */
.footer {
  background: var(--white);
  color: var(--text-muted);
  padding-block: 72px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr repeat(3, auto);
  gap: 40px 112px;
  padding-bottom: 88px;
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand .logo-img { height: 72px; }
.footer-tagline { font-size: .95rem; line-height: 1.6; margin-bottom: 18px; }
.footer-social { display: flex; gap: 14px; }
.footer-social a { color: var(--secondary); transition: color var(--transition), text-decoration-color var(--transition); }
.footer-social a:hover { color: var(--primary-dark); }
.footer-social svg { width: 22px; height: 22px; }
.footer-links { display: contents; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-col h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 6px;
}
.footer-col a { font-size: 1rem; line-height: 1.4; transition: color var(--transition), text-decoration-color var(--transition); }
.footer-col a:hover { color: var(--secondary); }
.footer-bottom {
  padding-block: 22px;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: .8rem; color: var(--text-muted); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a {
  font-size: .8rem;
  color: var(--text-muted);
  transition: color var(--transition), text-decoration-color var(--transition);
}
.footer-legal a:hover { color: var(--secondary); }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { flex-direction: column; justify-content: center; align-items: stretch; }
  .hero-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding-block: 32px 100px;
  }
  .hero h1 { position: static; }
  .hero-media { width: 100%; margin-top: 0; }
  .hero .hero-sub { position: static; max-width: 540px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(odd) { border-left: none; }
  .corsi-carousel .corso-card { flex-basis: min(320px, 80%); }
  .corsi-split { grid-template-columns: 1fr; gap: 32px; }
  .iniziative-cards { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 720px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; }
  /* dropdown: inline, always-expanded submenu inside the mobile panel */
  .nav-dropdown { width: 100%; }
  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    margin-top: 10px;
    padding: 0 0 0 14px;
    background: transparent;
    border: none;
    box-shadow: none;
    gap: 8px;
  }
  .nav-dropdown-menu::before { display: none; }
  .nav-dropdown-menu a { padding: 0; font-size: .95rem; color: var(--text-muted); }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.featured { grid-column: 1; flex-direction: column; }
  .news-thumb { width: 100%; height: 180px; align-self: auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .cards-grid.bento .card { grid-column: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-inner { padding: 32px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: 1; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item + .stat-item { border-left: none; border-top: 1px solid var(--border); }
  .stats-card .stat-item + .stat-item { border-top-color: rgba(255,255,255,.3); }
  .hero-content { padding-block: 32px 100px; }
}

/* ─── HERO BANNER (inner pages: image bg + in-hero nav) ── */
.hero-banner {
  position: relative;
  min-height: 56svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-bottom-left-radius: 64px;
  border-bottom-right-radius: 64px;
}
.hero-banner-bg {
  position: absolute;
  inset: 0;
  /* black fallback so overlaid text stays readable if the image fails to load */
  background-color: #000;
  background-image:
    linear-gradient(to bottom, rgba(65,84,44,0.98), rgba(65,84,44,0.79)),
    url('images/bandi-hero.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  /* parallax (js/hero-parallax.js): scaled from the bottom so the
     drift never reveals a gap at the top */
  transform-origin: bottom;
  will-change: transform;
}
/* Navbar lives inside the hero: sticky, transparent over the image,
   turns solid white (.scrolled) once it leaves the hero */
.hero-banner .navbar {
  position: fixed;
  background: transparent;
  border-bottom: none;
  transition: background var(--transition), box-shadow var(--transition);
}
.hero-banner .navbar.scrolled {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
}
.hero-banner .navbar:not(.scrolled) .hamburger span { background: var(--white); }
/* swap to the white logo while the navbar is transparent over a dark hero */
.logo-img--light { display: none; }
.hero-banner .navbar:not(.scrolled) .logo-img--dark { display: none; }
.hero-banner .navbar:not(.scrolled) .logo-img--light { display: block; }
@media (min-width: 961px) {
  .hero-banner .navbar:not(.scrolled) .nav-links a:not(.btn-nav) { color: var(--white); }
  .hero-banner .navbar:not(.scrolled) .btn-nav { background: var(--white); color: var(--secondary); }
  .hero-banner .navbar:not(.scrolled) .btn-nav:hover { background: var(--cream); }
}

/* ─── NAV DROPDOWN (menu Servizi) ────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; }
.nav-chevron { width: 13px; height: 13px; flex-shrink: 0; transition: transform var(--transition); }
.nav-dropdown:hover .nav-chevron,
.nav-dropdown:focus-within .nav-chevron { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 210px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}
/* transparent bridge so the menu doesn't close in the toggle→menu gap */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px; left: 0; right: 0;
  height: 12px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(6px);
}
.nav-dropdown-menu a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  padding: 9px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.nav-dropdown-menu a::after { display: none; } /* no sliding underline on submenu items */
.nav-dropdown-menu a:hover { background: var(--cream); color: var(--secondary); }
/* keep submenu text dark even when the navbar is transparent over a hero image
   (specificity must beat .nav-links a:not(.btn-nav) which turns nav text white) */
.hero-banner .navbar:not(.scrolled) .nav-links .nav-dropdown-menu a:not(.btn-nav) { color: var(--text); }
.hero-banner .navbar:not(.scrolled) .nav-links .nav-dropdown-menu a:not(.btn-nav):hover { color: var(--secondary); }

.hero-banner-content {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-block: auto; /* vertical centering; keeps .container's horizontal centering */
  padding-top: 132px;
  padding-bottom: 120px;
  will-change: transform, opacity; /* parallax (js/hero-parallax.js) */
}
/* Inner-page hero entrance — CSS-only so it's hidden from the first paint
   (no flash-then-animate glitch), title then subtitle. */
@media (prefers-reduced-motion: no-preference) {
  .hero-banner-content h1,
  .hero-banner-content .hero-sub {
    opacity: 0;
    animation: reveal-in .8s cubic-bezier(.22, .61, .36, 1) both;
  }
  .hero-banner-content h1 { animation-delay: .12s; }
  .hero-banner-content .hero-sub { animation-delay: .30s; }
}
.hero-banner-content h1 {
  font-family: var(--font-head);
  font-size: clamp(2.7rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 16px;
}
.hero-banner-content .hero-sub {
  color: rgba(255,255,255,.9);
  max-width: 560px;
  margin-bottom: 0;
}
.hero-banner-content .hero-tag { margin-bottom: 16px; }
.hero-banner-content .ini-tabs { margin-top: 28px; }

