/* ══════════════════════════════════════════════
 NAVBAR.CSS — Vaccinarsi
 Revisione: 2025/2026 Standards
 ══════════════════════════════════════════════ */

.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 9999;
background-color: var(--color-white);
transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            background-color 0.35s ease;
will-change: transform;
}

.navbar--hidden { transform: translateY(-100%); }
.navbar:not(.navbar--hidden) { transform: translateY(0); }
.navbar--transparent { background-color: transparent; }
.navbar--dropdown-open { background-color: var(--color-acqua) !important; }
.navbar .container { max-width: 100%; padding-inline: var(--space-6); }

/* ── Topbar ───────────────────────────────── */

.navbar__topbar {
padding: 10px 0;
border-bottom: 1px solid rgba(0, 73, 193, 0.12);
transition: border-color 0.35s ease;
}

.navbar--transparent .navbar__topbar { border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.navbar--dropdown-open .navbar__topbar { border-bottom: 1px solid rgba(0, 73, 193, 0.12); }

.navbar__topbar-inner {
display: flex;
align-items: center;
justify-content: flex-end;
gap: var(--space-6);
}

.navbar__topbar-link {
font-family: var(--font-primary);
font-size: var(--text-xs);
font-weight: var(--font-regular);
color: var(--color-blue);
transition: color var(--transition-fast);
}

.navbar--transparent .navbar__topbar-link { color: var(--color-white); }
.navbar--dropdown-open .navbar__topbar-link { color: var(--color-blue); }
.navbar__topbar-link:hover { color: var(--color-celeste); }

/* ── CTA Button ───────────────────────────── */

.btn--cta {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px 22px;
background-color: var(--color-celeste);
color: var(--color-blue);
border-radius: var(--radius-full);
font-family: var(--font-primary);
font-size: var(--text-xs);
font-weight: var(--font-regular);
white-space: nowrap;
border: none;
cursor: pointer;
transition: background-color var(--transition-base),
            color var(--transition-base),
            transform var(--transition-fast);
}

.btn--cta:hover {
background-color: var(--color-blue);
color: var(--color-white);
transform: translateY(-1px);
}

.btn--cta:active { transform: translateY(0); }

/* ── Main navbar ──────────────────────────── */

.navbar__main { padding: 14px 0; }

.navbar__inner {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
}

/* ── Logo ─────────────────────────────────── */

.navbar__logo {
display: block;
font-family: var(--font-primary);
font-size: var(--text-base);
font-weight: var(--font-bold);
line-height: 1.1;
color: var(--color-blue);
text-decoration: none;
white-space: nowrap;
position: relative;
z-index: 2;
flex-shrink: 0;
}

.navbar__logo .celeste { color: var(--color-celeste); }
.navbar--transparent .navbar__logo { color: var(--color-white); }
.navbar--transparent .navbar__logo .celeste { color: var(--color-celeste); }
.navbar--dropdown-open .navbar__logo { color: var(--color-blue); }
.navbar--dropdown-open .navbar__logo .celeste { color: var(--color-celeste); }

/* ── Nav links ────────────────────────────── */

.navbar__nav {
position: absolute;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: var(--space-8);
z-index: 1;
}

.navbar__nav-link {
font-family: var(--font-primary);
font-size: var(--text-base);
font-weight: var(--font-regular);
color: var(--color-blue);
white-space: nowrap;
transition: color var(--transition-fast);
cursor: pointer;
background: none;
border: none;
text-decoration: none;
display: inline-block;
}

.navbar__nav-link::after { display: none; }
.navbar__nav-link:hover { color: var(--color-celeste); }
.navbar--transparent .navbar__nav-link { color: var(--color-white); }
.navbar--transparent .navbar__nav-link:hover { color: var(--color-celeste); }
.navbar--dropdown-open .navbar__nav-link { color: var(--color-blue); }
.navbar__nav-link--dropdown.is-active { color: var(--color-celeste) !important; }

/* Reset completo per dropdown triggers (ora sono <button>) */
.navbar__nav-link--dropdown {
background: none;
border: none;
padding: 0;
margin: 0;
font-family: var(--font-primary);
font-size: var(--text-base);
font-weight: var(--font-regular);
color: var(--color-blue);
line-height: inherit;
cursor: pointer;
display: inline-flex;
align-items: center;
vertical-align: baseline;
min-height: unset;
min-width: unset;
-webkit-appearance: none;
appearance: none;
}

/* ── Hamburger ────────────────────────────── */

.navbar__hamburger {
display: none;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 5px;
background: none;
border: none;
cursor: pointer;
padding: 6px;
position: relative;
z-index: 2;
flex-shrink: 0;
}

.navbar__hamburger span {
display: block;
width: 26px;
height: 2px;
background-color: var(--color-blue);
border-radius: 2px;
transition: transform var(--transition-base),
            opacity var(--transition-base),
            background-color var(--transition-base);
transform-origin: center;
}

.navbar--transparent .navbar__hamburger span { background-color: var(--color-white); }
.navbar__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Dropdown ─────────────────────────────── */

.dropdown {
position: absolute;
top: 100%;
left: 0;
right: 0;
width: 100%;
background-color: var(--color-acqua);
visibility: hidden;
opacity: 0;
transform: translateY(-8px);
pointer-events: none;
transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
z-index: 100;
will-change: opacity, transform;
}

.dropdown.is-open {
visibility: visible;
opacity: 1;
transform: translateY(0);
pointer-events: all;
}

/* Sync aria-hidden con visibilità */
.dropdown[aria-hidden="true"] {
visibility: hidden;
opacity: 0;
transform: translateY(-8px);
pointer-events: none;
}

.dropdown[aria-hidden="false"] {
visibility: visible;
opacity: 1;
transform: translateY(0);
pointer-events: all;
}

.dropdown__inner {
display: flex;
justify-content: center;
align-items: flex-start;
padding: var(--space-10) 0;
}

.dropdown__links {
display: flex;
flex-direction: row;
gap: var(--space-8);
justify-content: center;
align-items: flex-start;
}

.dropdown__links--2col { width: 40%; max-width: 600px; }
.dropdown__links--3col { width: 60%; max-width: 800px; }

.dropdown__col {
flex: 1;
display: flex;
flex-direction: column;
gap: var(--space-3);
}

.dropdown__link {
font-family: var(--font-primary);
font-size: var(--text-sm);
font-weight: var(--font-regular);
color: var(--color-blue);
text-decoration: none;
line-height: 1.6;
display: flex;
align-items: center;
gap: 0;
transition: color var(--transition-fast), gap var(--transition-base);
}

.dropdown__link::before {
content: '›';
flex-shrink: 0;
color: var(--color-celeste);
font-size: var(--text-base);
font-weight: var(--font-bold);
opacity: 0;
max-width: 0;
overflow: hidden;
transition: opacity var(--transition-fast), max-width var(--transition-base);
}

.dropdown__link:hover { color: var(--color-celeste); gap: var(--space-2); }
.dropdown__link:hover::before { opacity: 1; max-width: 20px; }

/* ── Overlays ─────────────────────────────── */

.page-blur-overlay {
position: fixed;
top: var(--navbar-height);
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.30);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
z-index: 9998;
visibility: hidden;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-blur-overlay.is-active {
visibility: visible;
opacity: 1;
pointer-events: all;
}

.mobile-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.30);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
z-index: 99998;
visibility: hidden;
opacity: 0;
pointer-events: none;
transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-overlay.is-active {
visibility: visible;
opacity: 1;
pointer-events: all;
}

/* ── Mobile Menu ──────────────────────────── */

.navbar__mobile {
position: fixed;
top: 0;
right: 0;
width: 80%;
max-width: 400px;
height: 100vh;
height: 100dvh;
background-color: var(--color-white);
z-index: 99999;
transform: translateX(100%);
transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
overflow: hidden;
will-change: transform;
overscroll-behavior: contain;
}

.navbar__mobile.is-open { transform: translateX(0); }

.mobile-panel {
background-color: var(--color-white);
transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
contain: layout style;
}

.mobile-panel--l1 {
display: flex;
flex-direction: column;
padding: var(--space-6);
height: 100vh;
height: 100dvh;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
transform: translateX(0);
position: relative;
}

.mobile-panel--l1.slide-out {
transform: translateX(-100%);
height: 0;
min-height: 0;
overflow: hidden;
padding: 0;
}

.mobile-panel--l2 {
display: flex;
flex-direction: column;
height: 0;
overflow: hidden;
transform: translateX(100%);
position: relative;
}

.mobile-panel--l2.slide-in {
transform: translateX(0);
height: 100vh;
height: 100dvh;
overflow: hidden;
}

.mobile-panel--l1 .mobile-close,
.mobile-panel--l2 .mobile-close {
position: absolute;
top: var(--space-6);
right: var(--space-6);
background: none;
border: none;
cursor: pointer;
font-size: var(--text-lg);
font-weight: var(--font-bold);
color: var(--color-blue);
padding: var(--space-2);
line-height: 1;
z-index: 10;
transition: color var(--transition-fast);
}

.mobile-panel--l1 .mobile-close:hover,
.mobile-panel--l2 .mobile-close:hover {
color: var(--color-celeste);
}

.mobile-back {
position: absolute;
top: var(--space-3);
left: var(--space-6);
background: none;
border: none;
cursor: pointer;
font-family: var(--font-primary);
font-size: var(--text-4xl);
font-weight: var(--font-regular);
color: var(--color-blue);
padding: var(--space-2) 0;
z-index: 10;
transition: color var(--transition-fast);
}

.mobile-back:hover { color: var(--color-celeste); }

.mobile-panel-header { flex-shrink: 0; height: var(--space-16); }

.mobile-nav {
flex: 1;
display: flex;
flex-direction: column;
padding-top: var(--space-48);
}

.mobile-nav-link {
font-family: var(--font-primary);
font-size: var(--text-xl);
font-weight: var(--font-bold);
color: var(--color-blue);
padding: var(--space-4) 0;
text-decoration: none;
background: none;
border: none;
width: 100%;
text-align: left;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
transition: color var(--transition-fast);
}

.mobile-nav-link:hover { color: var(--color-celeste); }

.mobile-nav-arrow {
font-size: var(--text-xl);
color: var(--color-celeste);
flex-shrink: 0;
}

.mobile-secondary {
flex-shrink: 0;
margin-top: auto;
padding-top: var(--space-8);
display: flex;
flex-direction: column;
gap: var(--space-1);
}

.mobile-secondary-link {
font-family: var(--font-primary);
font-size: var(--text-base);
font-weight: var(--font-bold);
color: var(--color-blue);
padding: var(--space-3) 0;
text-decoration: none;
transition: color var(--transition-fast);
}

.mobile-secondary-link:hover { color: var(--color-celeste); }

.btn--cta-mobile {
margin-top: var(--space-4);
width: 100%;
justify-content: center;
padding: 12px 22px;
font-size: var(--text-base);
}

.mobile-panel-title {
flex-shrink: 0;
font-family: var(--font-primary);
font-size: var(--text-xl);
font-weight: var(--font-bold);
color: var(--color-blue);
padding: var(--space-48) var(--space-6) var(--space-4);
}

.mobile-subnav {
flex: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
display: flex;
flex-direction: column;
padding: 0 var(--space-6) var(--space-6);
}

.mobile-subnav-link {
font-family: var(--font-primary);
font-size: var(--text-base);
font-weight: var(--font-regular);
color: var(--color-blue);
padding: var(--space-3) 0;
text-decoration: none;
flex-shrink: 0;
transition: color var(--transition-fast);
}

.mobile-subnav-link:hover { color: var(--color-celeste); }

/* ── Page body offset ─────────────────────── */

body.page-home { padding-top: var(--navbar-height); }
body.page-interna { padding-top: 0; }

/* ── Hero Home ────────────────────────────── */

.hero-home {
display: grid;
grid-template-columns: 1fr 1fr;
width: 100%;
min-height: 70vh;
background-color: var(--color-white);
}

.hero-home__content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: var(--space-16) var(--space-12);
}

.hero-home__title {
font-family: var(--font-primary);
font-size: var(--text-5xl);
font-weight: var(--font-bold);
line-height: var(--leading-tight);
color: var(--color-blue);
margin-bottom: var(--space-10);
}

.hero-home__title .celeste { color: var(--color-celeste); }

.btn--hero {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 14px 40px;
background-color: var(--color-celeste);
color: var(--color-blue);
border-radius: var(--radius-full);
font-family: var(--font-primary);
font-size: var(--text-base);
font-weight: var(--font-bold);
border: none;
cursor: pointer;
text-decoration: none;
transition: background-color var(--transition-base), transform var(--transition-fast);
}

.btn--hero:hover {
background-color: var(--color-blue);
color: var(--color-white);
transform: translateY(-2px);
}

.hero-home__foto { overflow: hidden; }

.hero-home__foto img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center top;
display: block;
}

/* ── Hero Foto (interna) ──────────────────── */

.hero-foto {
position: relative;
width: 100%;
height: 80vh;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
display: flex;
align-items: flex-end;
}

.hero-foto::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.40);
z-index: 1;
}

.hero-foto__content {
position: relative;
z-index: 2;
width: 100%;
padding: 0 var(--grid-margin) var(--space-6);
}

/* ── Breadcrumb ───────────────────────────── */

.hero-foto__breadcrumb {
display: flex;
align-items: center;
gap: var(--space-2);
margin-bottom: var(--space-4);
font-family: var(--font-primary);
font-size: var(--text-sm);
color: var(--color-white);
}

/* Stile per <ol> — sostituzione inline styles */
.hero-foto__breadcrumb-list {
display: flex;
align-items: center;
gap: 8px;
list-style: none;
padding: 0;
margin: 0;
}

.hero-foto__breadcrumb-list li {
list-style: none;
display: flex;
align-items: center;
}

.hero-foto__breadcrumb-link {
color: var(--color-white);
text-decoration: none;
transition: color var(--transition-fast);
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.hero-foto__breadcrumb-link:hover { color: var(--color-celeste); }

.hero-foto__breadcrumb-sep {
color: rgba(255, 255, 255, 0.6);
flex-shrink: 0;
}

.hero-foto__breadcrumb-current {
color: rgba(255, 255, 255, 0.8);
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.hero-foto__title {
font-family: var(--font-primary);
font-size: var(--text-6xl);
font-weight: var(--font-bold);
line-height: var(--leading-tight);
color: var(--color-white);
max-width: 60%;
}

/* ── Subnav ───────────────────────────────── */

.subnav {
position: sticky;
top: var(--navbar-height);
z-index: 9997;
background-color: var(--color-white);
border-bottom: none;
transition: top 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.subnav__track {
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-10);
padding: var(--space-4) var(--space-6);
white-space: nowrap;
background-color: var(--color-acqua);
}

.subnav__link {
font-family: var(--font-primary);
font-size: var(--text-base);
font-weight: var(--font-regular);
color: var(--color-blue);
text-decoration: none;
padding: var(--space-2) 0;
position: relative;
transition: color var(--transition-fast);
flex-shrink: 0;
}

.subnav__link:hover { color: var(--color-celeste); }

.subnav__link.is-active {
color: var(--color-celeste);
font-weight: var(--font-bold);
}

/* ══════════════════════════════════════════════
 ≤ 1280px
 ══════════════════════════════════════════════ */
@media (max-width: 1280px) {
.navbar__nav { gap: var(--space-6); }
.dropdown__links--2col { width: 50%; }
.dropdown__links--3col { width: 70%; }
}

/* ══════════════════════════════════════════════
 ≤ 1024px
 ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
.navbar__nav { gap: var(--space-4); }
.hero-home__content { padding: var(--space-12) var(--space-8); }
.hero-foto__content { padding: 0 var(--space-10) var(--space-12); }
.hero-foto__title { max-width: 80%; }
.dropdown__links--2col { width: 60%; }
.dropdown__links--3col { width: 80%; }
.dropdown__links { gap: var(--space-6); }
}

/* ══════════════════════════════════════════════
 ≤ 768px
 ══════════════════════════════════════════════ */
@media (max-width: 768px) {
/* Navbar */
.navbar__topbar { display: none; }
.navbar__nav { display: none; }
.navbar__hamburger { display: flex; }
.dropdown { display: none !important; }

/* Hero home */
.hero-home { grid-template-columns: 1fr; grid-template-rows: auto 40vh; }
.hero-home__content { padding: var(--space-10) var(--space-6); }

/* Hero interna */
.hero-foto__title { max-width: 100%; }
.hero-foto__content { padding: 0 var(--space-6) var(--space-10); }
.hero-foto__breadcrumb-link,
.hero-foto__breadcrumb-current { max-width: 180px; }

/* Subnav scroll orizzontale */
.subnav {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}
.subnav__track {
  justify-content: flex-start;
  gap: var(--space-6);
  padding: var(--space-4);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.subnav__track::-webkit-scrollbar { display: none; }
.subnav__track.is-dragging { cursor: grabbing; scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════
 ≤ 480px
 ══════════════════════════════════════════════ */
@media (max-width: 480px) {
.hero-home { grid-template-rows: auto 35vh; }
}