/* Site header + navigation (sostituisce la barra/popup Sitely in homepage) */

.age-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.age-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10050;
  font-size: 1rem;
  line-height: 1.4;
  font-family: var(--age-font-sans);
  color: var(--age-cream);
  -webkit-font-smoothing: antialiased;
}

.age-header__bar {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--age-header-offset);
  padding: 0.35rem clamp(0.75rem, 3vw, 1.5rem);
  background: var(--age-header-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.age-header__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.age-header__brand img {
  display: block;
  height: clamp(2.65rem, 6.25vw, 3.55rem);
  width: auto;
}

.age-header__nav {
  display: none;
  flex: 1;
  justify-content: center;
}

@media (min-width: 1100px) {
  .age-header__nav {
    display: flex;
  }
}

.age-header__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.35rem;
}

.age-header__list a {
  display: block;
  padding: 0.4rem 0.55rem;
  font-size: clamp(0.8rem, 0.65vw + 0.72rem, 0.95rem);
  font-weight: 600;
  color: var(--age-cream);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.age-header__list a:hover,
.age-header__list a:focus-visible {
  color: var(--age-text-dark);
  background: var(--age-gold);
  outline: none;
}

.age-header__list a[aria-current="page"] {
  color: var(--age-gold);
  box-shadow: inset 0 -2px 0 var(--age-gold);
}

.age-header__tools {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex-shrink: 0;
}

.age-header__phone {
  display: none;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--age-text-dark);
  background: var(--age-gold);
  border-radius: var(--age-radius-btn);
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid rgba(244, 244, 239, 0.85);
  transition: filter 0.15s ease;
}

@media (min-width: 640px) {
  .age-header__phone {
    display: inline-flex;
    align-items: center;
  }
}

.age-header__phone:hover,
.age-header__phone:focus-visible {
  filter: brightness(1.05);
  outline: none;
}

.age-header__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  /* Sitely export: body font-size 0 — keep icon legible */
  font-size: 1rem;
  line-height: 1;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  border: 2px solid rgba(244, 244, 239, 0.4);
  border-radius: var(--age-radius-btn);
  background: rgba(255, 255, 255, 0.1);
  color: var(--age-cream);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.age-header__toggle:hover,
.age-header__toggle:focus-visible {
  background: rgba(255, 216, 77, 0.35);
  border-color: var(--age-gold);
  color: var(--age-text-dark);
  outline: none;
}

/* Icona quadrata: tre segmenti equidistanti (evita path 448×512 compresso in quadrato) */
.age-header__toggle svg {
  display: block;
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
  overflow: visible;
  pointer-events: none;
  vertical-align: middle;
}

@media (min-width: 1100px) {
  .age-header__toggle {
    display: none;
  }
}

/* Pannello mobile */
.age-header__panel {
  position: fixed;
  top: var(--age-header-offset);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10040;
  padding: 1.25rem clamp(1rem, 4vw, 1.75rem) 2rem;
  overflow-y: auto;
  background: var(--age-header-bg-panel);
  color: var(--age-cream);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateX(100%);
  visibility: hidden;
  /* Chiuso: non intercettare clic verso il contenuto (iframe YouTube, ecc.) */
  pointer-events: none;
  transition:
    transform 0.28s ease,
    visibility 0.28s ease;
}

.age-header.is-open .age-header__panel {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

@media (min-width: 1100px) {
  .age-header__panel {
    display: none;
  }
}

.age-header__panel-nav .age-header__list {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
}

.age-header__panel-nav .age-header__list a {
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  border-radius: var(--age-radius-btn);
  border: 1px solid rgba(244, 244, 239, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--age-cream);
}

.age-header__panel-cta {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.age-header__panel-cta a,
.age-header__panel-cta button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 1rem;
  font-family: var(--age-font-sans);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--age-radius-btn);
  cursor: pointer;
  border: 2px solid var(--age-cream);
  background: var(--age-gold);
  color: var(--age-text-dark);
}

.age-header__panel-cta a.secondary,
.age-header__panel-cta button.secondary {
  background: transparent;
  color: var(--age-cream);
  border-color: rgba(244, 244, 239, 0.55);
}
