/*Card Flip PRODOTTI*/
.products-cards-section {
  margin-top: 16px;
  text-align: center;
}

.products-cards-title {
  font-family: 'Krona One', serif;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--color-text);
  margin-bottom: 20px;
  line-height: 1;
  text-align: center;
}

#prodotti .split {
  justify-content: center;
}

#prodotti .split-content {
  max-width: 960px;
  margin: 0 auto;
  align-items: center;
  text-align: center;
}

#prodotti .split-content .subtitle,
#prodotti .split-content p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.products-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

.product-flip-card {
  background: transparent;
  min-height: 387px;
  perspective: 1400px;
}

.product-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 387px;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-flip-card:hover .product-flip-inner,
.product-flip-card:focus-within .product-flip-inner {
  transform: rotateY(180deg);
}

.product-face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  backface-visibility: hidden;
  border: 1px solid color-mix(in srgb, var(--color-border) 78%, rgba(255, 255, 255, 0.22) 22%);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.14);
  background: var(--color-bg);
}

.product-face-front {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}

.product-face-front img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.product-face-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 24%, rgba(0, 0, 0, 0.78) 100%);
}

.product-face-front figcaption {
  position: relative;
  z-index: 1;
  padding: 20px 20px 22px;
  font-size: clamp(0.92rem, 0.9vw + 0.74rem, 1.08rem);
  font-weight: 700;
  line-height: 1.2;
}

.product-face-back {
  transform: rotateY(180deg);
  padding: clamp(14px, 1.8vw, 23px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  background:
  radial-gradient(circle at top right, color-mix(in srgb, var(--color-brown) 22%, transparent) 0%, transparent 45%),
  linear-gradient(155deg, color-mix(in srgb, var(--color-bg) 92%, #fff 8%) 0%, var(--color-bg) 100%);
}

.product-face-back h3 {
  font-size: 1.08rem;
  color: var(--color-text);
  line-height: 1.2;
  margin: 0;
}

.product-face-back p {
  font-size: clamp(0.84rem, 0.55vw + 0.75rem, 0.92rem);
  line-height: 1.55;
  color: var(--color-text-light);
  margin: 0;
  word-break: break-word;
}

@media (max-width: 1200px) {
  .products-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .products-card-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  
  .gallery-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  
  .gallery-copy {
    padding: 0;
  }
}

@media (max-width: 760px) {
  .gallery-slider {
    padding-inline: 0;
  }
  
  .gallery-item-alberi img {
    height: clamp(210px, 58vw, 280px);
  }
  
  .product-flip-card,
  .product-flip-inner {
    min-height: 306px;
  }
}

/* collegamento segheria - prodotti */
.segheria-link-wrap {
  margin-top: 20px;
  text-align: center;
}

.segheria-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-brown) 30%, var(--color-border));
  background: color-mix(in srgb, var(--color-bg) 88%, #fff 12%);
  color: var(--color-text);
  font-weight: 600;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.segheria-link:hover {
  transform: translateY(-2px);
  background: var(--color-anthracite);
  color: #fff;
  border-color: var(--color-anthracite);
}

/* Margine tra titolo e split */
#investimenti-sostenibilita > .container:first-child {
  margin-bottom: 100px;
}

@media (max-width: 768px) {
  #investimenti-sostenibilita > .container:first-child {
    margin-bottom: 48px;
  }
}

/*Spaziatura*/
.section-divider {
  height: 48px;
  width: 100%;
}

@media (max-width: 768px) {
  .section-divider {
    height: 24px;
  }
}

.suction-lead {
  max-width: 1500px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-light);
  text-align: center;
}

.segheria-slider-shell {
  margin-top: 56px;
  position: relative;
}

.segheria-slider-header {
  max-width: 780px;
  margin: 0 auto 30px;
  text-align: center;
}

.segheria-slider-kicker {
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-brown);
}

.segheria-slider-lead {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.segheria-slider {
  position: relative;
  padding: 26px 70px 24px;
  overflow: hidden;
}

.segheria-slider::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 28px;
  pointer-events: none;
}

.segheria-slider::after {
  content: '';
  position: absolute;
  inset: auto -12% -44% 48%;
  height: 220px;
  background: radial-gradient(circle, rgba(92, 74, 50, 0.16) 0%, rgba(92, 74, 50, 0) 72%);
  pointer-events: none;
}

.segheria-viewport {
  overflow: hidden;
  border-radius: 26px;
}

.segheria-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 28px) / 2);
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 6px;
  position: relative;
  z-index: 1;
  align-items: stretch;
}

.segheria-track::-webkit-scrollbar {
  display: none;
}

.segheria-slide {
  position: relative;
  margin: 0;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid color-mix(in srgb, var(--color-border) 74%, rgba(255, 255, 255, 0.5) 26%);
  border-radius: 28px;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.16);
  scroll-snap-align: start;
  isolation: isolate;
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

.segheria-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.02) 0%, rgba(10, 10, 10, 0.08) 34%, rgba(10, 10, 10, 0.72) 100%);
  z-index: 1;
  pointer-events: none;
}

.segheria-slide:hover {
  transform: translateY(-10px) scale(1.01);
  border-color: color-mix(in srgb, var(--color-brown) 62%, #ffffff 38%);
  box-shadow: 0 30px 54px rgba(0, 0, 0, 0.2);
}

.segheria-slide img {
  display: block;
  width: 100%;
  height: clamp(300px, 34vw, 430px);
  object-fit: cover;
  background: #e8e8e8;
  transform: scale(1.02);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  filter: saturate(1.02) contrast(1.04);
}

.segheria-slide:hover img {
  transform: scale(1.08);
  filter: saturate(1.06) contrast(1.06);
}

.segheria-slide figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
  padding: 16px 18px 18px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #f7f3ec;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.2) 0%, rgba(28, 28, 28, 0.64) 100%);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  max-width: min(88%, 420px);
}




@media (max-width: 900px) {
  .segheria-slider {
    padding: 18px 22px 18px;
  }
  
  .segheria-slider::before {
    inset: 12px;
  }
  
  .segheria-track {
    grid-auto-columns: 100%;
    gap: 18px;
  }
  
  .segheria-slide img {
    height: 280px;
  }
  
  .segheria-slide figcaption {
    right: 14px;
    bottom: 14px;
    left: 14px;
    padding: 14px 16px 16px;
    max-width: none;
  }
  
}

@media (max-width: 700px) {
  .segheria-slider-shell {
    margin-top: 40px;
  }
  
  .segheria-slider {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  
  .segheria-slider-header {
    margin-bottom: 18px;
  }
  
  .segheria-slider::before,
  .segheria-slider::after {
    display: none;
  }
  
  .segheria-slide img {
    height: 240px;
  }
  
  .segheria-slide figcaption {
    right: 12px;
    bottom: 12px;
    left: 12px;
    padding: 13px 14px 14px;
    font-size: 0.88rem;
    border-radius: 18px;
    max-width: none;
  }
}

/* === Timeline moderna ottimizzata === */
.timeline-modern {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 64px auto 96px auto;
  padding: 0 16px;
}
.timeline-modern-line {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, #e0e0e0 0%, var(--color-accent, #2e7d32) 100%);
  border-radius: 1px;
  z-index: 1;
  opacity: 0.7;
}
.timeline-modern-list {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  position: relative;
  z-index: 2;
}
.timeline-modern-card-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  position: relative;
}
/* Zig-zag marcato: alterna card sopra/sotto con più spazio */
.timeline-modern-card-group:nth-child(odd) {
  justify-content: flex-start;
  margin-bottom: 60px;
}
.timeline-modern-card-group:nth-child(even) {
  justify-content: flex-end;
  margin-top: 60px;
}
.timeline-modern-card {
  width: 112px;
  height: 112px;
  background: #f7f7f7;
  border-radius: 20px;
  box-shadow: 0 6px 32px 0 rgba(60,60,60,0.10), 0 1.5px 6px #0001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: #b0b0b0;
  margin: 0;
  cursor: pointer;
  transition: box-shadow 0.25s, border 0.25s, color 0.25s, background 0.25s, transform 0.22s cubic-bezier(.22,1,.36,1);
  border: 2px solid transparent;
  outline: none;
  position: relative;
  z-index: 3;
}
.timeline-modern-card:focus-visible {
  border: 2px solid var(--color-accent, #2e7d32);
  box-shadow: 0 0 0 4px #b2dfdb55;
}
.timeline-modern-card.active,
.timeline-modern-card:hover {
  border: 2.5px solid var(--color-accent, #2e7d32);
  background: #fff;
  color: var(--color-accent, #2e7d32);
  box-shadow: 0 12px 36px 0 #2e7d3230, 0 2px 8px #0001;
  z-index: 4;
  transform: scale(1.08);
}
.timeline-modern-card:not(.active):not(:hover) {
  opacity: 0.85;
  filter: grayscale(0.15);
}
.timeline-modern-year {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  color: inherit;
  margin-bottom: 0;
  letter-spacing: 0.01em;
  text-align: center;
  width: 100%;
}
/* Connettore elegante: linea sottile tra card e linea centrale */
.timeline-modern-connector {
  width: 2px;
  height: 38px;
  background: linear-gradient(180deg, #e0e0e0 60%, var(--color-accent, #2e7d32) 100%);
  margin: 0 auto;
  border-radius: 1.5px;
  z-index: 2;
}
.timeline-modern-card-group:nth-child(odd) .timeline-modern-connector {
  margin-bottom: 0;
  margin-top: 8px;
}
.timeline-modern-card-group:nth-child(even) .timeline-modern-connector {
  margin-top: 0;
  margin-bottom: 8px;
}
.timeline-modern-desc {
  position: absolute;
  left: 50%;
  top: 120%;
  min-width: 220px;
  max-width: 320px;
  background: #fff;
  color: #333;
  border-radius: 14px;
  box-shadow: 0 8px 32px 0 #2e7d3230, 0 2px 8px #0001;
  padding: 18px 20px 16px 20px;
  font-size: 1.08rem;
  font-weight: 400;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 24px) scale(0.98);
  transition: opacity 0.38s cubic-bezier(.4,2,.6,1), transform 0.38s cubic-bezier(.4,2,.6,1);
  z-index: 10;
  box-sizing: border-box;
  border: 1.5px solid #e0e0e0;
}
.timeline-modern-card.active .timeline-modern-desc,
.timeline-modern-card:hover .timeline-modern-desc {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.timeline-modern-card-group:nth-child(even) .timeline-modern-desc {
  top: 120%;
  bottom: auto;
  transform: translate(-50%, 24px) scale(0.98);
}
.timeline-modern-card-group:nth-child(even) .timeline-modern-card.active .timeline-modern-desc,
.timeline-modern-card-group:nth-child(even) .timeline-modern-card:hover .timeline-modern-desc {
  transform: translate(-50%, 0) scale(1);
}
@media (max-width: 900px) {
  .timeline-modern {
    max-width: 720px;
    margin: 36px auto 48px;
    padding: 0 12px;
  }
  
  .timeline-modern-line,
  .timeline-modern-connector {
    display: none;
  }
  
  .timeline-modern-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .timeline-modern-card-group,
  .timeline-modern-card-group:nth-child(odd),
  .timeline-modern-card-group:nth-child(even) {
    margin: 0;
    align-items: center;
    justify-content: flex-start;
  }
  
  /* --- Card: contenitore flessibile, NO overflow hidden --- */
  .timeline-modern-card {
    width: min(100%, 420px);
    min-height: 0;
    height: auto;
    border-radius: 16px;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--color-anthracite);
    border: 1px solid color-mix(in srgb, var(--color-border) 86%, #ffffff 14%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: box-shadow 0.28s ease, border-color 0.28s ease;
  }
  
  /* --- Anno: header tappabile, border-radius pieno quando chiusa --- */
  .timeline-modern-year {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    flex-shrink: 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    background: var(--color-anthracite);
    letter-spacing: 0.04em;
    text-align: center;
    padding: 16px 14px;
    z-index: 2;
    transition: border-radius 0.25s ease;
  }
  
  /* Chevron indicatore tap (▼) */
  .timeline-modern-year::after {
    content: '';
    display: block;
    position: absolute;
    right: 16px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.6);
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.3s ease, border-color 0.3s ease;
  }
  
  /* --- Desc: nascosta di default, expand con max-height --- */
  .timeline-modern-desc {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    max-height: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    border-radius: 0 0 16px 16px;
    background: #ffffff;
    color: var(--color-text);
    border-top: 0 solid transparent;
    box-shadow: none;
    min-width: auto;
    max-width: none;
    font-size: 0.93rem;
    line-height: 1.55;
    padding: 0 16px;
    text-align: left;
    overflow-wrap: anywhere;
    overflow: hidden;
    display: block;
    z-index: 3;
    transform: none;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease,
    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-top-width 0.2s ease,
    border-top-color 0.2s ease;
  }
  
  .timeline-modern-desc strong {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.96rem;
    margin-bottom: 6px;
    color: color-mix(in srgb, var(--color-text) 86%, #000000 14%);
  }
  
  /* --- Card aperta (.active): desc visibile --- */
  .timeline-modern-card.active .timeline-modern-year {
    border-radius: 16px 16px 0 0;
  }
  
  .timeline-modern-card.active .timeline-modern-year::after {
    transform: translateY(-35%) rotate(-135deg);
    border-color: rgba(255, 255, 255, 0.9);
  }
  
  .timeline-modern-card.active .timeline-modern-desc {
    max-height: 600px;
    opacity: 1;
    pointer-events: auto;
    padding: 14px 16px 16px;
    border-top: 2px solid color-mix(in srgb, var(--color-anthracite) 22%, var(--color-border) 78%);
    overflow: visible;
  }
  
  /* Dark theme desc */
  [data-theme="dark"] .timeline-modern-desc {
    background: var(--color-anthracite-light);
    color: var(--color-text);
  }
  
  [data-theme="dark"] .timeline-modern-card.active .timeline-modern-desc {
    border-top-color: rgba(255, 255, 255, 0.12);
  }
  
  /* --- Neutralizzazioni specificità desktop (regole senza media query) --- */ 
  
  /* nth-child(even) desc: top/transform desktop (spec 0-2-0) */
  .timeline-modern-card-group:nth-child(even) .timeline-modern-desc {
    top: auto;
    bottom: auto;
    transform: none;
  }
  
  /* active/hover desc: transform desktop (spec 0-2-0) */
  .timeline-modern-card.active .timeline-modern-desc,
  .timeline-modern-card:hover .timeline-modern-desc {
    transform: none;
  }
  
  /* even active/hover desc: transform desktop (spec 0-3-0) */
  .timeline-modern-card-group:nth-child(even) .timeline-modern-card.active .timeline-modern-desc,
  .timeline-modern-card-group:nth-child(even) .timeline-modern-card:hover .timeline-modern-desc {
    transform: none;
  }
  
  /* card active/hover: scale/background desktop (spec 0-2-0) */
  .timeline-modern-card.active,
  .timeline-modern-card:hover {
    transform: none;
    background: var(--color-anthracite);
    color: #fff;
    z-index: 3;
  }
  
  /* card non attive: opacity/filter desktop (spec 0-3-0) */
  .timeline-modern-card:not(.active):not(:hover) {
    opacity: 1;
    filter: none;
  }
  
  /* focus-visible border desktop (spec 0-2-0) */
  .timeline-modern-card:focus-visible {
    border: 1px solid color-mix(in srgb, var(--color-border) 86%, #ffffff 14%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  }
  
  /* feedback interattivo su card (bordo + ombra) */
  .timeline-modern-card:hover,
  .timeline-modern-card:active,
  .timeline-modern-card:focus-visible,
  .timeline-modern-card:focus-within,
  .timeline-modern-card.active {
    border-color: color-mix(in srgb, var(--color-anthracite) 30%, var(--color-border) 70%);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  }
}
@media (max-width: 600px) {
  .timeline-modern {
    padding: 0 2px;
  }
  
  .timeline-modern-card {
    width: 100%;
    max-width: 100%;
  }
  
  .timeline-modern-year {
    font-size: 1.35rem;
    padding: 14px 10px;
  }
  
  .timeline-modern-year::after {
    right: 12px;
    width: 8px;
    height: 8px;
  }
  
  .timeline-modern-card.active .timeline-modern-desc {
    padding: 12px;
  }
}
/* === Timeline serpentina con flip card === */
/* Timeline serpentina orizzontale su due righe */
.timeline-serpentina {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  position: relative;
  margin: 60px auto 80px auto;
  max-width: 900px;
  min-width: 320px;
  column-gap: 0;
  row-gap: 60px;
  align-items: center;
}
/* Linea orizzontale che collega i punti */
.timeline-serpentina::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  background: linear-gradient(90deg, var(--color-accent, #2e7d32) 0%, #b2dfdb 100%);
  z-index: 0;
  border-radius: 3px;
  transform: translateY(-50%);
}
.timeline-serpentina-item {
  position: relative;
  width: 100%;
  z-index: 1;
  display: flex;
  align-items: center;
  min-width: 140px;
  min-height: 120px;
  margin: 0;
  justify-content: center;
}
/* Alterna le card tra la riga superiore e inferiore */
.timeline-serpentina-item:nth-child(odd) {
  grid-row: 1 / 2;
}
.timeline-serpentina-item:nth-child(even) {
  grid-row: 2 / 3;
}
.timeline-serpentina-dot {
  width: 28px;
  height: 28px;
  background: var(--color-accent, #2e7d32);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  border: 3px solid #fff;
}
.timeline-flip-card {
  width: 120px;
  height: 120px;
  perspective: 800px;
  margin: 0 32px;
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  transition: box-shadow 0.2s;
}
.timeline-flip-card:focus-visible {
  outline: 2px solid var(--color-accent, #2e7d32);
  outline-offset: 2px;
}
.timeline-flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(.4,2,.6,1);
  transform-style: preserve-3d;
}
.timeline-flip-card.flipped .timeline-flip-card-inner {
  transform: rotateY(180deg);
}
.timeline-flip-card-front, .timeline-flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.timeline-flip-card-front {
  background: #fff;
  color: var(--color-accent, #2e7d32);
  font-size: 2.2rem;
  font-weight: 700;
  border: 2px solid var(--color-accent, #2e7d32);
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline-flip-card-back {
  background: var(--color-accent, #2e7d32);
  color: #fff;
  transform: rotateY(180deg);
  font-size: 1.05rem;
  padding: 18px;
  text-align: center;
  border: 2px solid var(--color-accent, #2e7d32);
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 900px) {
  .timeline-serpentina {
    max-width: 98vw;
    grid-template-columns: 1fr;
    row-gap: 40px;
    display: grid;
  }
  .timeline-flip-card {
    width: 90px;
    height: 90px;
    margin: 0 8px;
  }
  .timeline-serpentina-item {
    min-height: 100px;
    grid-column: 1 / 2 !important;
    justify-content: center !important;
  }
}

/* Logo hero fisso */
.site-logo-hero,
.site-logo-hero.site-logo-fixed {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1010;
  width: clamp(120px, 18vw, 220px);
  height: auto;
  background: none;
  border-radius: 12px;
  transition: width 0.28s, top 0.28s, right 0.28s;
}

/* Logo del menu sticky */
.site-logo-menu {
  display: block;
  width: clamp(120px, 14vw, 180px);
  height: auto;
  margin-right: 18px;
  margin-left: 0;
  align-self: center;
  background: none;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.10));
  transition: width 0.28s;
}

/* Logo mobile header: nascosto su desktop */
.site-logo-mobile-header {
  display: none;
}

[data-theme="dark"] .site-logo-menu {
  filter: brightness(1.7) contrast(1.16) saturate(1.08) drop-shadow(0 10px 26px rgba(255, 255, 255, 0.32)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.12));
} 

@media (max-width: 700px) {
  .site-logo-hero,
  .site-logo-hero.site-logo-fixed {
    width: 110px;
    top: 10px;
    right: 10px;
  }
  
  .site-logo-menu {
    width: 90px;
    margin-right: 10px;
  }
}


/* Nascondi sempre il logo Instagram nel menu, tranne quando sticky */
.menu-insta-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}
.hero-bottom-menu.is-sticky .hero-bottom-menu-header .menu-insta-btn {
  display: inline-flex !important;
  margin-left: -120px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff !important;
  box-shadow: 0 3px 12px rgba(225, 48, 108, 0.3);
  transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s ease;
}

.hero-bottom-menu.is-sticky .hero-bottom-menu-header .menu-insta-btn:hover {
  transform: scale(1.15) translateY(-2px);
  box-shadow: 0 0 14px rgba(225, 48, 108, 0.5), 0 4px 18px rgba(225, 48, 108, 0.25);
}

.hero-bottom-menu.is-sticky .hero-bottom-menu-header .menu-insta-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

/* Bottone X/ESC per uscita fullscreen video */
.exit-fullscreen-btn {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 2147483647;
  background: rgba(0,0,0,0.78);
  color: #fff;
  font-size: 2.2rem;
  border: none;
  border-radius: 28px;
  width: 86px;
  height: 48px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 10px;
  box-shadow: 0 2px 16px #0008;
  user-select: none;
  pointer-events: auto;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.exit-fullscreen-btn.visible {
  display: flex;
}
.exit-fullscreen-btn:hover {
  background: #e4405f;
  color: #fff;
}

/* Default: bottone Instagram a destra */
.floating-insta-btn {
  position: absolute;
  right: 24px;
  left: auto;
  bottom: 24px;
  z-index: 10010 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 4px 24px #0006;
  transition: opacity 0.22s ease, visibility 0.22s ease, background 0.2s, color 0.2s, transform 0.2s;
  font-size: 1.7rem;
  opacity: 1;
  visibility: visible;
  animation: floating-insta-appear 0.7s cubic-bezier(.22,1,.36,1);
}

.social-link.instagram {
  color: #e4405f;
  background-color: rgba(228, 64, 95, 0.1);
  transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s ease, color 0.3s ease, background 0.3s ease;
}

.social-link.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
  transform: scale(1);
  box-shadow: 0 0 18px rgba(225, 48, 108, 0.45), 0 0 40px rgba(225, 48, 108, 0.2);
}
/* Solo in home: bottone Instagram a sinistra */
body.home .floating-insta-btn {
  left: 24px !important;
  right: auto !important;
}

/* Il bottone Instagram flottante resta visibile e fisso anche con il menu sticky */
.floating-insta-btn.is-sticky {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@keyframes floating-insta-appear {
  from { opacity: 0; transform: translateY(40px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}



.hero-bottom-menu-header .hero-social-link {
  margin-right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  padding: 0;
  position: relative;
}

.hero-bottom-menu-header .hero-social-link:hover {
  background: #f5e6fa;
  border-color: #8134af;
  box-shadow: 0 4px 16px rgba(129,52,175,0.18);
}

.hero-bottom-menu-header .insta-svg {
  display: block;
  width: 28px;
  height: 28px;
  stroke: none;
  flex-shrink: 0;
}

.insta-fallback {
  display: inline-block;
  color: #8134af;
  font-size: 1.1rem;
  font-weight: bold;
  margin-left: 8px;
  letter-spacing: 0.02em;
  font-family: inherit;
}

@media (max-width: 600px) {
  .insta-fallback {
    font-size: 0.95rem;
    margin-left: 4px;
  }
}

@media (prefers-color-scheme: dark), [data-theme="dark"] {
  .hero-bottom-menu-header .hero-social-link {
    background: #23232b;
    border-color: #444;
  }
  .hero-bottom-menu-header .hero-social-link:hover {
    background: #2d1a38;
    border-color: #8134af;
  }
}

/* Bottone X sempre visibile in fullscreen video */
.video-wrap-alberi:fullscreen .exit-fullscreen-btn,
.video-wrap-alberi:-webkit-full-screen .exit-fullscreen-btn {
  position: fixed !important;
  top: 32px;
  right: 32px;
  z-index: 31000;
  background: rgba(0,0,0,0.7) !important;
  box-shadow: 0 2px 16px #0008;
  display: flex !important;
}
/* ===== Alberi – Log concentric circles, single page ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #fafafa;
  --color-text: #2d2d2d;
  --color-text-muted: #5c5c5c;
  --color-text-light: #6b6b6b;
  --color-border: #e5e5e5;
  --color-accent: #3d3d3d;
  --color-anthracite: #2d3032;
  --color-anthracite-light: #3a3d40;
  --color-brown: #5c4a32;
  --color-brown-hover: #6b5344;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --fs-body: clamp(0.98rem, 0.2vw + 0.94rem, 1.06rem);
  --fs-small: clamp(0.86rem, 0.12vw + 0.84rem, 0.93rem);
  --fs-lead: clamp(1.02rem, 0.34vw + 0.96rem, 1.2rem);
  --fs-subtitle: clamp(1.12rem, 0.55vw + 1rem, 1.45rem);
  --fs-h3: clamp(1rem, 0.32vw + 0.94rem, 1.18rem);
  --fs-section-title: clamp(2.2rem, 3.1vw + 1.2rem, 4.1rem);
  --fs-hero-company: clamp(2.45rem, 5.9vw, 5rem);
  --fs-hero-motto: clamp(1.9rem, 4.8vw, 4.1rem);
  --timeline-ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --timeline-ease-pop: cubic-bezier(0.2, 0.8, 0.2, 1);
  --split-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --color-bg: #1a1b1d;
  --color-text: #e8e8e8;
  --color-text-muted: #b0b0b0;
  --color-text-light: #9a9a9a;
  --color-border: #2d3032;
  --color-accent: #c0c0c0;
  --color-anthracite: #2d3032;
  --color-anthracite-light: #3a3d40;
  --color-brown: #7d6b52;
  --color-brown-hover: #8b7659;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--color-text); text-decoration: none; }
a:hover { color: var(--color-accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

img, video {
  max-width: 100%;
}

/* ----- Theme toggle ----- */
.theme-toggle {
  position: fixed;
  top: auto;
  bottom: 20px;
  right: 20px;
  z-index: 1002;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  background: var(--color-anthracite);
  color: #fff;
  border-color: var(--color-anthracite);
}

.mobile-menu-toggle {
  display: none;
}

.mobile-menu-backdrop {
  display: none;
}

.mobile-menu-toggle-line {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.theme-icon {
  position: absolute;
  font-size: 1.25rem;
  transition: opacity 0.2s, transform 0.2s;
}

.theme-icon-moon { opacity: 0; }
.theme-icon-sun { opacity: 1; }

[data-theme="dark"] .theme-icon-moon { opacity: 1; }
[data-theme="dark"] .theme-icon-sun { opacity: 0; }

/* ----- Hero: full viewport, background image ----- */
.hero-alberi {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image: url('assets/Riflessi.JPG');
  background-size: cover;
  background-position: center;
}

.hero-alberi::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
  pointer-events: none;
}

.hero-fixed-logo {
  position: fixed;
  top: 12px;
  left: auto;
  right: 14px;
  z-index: 1010;
  display: block;
  width: clamp(250px, 30vw, 420px);
  height: clamp(84px, 10vw, 138px);
  max-width: calc(100vw - 24px);
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.21);
  border-radius: 16px;
  transform-origin: top right;
  transition: width 0.28s ease, height 0.28s ease, top 0.28s ease, right 0.28s ease, background-color 0.28s ease, border-color 0.28s ease;
}

.hero-fixed-logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/logo.svg');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border-radius: 16px;
  pointer-events: none;
}

.hero-fixed-logo::before {
  content: '';
  position: absolute;
  inset: -10px -14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(6px);
  z-index: -1;
  transition: inset 0.28s ease, border-radius 0.28s ease, background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, backdrop-filter 0.28s ease;
}

.hero-alberi:has(.hero-bottom-menu.is-sticky) .hero-fixed-logo {
  top: 10px;
  right: 12px;
  left: auto;
  width: clamp(132px, 14vw, 188px);
  height: clamp(42px, 4.8vw, 62px);
  max-width: calc(100vw - 20px);
  background-color: transparent;
  border-color: transparent;
}

.hero-alberi:has(.hero-bottom-menu.is-sticky) .hero-fixed-logo::after {
  background-size: 92% auto;
}

.hero-alberi:has(.hero-bottom-menu.is-sticky) .hero-fixed-logo::before {
  inset: -6px -8px;
  border-radius: 12px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

[data-theme="dark"] .hero-alberi::before {
  background: rgba(0, 0, 0, 0.30);
}

[data-theme="dark"] .hero-fixed-logo::before {
  background: rgba(20, 22, 24, 0.56);
  border-color: rgba(255, 255, 255, 0.26);
}

[data-theme="dark"] .hero-alberi:has(.hero-bottom-menu.is-sticky) .hero-fixed-logo {
  background-color: rgba(255, 255, 255, 0.86);
  border-color: rgba(255, 255, 255, 0.32);
}

/* ----- Logo ----- */
.migola{
  text-align:center;
  font-size: 1.5em;
  line-height: 0.8em;
  background-image:url('assets/logo.svg');
  background-color: transparent;
  width: clamp(320px, 42vw, 560px);
  min-height: clamp(110px, 14vw, 180px);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
  z-index:5;
}

.hero-bottom-menu-header {
  display: flex;
  align-items: center;
}

.mobile-menu-close {
  display: none;
}

/* Miglioramento visualizzazione logo in modalità dark */
[data-theme="dark"] .hero-fixed-logo::after,
[data-theme="dark"] .migola,
[data-theme="dark"] .site-logo-footer {
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.45));
}

/* ----- Bottom menu - sticky on scroll ----- */
.hero-bottom-menu {
  position: absolute;
  bottom: 0;
  left: 50%;
  right: auto;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 24px;
  width: min(1200px, calc(100% - 48px));
  padding: 20px 24px;
  background: transparent;
  backdrop-filter: none;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.hero-bottom-menu.is-sticky {
  position: fixed;
  top: 0;
  bottom: auto;
  left: 0;
  right: 0;
  width: 100%;
  transform: none;
  background: rgba(250, 250, 250, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .hero-bottom-menu.is-sticky {
  background: rgba(26, 27, 29, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.42);
}

.hero-bottom-menu.is-sticky .bottom-menu-item {
  color: var(--color-text);
  text-shadow: none;
}

[data-theme="dark"] .hero-bottom-menu.is-sticky .bottom-menu-item {
  color: rgba(255, 255, 255, 0.92);
}

.hero-bottom-menu.is-sticky .bottom-menu-item:hover {
  color: var(--color-brown);
  background: color-mix(in srgb, var(--color-brown) 12%, transparent);
}

@media (min-width: 769px) {
  .hero-bottom-menu-header {
    display: none;
  }
  
  .hero-bottom-menu-header .migola {
    display: none;
  }
  
  .hero-bottom-menu.is-sticky .hero-bottom-menu-header {
    display: flex;
    position: absolute;
    left: 24px;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    border: 0;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    pointer-events: none;
  }
  
  .hero-bottom-menu.is-sticky .site-logo-menu {
    display: block;
    margin-right: 0;
    margin-left: 0;
    pointer-events: auto;
  }
  
  .hero-bottom-menu.is-sticky .hero-bottom-menu-header .menu-insta-btn {
    margin-left: 0;
    margin-right: 0;
    pointer-events: auto;
  }
}

.bottom-menu-item {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.02rem, 0.6vw + 0.86rem, 1.24rem);
  font-weight: 500;
  text-decoration: none;
  padding: 8px 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  transition: color 0.2s, background 0.2s;
  border-radius: 2px;
}

.bottom-menu-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .gallery-arrow {
    display: none !important;
  }
  /* Nasconde il logo hero bianco su mobile, usa logo_footer nell'header */
  .site-logo-hero,
  .hero-fixed-logo {
    display: none !important;
  }

  /* Logo mobile header fisso nella barra superiore */
  .site-logo-mobile-header {
    display: block !important;
    position: fixed;
    top: 12px;
    right: 14px;
    left: auto;
    z-index: 1004;
    width: clamp(138px, 42vw, 205px);
    height: 48px;
    max-width: calc(100vw - 84px);
    object-fit: contain;
    object-position: right center;
    pointer-events: auto;
  }

  [data-theme="dark"] .site-logo-mobile-header {
    filter: brightness(1.7) contrast(1.16) saturate(1.08) drop-shadow(0 10px 26px rgba(255, 255, 255, 0.32)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.12));
  }
  
  /* Nasconde l'header interno al drawer (contiene il logo duplicato) */
  .hero-bottom-menu-header {
    display: none !important;
  }
  
  body.mobile-menu-open {
    overflow: hidden;
  }
  
  .hero-alberi::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(12px);
    z-index: 1000;
  }
  
  .hero-alberi {
    min-height: 100svh;
    justify-content: flex-start;
    padding: clamp(140px, 21vh, 176px) 18px 104px;
  }
  
  /* hero-fixed-logo e relative varianti non servono su mobile (nascosti sopra) */
  
  .theme-toggle {
    position: fixed;
    top: auto;
    bottom: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }
  
  .mobile-menu-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1005;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    color: #2d2d2d;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  }
  
  .mobile-menu-toggle:hover {
    background: var(--color-anthracite);
    color: #fff;
    border-color: var(--color-anthracite);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  }
  
  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: block;
    background: linear-gradient(90deg, rgba(20, 20, 20, 0.46) 0%, rgba(20, 20, 20, 0.18) 58%, rgba(20, 20, 20, 0.08) 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }
  
  body.mobile-menu-open .mobile-menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  .hero-bottom-menu {
    position: fixed;
    top: 72px;
    left: 0;
    bottom: auto;
    right: auto;
    z-index: 1002;
    justify-content: flex-start;
    align-items: stretch;
    gap: 10px;
    width: min(340px, calc(100vw - 32px));
    max-width: calc(100vw - 16px);
    height: calc(100svh - 72px);
    padding: 20px 16px;
    flex-wrap: nowrap;
    flex-direction: column;
    overflow-y: auto;
    background: rgba(250, 250, 250, 0.94);
    backdrop-filter: blur(18px);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    border-top-right-radius: 0;
    border-bottom-right-radius: 22px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }
  
  [data-theme="dark"] .hero-bottom-menu {
    background: rgba(26, 27, 29, 0.94);
    border-right-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
  }
  
  [data-theme="dark"] .hero-alberi::after {
    background: rgba(255, 255, 255, 0.96);
    border-bottom-color: rgba(0, 0, 0, 0.08);
  }
  
  [data-theme="dark"] .mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.82);
    color: #2d2d2d;
    border-color: rgba(0, 0, 0, 0.08);
  }
  
  body.mobile-menu-open .hero-bottom-menu,
  .hero-bottom-menu.is-sticky {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }
  
  body.mobile-menu-open .hero-bottom-menu.is-sticky {
    top: 72px;
    bottom: auto;
  }
  
  body:not(.mobile-menu-open) .hero-bottom-menu.is-sticky {
    top: 72px;
    bottom: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
  }
  
  /* .migola e .mobile-menu-close non servono più nel drawer */
  .migola {
    display: none;
  }
  
  .bottom-menu-item {
    width: 100%;
    font-size: 1rem;
    padding: 14px 16px;
    line-height: 1.2;
    color: var(--color-text);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  }
  
  .bottom-menu-item:hover {
    background: color-mix(in srgb, var(--color-brown) 8%, rgba(255, 255, 255, 0.75));
    color: var(--color-text);
    border-color: color-mix(in srgb, var(--color-brown) 30%, var(--color-border));
  }
  
  /* dark theme: header del drawer nascosto, niente override necessari */
  
  [data-theme="dark"] .bottom-menu-item {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
  
  .hero-brand {
    width: min(100%, 560px);
    margin-top: clamp(56px, 10vh, 110px);
    padding: 0;
  }
  
  .hero-company,
  .hero-motto {
    float: none;
    display: block;
    max-width: 100%;
    text-align: center;
  }
  
  .hero-company {
    font-size: clamp(2.35rem, 9vw, 4.2rem);
    line-height: 0.92;
  }
  
  .hero-motto {
    margin: 16px auto 0;
    font-size: clamp(1.45rem, 5vw, 2.5rem);
    line-height: 0.98;
    max-width: 18ch;
  }
  
  .floating-insta-btn.social-link.instagram:hover {
    background: rgba(228, 64, 95, 0.1);
    color: #e4405f;
    transform: none;
  }
}

/* ----- Hero brand (center) ----- */
.hero-brand {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  margin-top: clamp(24px, 6vh, 72px);
  padding: 0 2rem;
}

.hero-brand .site-logo-hero {
  display: block;
  margin: 0 auto 10px;
  height: 200px;
  width: auto;
}

.hero-company {
  font-size: var(--fs-hero-company);
  color: rgba(255, 255, 255, 1);
  font-weight: 700;
  text-shadow:
  0 2px 6px rgba(0, 0, 0, 0.45),
  0 10px 26px rgba(0, 0, 0, 0.55);
  -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.28);
  letter-spacing: 0.01em;
  font-family: 'Krona One', serif;
  float:left;
  line-height: 1em;
  max-width: 100%;
}

.hero-motto {
  font-size: var(--fs-hero-motto);
  color: #c0c0c0ff;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-family: 'Krona One', serif;
  float:left;
  clear: left;
  line-height: 0.8em;
  max-width: 60%;
  text-align: left  ;
  margin-top: 30px;
}

@media (max-width: 900px) {
  .hero-brand {
    margin-top: clamp(12px, 4vh, 36px);
    padding: 0 1.5rem;
  }
  
  .hero-company,
  .hero-motto {
    float: none;
    display: block;
    max-width: 100%;
    text-align: center;
  }
  
  .hero-company {
    font-size: clamp(2.4rem, 9vw, 4.5rem);
    line-height: 0.95;
  }
  
  .hero-motto {
    margin-top: 12px;
    font-size: clamp(1.6rem, 6vw, 3rem);
    line-height: 1;
  }
}

@media (max-width: 560px) {
  .hero-alberi {
    min-height: 100svh;
    justify-content: flex-start;
    padding: 136px 16px 92px;
  }
  
  .hero-alberi::after {
    height: 68px;
  }
  
  .hero-brand {
    padding: 0;
  }
  
  .hero-fixed-logo,
  .hero-alberi:has(.hero-bottom-menu.is-sticky) .hero-fixed-logo {
    top: 12px;
    right: 12px;
    width: clamp(126px, 40vw, 168px);
    height: 44px;
    max-width: calc(100vw - 78px);
  }
  
  .hero-company {
    font-size: clamp(2rem, 11vw, 3rem);
  }
  
  .hero-motto {
    margin-top: 14px;
    font-size: clamp(1.1rem, 5.6vw, 1.6rem);
  }
  
  .hero-bottom-menu {
    width: min(304px, calc(100vw - 16px));
    padding: calc(68px + env(safe-area-inset-top, 0px)) 14px 18px;
  }
  
  .hero-bottom-menu-header {
    margin-bottom: 14px;
    padding: 0 0 12px 0;
  }
  
  body.mobile-menu-open .hero-bottom-menu.is-sticky,
  body:not(.mobile-menu-open) .hero-bottom-menu.is-sticky {
    top: 0;
  }
  
  .bottom-menu-item {
    font-size: 0.95rem;
    padding: 13px 14px;
  }
  
  .migola {
    width: min(188px, 62vw);
    min-height: 54px;
  }
}



/* ----- Section titles ----- */
.section-title {
  font-family: 'Krona One', serif;
  font-size: var(--fs-section-title);
  font-weight: 400;
  color: #000000;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: center;
}

[data-theme="dark"] .section-title {
  color: #ffffff;
}

@media (max-width: 768px) {
  .section-title {
    font-size: clamp(1.9rem, 9vw, 2.4rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
  }
}

.section-lead {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  max-width: 1100px;
  margin: 0 auto 48px;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 768px) {
  .section-lead {
    font-size: 1rem;
    margin-bottom: 32px;
  }
}

/* ----- Timeline - Modern horizontal ----- */
.timeline-section.alberi-section {
  position: relative;
  z-index: 2;
  overflow: visible;
  padding: 100px 0 120px;
  background: #ededed;
  border-top: none;
}

[data-theme="dark"] .timeline-section.alberi-section {
  background: #222426;
}

.timeline-section .container {
  max-width: 100%;
  padding: 0 48px;
}



/* --- Timeline orizzontale responsive --- */
.timeline-horizontal {
  position: relative;
  overflow: visible;
  padding: 20px 0 72px;
  min-height: 340px;
}

.timeline-horizontal::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 34%;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--color-brown) 12%, var(--color-brown) 88%, transparent 100%);
  opacity: 0.45;
  z-index: 0;
  transform: translateY(-50%);
}

.timeline-track {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
  align-items: start;
  padding: 12px 6px;
  overflow: visible;
}

.timeline-card {
  position: relative;
  padding: 16px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  transition: transform 0.45s var(--timeline-ease-smooth), box-shadow 0.45s var(--timeline-ease-smooth), border-color 0.45s var(--timeline-ease-smooth), background 0.45s var(--timeline-ease-smooth);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  min-width: 0;
  margin: 0;
  top: 0;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  min-height: 140px;
  cursor: pointer;
  overflow: visible;
  animation: timelineFloat 6s ease-in-out infinite;
  will-change: transform, box-shadow;
}

.timeline-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 115%, color-mix(in srgb, var(--color-brown) 24%, transparent) 0%, transparent 62%);
  opacity: 0;
  transition: opacity 0.45s var(--timeline-ease-pop);
  pointer-events: none;
}

.timeline-card:nth-child(2n) { animation-delay: 0.25s; }
.timeline-card:nth-child(3n) { animation-delay: 0.45s; }
.timeline-card:nth-child(4n) { animation-delay: 0.6s; }

.timeline-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.14);
  border-color: var(--color-brown);
  background: color-mix(in srgb, var(--color-bg) 95%, var(--color-brown) 5%);
  z-index: 2;
  animation-play-state: paused;
}

.timeline-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--color-brown) 68%, white 32%);
  outline-offset: 3px;
}

.timeline-card:hover::after {
  opacity: 1;
}

@media (max-width: 1200px) {
  .timeline-track {
    grid-template-columns: repeat(8, 1fr);
    gap: 14px;
  }
  .timeline-card {
    padding: 14px 10px;
    min-height: 130px;
  }
  .timeline-year {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }
  .timeline-card h3 {
    font-size: 0.75rem;
  }
}

@media (max-width: 900px) {
  .timeline-section.alberi-section {
    padding-bottom: 80px;
  }
  
  .timeline-track {
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
  }
  .timeline-card {
    padding: 12px 8px;
    min-height: 120px;
    font-size: 0.85em;
  }
  .timeline-year {
    font-size: 1.1rem;
    margin-bottom: 4px;
  }
  .timeline-card h3 {
    font-size: 0.7rem;
  }
}

@media (max-width: 900px) {
  .timeline-card {
    aspect-ratio: auto;
    height: auto;
    justify-content: flex-start;
  }
  
  .timeline-horizontal {
    overflow-x: hidden;
    overflow-y: visible;
    padding: 12px 0 56px;
    min-height: 250px;
    scrollbar-width: none;
  }
  
  .timeline-horizontal::-webkit-scrollbar {
    display: none;
  }
  
  .timeline-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-columns: unset;
    width: 100%;
    min-width: 100%;
    gap: 8px;
    grid-auto-flow: row;
  }
  
  .timeline-card {
    padding: 10px 8px;
    font-size: 0.8em;
    min-height: 96px;
  }
  
  .timeline-year {
    font-size: 0.95rem;
    margin-bottom: 3px;
  }
  
  .timeline-card h3 {
    font-size: 0.65rem;
  }
  
  .timeline-description {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    min-width: 0;
    margin-top: 8px;
    padding: 0 8px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
    filter: none;
  }
  
  .timeline-card:hover .timeline-description {
    transform: none;
    padding: 8px;
  }
  
  .timeline-card:hover,
  .timeline-card:active {
    min-height: 130px;
  }
}

@media (max-width: 420px) {
  .timeline-track {
    grid-template-columns: 1fr;
  }
  
  .timeline-card {
    min-height: 90px;
    aspect-ratio: auto;
  }
}


.timeline-year {
  display: inline-block;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-brown);
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: none;
  transition: opacity 0.35s var(--timeline-ease-pop), transform 0.35s var(--timeline-ease-pop);
}

.timeline-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0;
  line-height: 1.3;
  text-align: center;
  transition: opacity 0.35s var(--timeline-ease-pop), transform 0.35s var(--timeline-ease-pop);
}

.timeline-card:hover .timeline-year,
.timeline-card:hover h3 {
  transform: translateY(-2px);
}

.timeline-card p {
  font-size: 0.94rem;
  color: var(--color-text-light);
  line-height: 1.65;
}

.timeline-description {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.98);
  font-size: 0.75rem;
  color: var(--color-text-light);
  line-height: 1.5;
  margin: 0;
  padding: 14px 12px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s var(--timeline-ease-pop), opacity 0.35s var(--timeline-ease-pop), transform 0.45s var(--timeline-ease-pop), filter 0.35s var(--timeline-ease-pop);
  text-align: center;
  width: 100%;
  min-width: 180px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  filter: blur(2px);
}

.timeline-card:hover .timeline-description {
  max-height: 420px;
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  filter: blur(0);
}

@keyframes timelineFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-card,
  .timeline-description,
  .timeline-year,
  .timeline-card h3 {
    animation: none !important;
    transition: none !important;
  }
  
  .timeline-card:hover {
    transform: none;
  }
  
  .split-image-alberi,
  .split-image-alberi::after,
  .split-section .split-content > * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}

@media (max-width: 1200px) {
  .timeline-horizontal {
    min-height: 320px;
    padding: 18px 0 64px;
  }
}

@media (max-width: 900px) {
  .timeline-horizontal {
    min-height: 300px;
    padding: 16px 0 56px;
  }
}

@media (max-width: 700px) {
  .timeline-horizontal {
    min-height: 250px;
  }
  
  .timeline-description {
    min-width: 140px;
    padding: 10px 8px;
  }
}


/* ----- Video ----- */
.video-section.alberi-section {
  position: relative;
  z-index: 1;
  padding: 100px 0 120px;
  background: var(--color-bg);
  border-top: none;
}

.video-section.alberi-section .container {
  max-width: 100%;
  padding: 0;
}

.video-section.alberi-section .section-title {
  padding: 0 48px;
  margin-bottom: 32px;
}

.video-wrap.video-wrap-alberi {
  position: relative;
  width: 100%;
  max-width: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

.video-wrap.video-wrap-alberi:fullscreen,
.video-wrap.video-wrap-alberi:-webkit-full-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.video-wrap video {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.video-wrap.video-wrap-alberi:fullscreen video,
.video-wrap.video-wrap-alberi:-webkit-full-screen video {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  cursor: zoom-out;
}

.video-wrap.video-wrap-alberi.video-fullscreen-active video,
.video-wrap video:fullscreen,
.video-wrap video:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  cursor: zoom-out;
}

.video-wrap video:fullscreen {
  cursor: zoom-out;
}

@media (max-width: 768px) {
  .video-wrap video {
    max-height: 34vh;
  }
}

@media (max-width: 768px) {
  .video-section.alberi-section .section-title {
    padding: 0 24px;
  }
}

/* ----- Content sections: alternate full/narrow ----- */
.content-section.alberi-section {
  padding: 100px 0;
  border-top: none;
}


[data-theme="dark"] .content-section.alberi-section.full-width {
  background: #222426;
}

.content-section.alberi-section.full-width .container {
  max-width: 100%;
  padding: 0 48px;
}

@media (max-width: 768px) {
  .content-section.alberi-section {
    padding: 72px 0;
  }
  
  .content-section.alberi-section.full-width .container {
    padding: 0 18px;
  }
}

.section-intro.alberi-section {
  background: var(--color-bg);
  text-align: center;
}

.split-section { background: var(--color-bg); }

.split-section.reverse .split { flex-direction: row-reverse; }

.split {
  display: flex;
  align-items: stretch;
  gap: 48px;
  flex-wrap: nowrap;
}

.split-image-alberi {
  flex: 0 0 52%;
  min-height: 420px;
  background-size: cover;
  background-position: center;
  border-radius: 2px;
  border: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  will-change: transform, filter;
  transition: transform 0.65s var(--split-ease), filter 0.65s var(--split-ease);
}

.split-image-alberi-fesr {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  min-height: 520px;
}

.split-image-alberi::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 15%, rgba(255, 255, 255, 0.22) 48%, transparent 82%);
  transform: translateX(-125%);
  transition: transform 0.95s var(--split-ease);
  pointer-events: none;
}

.split-content {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-section:hover .split-image-alberi {
  transform: translateY(-4px) scale(1.015);
  filter: saturate(1.04) contrast(1.03);
}

.split-section:hover .split-image-alberi::after {
  transform: translateX(125%);
}

@supports (animation-timeline: view()) {
  .split-section .split-image-alberi {
    animation: splitImageReveal 1s var(--split-ease) both;
    animation-timeline: view();
    animation-range: entry 12% cover 42%;
  }
  
  .split-section .split-content > * {
    opacity: 0;
    animation: splitTextReveal 0.9s var(--split-ease) both;
    animation-timeline: view();
    animation-range: entry 18% cover 44%;
  }
  
  .split-section .split-content > *:nth-child(1) { animation-delay: 0.05s; }
  .split-section .split-content > *:nth-child(2) { animation-delay: 0.12s; }
  .split-section .split-content > *:nth-child(3) { animation-delay: 0.19s; }
  .split-section .split-content > *:nth-child(4) { animation-delay: 0.26s; }
  .split-section .split-content > *:nth-child(5) { animation-delay: 0.33s; }
  .split-section .split-content > *:nth-child(6) { animation-delay: 0.4s; }
}

@supports not (animation-timeline: view()) {
  .split-section .split-image-alberi {
    animation: splitImageReveal 0.9s var(--split-ease) both;
  }
  
  .split-section .split-content > * {
    opacity: 0;
    animation: splitTextReveal 0.85s var(--split-ease) both;
  }
  
  .split-section .split-content > *:nth-child(1) { animation-delay: 0.06s; }
  .split-section .split-content > *:nth-child(2) { animation-delay: 0.13s; }
  .split-section .split-content > *:nth-child(3) { animation-delay: 0.2s; }
  .split-section .split-content > *:nth-child(4) { animation-delay: 0.27s; }
  .split-section .split-content > *:nth-child(5) { animation-delay: 0.34s; }
  .split-section .split-content > *:nth-child(6) { animation-delay: 0.41s; }
}

@keyframes splitImageReveal {
  from {
    opacity: 0;
    transform: translateY(22px) scale(1.03);
    filter: saturate(0.85) contrast(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1) contrast(1);
  }
}

@keyframes splitTextReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.split-content h2 {
  font-size: clamp(1.3rem, 1vw + 1.05rem, 2rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.split-content .subtitle {
  font-size: var(--fs-subtitle);
  color: var(--color-text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.split-content h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--color-text);
  margin-top: 20px;
  margin-bottom: 6px;
}

.split-content p, .split-content li {
  font-size: var(--fs-body);
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 10px;
}

.split-content ul {
  margin: 12px 0 16px 20px;
}

@media (max-width: 768px) {
  .split,
  .split-section .split,
  .split-section.reverse .split {
    flex-direction: column;
    align-items: unset;
    gap: 22px;
  }
  
  /* Reverse splits: su mobile il testo deve stare sopra l'immagine */
  .split.reverse {
    flex-direction: column-reverse;
  }
  
  .split-image-alberi {
    flex: 1 1 auto;
    min-height: 220px;
    border-radius: 16px;
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
    background-position: center;
    background-size: cover;
  }
  
  .split-content {
    flex: 1 1 auto;
  }
  
  .split-content > * {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  
  .split-content h2 {
    font-size: 1.3rem;
    line-height: 1.15;
  }
  
  .split-content p,
  .split-content li,
  .split-content .subtitle {
    font-size: 0.98rem;
  }
  
  .split-section:hover .split-image-alberi {
    transform: translateY(-2px) scale(1.01);
  }
}

@media (max-width: 560px) {
  .timeline-section .container,
  .gallery-section .container,
  .content-section.alberi-section.full-width .container,
  .video-section.alberi-section .section-title,
  .section-title,
  .section-lead {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .content-section.alberi-section,
  .gallery-section.alberi-section,
  .certs-section.alberi-section,
  .video-section.alberi-section,
  .timeline-section.alberi-section {
    padding-top: 72px;
    padding-bottom: 72px;
  }
  
  .timeline-section.alberi-section {
    padding-bottom: 96px;
  }
  
  .timeline-track {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .timeline-card {
    min-height: 0;
    padding: 14px 12px;
  }
  
  .timeline-card h3 {
    font-size: 0.8rem;
  }
  
  .timeline-description {
    font-size: 0.82rem;
    line-height: 1.55;
  }
}

/* ----- Gallery: no border ----- */
.gallery-section.alberi-section {
  padding: 100px 0 120px;
  background: #ededed;
  border-top: none;
  
}

[data-theme="dark"] .gallery-section.alberi-section {
  background: #222426;
}

.gallery-section .container {
  max-width: 100%;
  padding: 0 48px;
}

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 2.1fr);
  gap: 42px;
  align-items: stretch;
}

.gallery-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 14px 0 16px 20px;
  position: relative;
}

.gallery-copy::before {
  content: '';
  position: absolute;
  width: 3px;
  left: 2px;
  top: 6px;
  bottom: 6px;
  background: linear-gradient(180deg, #000000 0%, #ffffff 100%);
  border-radius: 2px;
}

.gallery-custom-title {
  font-family: 'Krona One', serif;
  font-size: clamp(2rem, 3.2vw + 1rem, 3.2rem);
  line-height: 0.95;
  color: var(--color-text);
  margin-bottom: 18px;
}

.gallery-custom-subtitle {
  font-size: var(--fs-subtitle);
  color: var(--color-text-muted);
  line-height: 1.55;
  max-width: 24ch;
}

.gallery-slider-column {
  min-width: 0;
}

@media (max-width: 768px) {
  .gallery-section .container {
    padding: 0 18px;
  }
  
  .gallery-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .gallery-copy {
    align-items: flex-start;
    text-align: left;
    padding: 0;
  }
  
  .gallery-copy::before {
    display: none;
  }
  
  .gallery-custom-title {
    font-size: clamp(1.9rem, 9vw, 3rem);
  }
  
  .gallery-custom-subtitle {
    max-width: none;
  }
}

#realizzazioni {
  scroll-margin-top: 100px;
}

.gallery-slider {
  position: relative;
  padding: 20px 64px 18px;
  border-radius: 24px;
}

.gallery-viewport {
  overflow: hidden;
  border-radius: 18px;
}

.gallery-alberi {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 24px) / 2);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px;
}

.gallery-alberi::-webkit-scrollbar {
  display: none;
}

.gallery-item-alberi {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  scroll-snap-align: start;
}

.gallery-item-alberi:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.2);
  border-color: var(--color-brown);
}

.gallery-item-alberi img {
  width: 100%;
  height: clamp(320px, 42vw, 500px);
  object-fit: cover;
  display: block;
  background: #e8e8e8;
  filter: saturate(1.02) contrast(1.03);
}

.gallery-item-alberi figcaption {
  padding: 14px 16px 15px;
  font-size: var(--fs-small);
  color: color-mix(in srgb, var(--color-text) 86%, white 14%);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-top: 1px solid color-mix(in srgb, var(--color-border) 74%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-bg) 94%, #f8f5ef) 0%, var(--color-bg) 100%);
}

.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  gap: 0;
}

.gallery-nav {
  display: flex;
  gap: 10px;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--color-border) 72%, var(--color-brown) 28%);
  background: color-mix(in srgb, var(--color-bg) 84%, #fff 16%);
  color: var(--color-text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  /* box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); */
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

[data-theme="dark"] .gallery-arrow {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(26, 27, 29, 0.78);
}

.gallery-arrow-left {
  left: 0;
}

.gallery-arrow-right {
  right: 0;
}

.gallery-arrow:hover {
  transform: translateY(calc(-50% - 3px)) scale(1.03);
  background: var(--color-anthracite);
  color: #fff;
}

.gallery-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: translateY(-50%);
}

.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  min-height: 14px;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: color-mix(in srgb, var(--color-text) 24%, transparent);
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, width 0.22s ease;
}

.gallery-dot.is-active {
  width: 24px;
  transform: none;
  background: var(--color-brown);
}

@media (max-width: 1200px) {
  .gallery-alberi {
    grid-auto-columns: calc((100% - 24px) / 2);
  }
}

@media (max-width: 700px) {
  .gallery-slider {
    padding: 10px 14px 10px;
    border-radius: 18px;
  }
  
  .gallery-alberi {
    grid-auto-columns: 100%;
    gap: 16px;
  }
  
  .gallery-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }
  
  .gallery-arrow-left {
    left: 2px;
  }
  
  .gallery-arrow-right {
    right: 2px;
  }
  
  .gallery-item-alberi img {
    height: 240px;
  }
  
  .gallery-controls {
    margin-top: 14px;
  }
}

@media (max-width: 768px) {
  .content-section.alberi-section,
  .gallery-section.alberi-section,
  .certs-section.alberi-section,
  .video-section.alberi-section,
  .timeline-section.alberi-section {
    padding: 72px 0;
  }
  
  .gallery-slider {
    padding: 16px 16px 14px;
  }
  
  .certs-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .cert-card {
    padding: 24px 18px;
    border-radius: 16px;
  }
}

@media (max-width: 560px) {
  .gallery-slider {
    padding: 8px 0 8px;
    border-radius: 14px;
    overflow: hidden;
  }
  
  .gallery-item-alberi img {
    height: 220px;
  }
  
  .gallery-section .container {
    padding-left: 14px;
    padding-right: 14px;
  }
  
  .gallery-item-alberi figcaption {
    padding: 12px;
    font-size: 0.85rem;
  }
}

/* ----- Certificazioni ----- */
.certs-section.alberi-section {
  padding: 100px 0 120px;
  background: var(--color-bg);
  border-top: none;
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.cert-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 32px 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.cert-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: var(--color-brown);
}

.cert-icon {
  display: block;
  width: clamp(120px, 14vw, 170px);
  height: 150px;
  margin-bottom: 20px;
  object-fit: contain;
  object-position: center;
}

.cert-icon[src*="etichetta_pefc"] {
  width: clamp(240px, 100vw, 360px);
}

.cert-icon[src*="logo_FITOK"] {
  width: clamp(145px, 16vw, 250px);
}

.cert-icon[src*="ce.jpg"],
.cert-icon[src*="ce.png"] {
  width: clamp(100px, 10vw, 125px);
  padding: 4px;
  filter: grayscale(1) contrast(2.2) brightness(0.25);
}

[data-theme="dark"] .cert-icon[src*="ce.jpg"],
[data-theme="dark"] .cert-icon[src*="ce.png"] {
  filter: grayscale(1) contrast(2.1) brightness(2.5);
}

.cert-name {
  font-weight: 600;
  font-size: clamp(1rem, 0.24vw + 0.96rem, 1.12rem);
  color: var(--color-text);
  margin-bottom: 8px;
}

.cert-desc {
  font-size: var(--fs-small);
  color: var(--color-text-light);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}

.cert-link {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-text-muted);
}

.cert-link:hover {
  text-decoration: underline;
  color: var(--color-brown);
}

.cert-card:hover .cert-link { color: var(--color-text); }

/* ----- Prodotti dinamici ----- */
.products-section {
  background: #ededed;
  border-top: none;
}

[data-theme="dark"] .products-section {
  background: #222426;
}

.products-shell {
  max-width: 1280px;
  padding: 0 48px;
}

.products-title {
  color: var(--color-text);
}

.products-lead {
  color: var(--color-text-muted);
}

.products-content {
  margin-top: 32px;
}

.products-page-fragment > #prodotti.split-section {
  background: transparent;
}

.products-page-fragment > #prodotti .split {
  gap: 40px;
}

.products-page-fragment > .gallery-section.alberi-section {
  padding-top: 40px;
  padding-bottom: 72px;
}

.products-page-fragment > .gallery-section.alberi-section:last-child {
  padding-bottom: 56px;
}

.products-intro-copy,
.products-empty-state {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.products-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-brown);
  margin-bottom: 10px;
}

.products-subtitle {
  font-family: "Krona One", sans-serif;
  font-size: clamp(1.9rem, 2.8vw + 1rem, 3rem);
  line-height: 0.96;
  color: var(--color-text);
  margin-bottom: 14px;
}

.products-copy {
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--color-text-light);
}

.griglia-prodotti {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card-prodotto {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-bg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.card-prodotto img,
.card-prodotto-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-brown) 16%, transparent) 0%, color-mix(in srgb, var(--color-bg) 88%, white 12%) 100%);
}

.card-prodotto-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.card-prodotto-body {
  padding: 20px 20px 24px;
}

.card-prodotto h3 {
  font-size: clamp(1.04rem, 0.46vw + 0.94rem, 1.26rem);
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 10px;
}

.card-prodotto p {
  font-size: var(--fs-small);
  line-height: 1.65;
  color: var(--color-text-light);
}

.bottom-menu-item.is-active {
  background: color-mix(in srgb, var(--color-brown) 12%, transparent);
}

@media (max-width: 768px) {
  .products-shell {
    padding: 0 24px;
  }
  
  .products-content {
    margin-top: 24px;
  }
  
  .products-page-fragment > .gallery-section.alberi-section {
    padding-top: 24px;
    padding-bottom: 48px;
  }
  
  .products-page-fragment > .gallery-section.alberi-section:last-child {
    padding-bottom: 40px;
  }
}

/* ----- Footer ----- */
.site-footer.alberi-footer {
  padding: 72px 0 34px;
  background: var(--color-anthracite);
  color: rgba(255, 255, 255, 0.85);
}

.site-footer.alberi-footer .container {
  max-width: 1320px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 28px;
  align-items: center;
  justify-items: stretch;
  margin-bottom: 14px;
  padding: 24px 26px 12px 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 16px;
  }
  
  .alberi-footer .footer-brand,
  .alberi-footer .footer-contacts-col,
  .alberi-footer .footer-bottom {
    text-align: center;
    justify-content: center;
  }
}

.alberi-footer .footer-brand {
  font-size: 1.04rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-self: start;
}

.alberi-footer .footer-brand strong {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #ffffff;
  margin-top: 2px;
}

.alberi-footer .site-logo-footer {
  display: block;
  height: 120px;
  width: 340px;
  padding: 10px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.32);
  border: 3px solid #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  filter: brightness(1.18) contrast(1.18) drop-shadow(0 2px 12px #fff8);
  opacity: 1;
  transition: all 0.3s;
}

/* Logo SVG footer indipendente */
.logo-footer-svg {
  width: clamp(220px, 22vw, 320px) !important;
  height: auto;
  max-height: 130px;
  display: block;
  margin: 0 auto;
  filter: brightness(1.7) contrast(1.16) saturate(1.08) drop-shadow(0 10px 26px rgba(255, 255, 255, 0.32)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.12));
}

.alberi-footer .footer-contacts-col p {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.alberi-footer .footer-contacts-col-address {
  text-align: center;
  justify-self: center;
  align-self: center;
}

.alberi-footer .footer-contacts-col-direct {
  text-align: right;
  justify-self: end;
}

.alberi-footer .footer-contacts-col p:last-child {
  margin-bottom: 0;
}

.alberi-footer .footer-contacts-col a {
  color: rgba(255, 255, 255, 0.95);
  text-underline-offset: 3px;
}

.alberi-footer .footer-contacts-col a:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .alberi-footer .footer-brand,
  .alberi-footer .footer-contacts-col-address,
  .alberi-footer .footer-contacts-col-direct {
    justify-self: center;
    text-align: center;
  }
  
  .alberi-footer .footer-brand {
    gap: 12px;
  }
  
  .alberi-footer .footer-brand strong {
    font-size: 0.98rem;
  }
  
  .footer-grid {
    padding: 24px 18px;
    border-radius: 18px;
  }
  
  .alberi-footer .site-logo-footer {
    width: clamp(176px, 58vw, 220px);
    height: auto;
  }
  
  .alberi-footer .logo-footer-svg {
    width: clamp(200px, 62vw, 260px) !important;
  }
  
  .alberi-footer .footer-contacts-col p,
  .alberi-footer .footer-bottom {
    font-size: 0.94rem;
  }
}

.alberi-footer .footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

/* ----- Back to top ----- */
.back-to-top {
  position: fixed;
  bottom: 82px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-anthracite);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 999;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 66px;
    right: 16px;
  }
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-brown);
  color: #fff;
}

/* ----- Timeline mobile fix: comportamento uniforme su tutte le card ----- */
@media (max-width: 900px) {
  .timeline-card {
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--color-border) 78%, #ffffff 22%);
    background:
    linear-gradient(160deg, color-mix(in srgb, var(--color-bg) 94%, #ffffff 6%) 0%, color-mix(in srgb, var(--color-bg) 88%, #ffffff 12%) 100%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transform: none;
    transition: transform 0.35s var(--timeline-ease-pop), box-shadow 0.35s var(--timeline-ease-pop), border-color 0.35s var(--timeline-ease-pop), background 0.35s var(--timeline-ease-pop);
  }
  
  .timeline-card:hover,
  .timeline-card:active,
  .timeline-card:focus-within,
  .timeline-card:focus-visible {
    transform: translateY(-8px) scale(1.02);
    border-color: color-mix(in srgb, var(--color-brown) 52%, var(--color-border) 48%);
    background: linear-gradient(160deg, color-mix(in srgb, #ffffff 88%, var(--color-bg) 12%) 0%, color-mix(in srgb, var(--color-bg) 90%, #ffffff 10%) 100%);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.18);
    animation-play-state: paused;
  }
  
  .timeline-card:hover .timeline-year,
  .timeline-card:active .timeline-year,
  .timeline-card:focus-within .timeline-year,
  .timeline-card:focus-visible .timeline-year,
  .timeline-card:hover h3,
  .timeline-card:active h3,
  .timeline-card:focus-within h3,
  .timeline-card:focus-visible h3 {
    transform: translateY(-2px);
  }
  
  .timeline-card h3 {
    width: 100%;
    margin: 10px 0 0;
    padding: 0 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    text-align: left;
    font-size: 0.82rem;
    line-height: 1.35;
    color: color-mix(in srgb, var(--color-text) 88%, #000000 12%);
    background: color-mix(in srgb, var(--color-bg) 96%, #ffffff 4%);
    border: 0 solid color-mix(in srgb, var(--color-border) 84%, #ffffff 16%);
    border-radius: 14px 14px 0 0;
    pointer-events: none;
    transition: max-height 0.36s var(--timeline-ease-pop), opacity 0.28s var(--timeline-ease-pop), padding 0.28s var(--timeline-ease-pop), transform 0.28s var(--timeline-ease-pop);
  }
  
  .timeline-card .timeline-description {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    padding: 0 10px;
    max-height: 0;
    opacity: 0;
    border: 1px solid color-mix(in srgb, var(--color-border) 84%, #ffffff 16%);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: color-mix(in srgb, var(--color-bg) 96%, #ffffff 4%);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
    text-align: left;
    pointer-events: none;
    filter: blur(1.6px);
    overflow: hidden;
    transition: max-height 0.4s var(--timeline-ease-pop), opacity 0.3s var(--timeline-ease-pop), padding 0.3s var(--timeline-ease-pop), filter 0.3s var(--timeline-ease-pop), transform 0.3s var(--timeline-ease-pop);
  }
  
  .timeline-card:hover .timeline-description,
  .timeline-card:active .timeline-description,
  .timeline-card:focus-within .timeline-description,
  .timeline-card:focus-visible .timeline-description {
    max-height: 420px;
    opacity: 1;
    transform: translateY(0);
    padding: 10px 12px 12px;
    filter: blur(0);
    pointer-events: auto;
  }
  
  .timeline-card:hover h3,
  .timeline-card:active h3,
  .timeline-card:focus-within h3,
  .timeline-card:focus-visible h3 {
    opacity: 1;
    max-height: 80px;
    transform: translateY(0);
    padding: 10px 12px 2px;
    border-width: 1px;
    pointer-events: auto;
  }
  
  .timeline-card:focus-within,
  .timeline-card:focus-visible {
    outline: none;
    border-color: color-mix(in srgb, var(--color-brown) 52%, var(--color-border) 48%);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.18);
  }
}

/* ----- Mobile refinements for narrow viewports ----- */
@media (max-width: 390px) {
  .floating-insta-btn {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    bottom: 18px;
  }
  
  body.home .floating-insta-btn {
    left: 16px !important;
  }
  
  .theme-toggle {
    width: 38px;
    height: 38px;
    bottom: 12px;
    right: 12px;
  }
  
  .back-to-top {
    width: 38px;
    height: 38px;
    bottom: 58px;
    right: 12px;
    font-size: 1rem;
  }
  
  .container {
    padding: 0 16px;
  }
}

/* ----- Fade on scroll ----- */
.fade-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.fade-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside a section */
.fade-on-scroll-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.fade-on-scroll-children.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.fade-on-scroll-children.is-visible > *:nth-child(1) { transition-delay: 0s; }
.fade-on-scroll-children.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.fade-on-scroll-children.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.fade-on-scroll-children.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.fade-on-scroll-children.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.fade-on-scroll-children.is-visible > *:nth-child(6) { transition-delay: 0.4s; }
.fade-on-scroll-children.is-visible > *:nth-child(7) { transition-delay: 0.48s; }
.fade-on-scroll-children.is-visible > *:nth-child(8) { transition-delay: 0.56s; }

@media (prefers-reduced-motion: reduce) {
  .fade-on-scroll,
  .fade-on-scroll-children > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
