/* ===== Flyer Gym: componenti condivisi ===== */

/* --- Navbar --- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); border-bottom: 1px solid transparent; transition: border-color .25s; }
/* Lo sfondo sta su un pseudo-elemento: backdrop-filter sul .nav romperebbe il menu a tutto schermo. */
.nav::before {
    content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .25s;
    background: rgba(27, 29, 28, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav.is-solid { border-color: var(--line); }
.nav.is-solid::before { opacity: 1; }
.nav__in { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; position: relative; z-index: 61; }
.brand img { height: 48px; width: auto; }
.brand__t { display: flex; flex-direction: column; line-height: 1.1; }
.brand__t b { font: 800 1.15rem var(--f-head); letter-spacing: -.01em; }
.brand__t small { color: var(--green-text); font-size: .78rem; font-weight: 600; }

.nav__btn {
    position: relative; z-index: 61; width: 44px; height: 44px; padding: 0; border: 0; background: none;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; cursor: pointer;
}
.nav__btn span { width: 26px; height: 3px; border-radius: 2px; background: var(--green-text); transition: transform .3s, opacity .2s; }
.nav__btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav__btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Mobile: menu a tutto schermo */
.nav__menu {
    position: fixed; inset: 0; z-index: 60; background: var(--bg);
    display: flex; flex-direction: column; justify-content: center; gap: .25rem; padding: 6rem 1.5rem 2rem;
    visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s;
}
.nav__menu.is-open { visibility: visible; opacity: 1; }
.nav__menu a:not(.btn) {
    font: 800 1.9rem var(--f-head); letter-spacing: -.01em; text-decoration: none; padding: .5rem 0;
    border-bottom: 2px solid transparent; width: fit-content;
}
.nav__menu a[aria-current] { border-color: var(--green); }
.nav__cta { margin-top: 1.25rem; align-self: flex-start; }

@media (min-width: 960px) {
    .nav__btn { display: none; }
    .nav__menu {
        position: static; inset: auto; z-index: auto; background: none; padding: 0;
        flex-direction: row; align-items: center; gap: 1.6rem; visibility: visible; opacity: 1;
    }
    .nav__menu a:not(.btn) { font: 600 .98rem var(--f-body); letter-spacing: 0; padding: .35rem 0; }
    .nav__menu a:not(.btn):hover { color: var(--green-text); }
    .nav__cta { margin: 0 0 0 .5rem; padding: .6rem 1.3rem; }
}

/* --- Tessere logo (sponsor, partner, affiliati) --- */
.tile {
    display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 12px;
    padding: .9rem 1.1rem; aspect-ratio: 3 / 2; transition: transform .2s, box-shadow .2s;
}
.tile img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
a.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }

/* --- Footer --- */
.foot { background: var(--bg); border-top: 1px solid var(--line); padding: 3rem 0 6rem; color: var(--muted); font-size: .95rem; }
.foot__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.foot__h { color: var(--ink); font-weight: 700; margin: 0 0 .15rem; }
.foot p { margin-bottom: .9rem; }
.foot__links { display: flex; flex-direction: column; gap: .5rem; }
.foot__links a { text-decoration: none; width: fit-content; }
.foot__links a:hover { color: var(--green-text); }
.foot__note { margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; }

/* --- Banner cookie --- */
.cookie {
    position: fixed; z-index: 90; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
    width: min(46rem, calc(100% - 2rem)); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    padding: .9rem 1.1rem .9rem 1.6rem; background: rgba(27, 29, 28, .97); border: 1px solid var(--green);
    border-radius: 999px; box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
}
.cookie p { margin: 0; font-size: .95rem; }
.cookie .btn { padding: .6rem 1.4rem; white-space: nowrap; }
@media (max-width: 640px) {
    .cookie { flex-direction: column; text-align: center; border-radius: 20px; padding: 1.25rem; gap: 1rem; }
    .cookie .btn { width: 100%; }
}

/* --- Responsive extra --- */
@media (max-width: 640px) {
    .foot { text-align: center; }
    .foot__links { align-items: center; margin-inline: auto; }
}
@media (max-width: 380px) {
    .brand__t small { display: none; }
}

/* --- Testata delle pagine interne (immagine passata con --hero-img) --- */
.page-hero {
    position: relative; display: flex; align-items: center; text-align: center;
    min-height: clamp(19rem, 46svh, 27rem); padding: calc(var(--nav-h) + 2rem) 0 3rem;
    background:
        var(--fade-top),
        linear-gradient(180deg, rgba(27, 29, 28, .45), rgba(27, 29, 28, .6) 60%, var(--bg)),
        var(--hero-img) center 35% / cover no-repeat;
}
.page-hero h1 { font-size: clamp(2.2rem, 7vw, 4.2rem); line-height: 1; max-width: 16ch; margin-inline: auto; text-wrap: balance; }
.page-hero p { margin: 1rem auto 0; max-width: 34rem; color: var(--green); font-weight: 800; font-size: clamp(1rem, 2.2vw, 1.25rem); text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }

/* --- Chiusura di pagina con invito a contattarci --- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.cta-band p { color: var(--muted); max-width: 34rem; margin: 1rem auto 1.75rem; }
.cta-band__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

/* --- Griglia di logo (home e pagina convenzioni) --- */
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.logos .tile { flex: 0 0 calc(50% - .5rem); }
@media (min-width: 600px) {
    .logos .tile { flex-basis: 10.5rem; }
    .logos--small .tile { flex-basis: 8.5rem; }
}

/* --- Immagini ingrandibili: pulsante + finestra interna --- */
.zoom { position: relative; display: block; max-width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom::after {
    content: "+"; position: absolute; right: .5rem; bottom: .5rem; display: grid; place-items: center;
    width: 1.8rem; height: 1.8rem; border-radius: 50%; background: rgba(27, 29, 28, .85); color: var(--ink); font: 800 1.1rem/1 var(--f-body);
}
.lightbox {
    width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 4rem 1rem 1.5rem; border: 0;
    background: rgba(12, 14, 13, .94); color: var(--ink); place-items: center;
}
.lightbox[open] { display: grid; }
.lightbox img {
    max-width: 100%;
    max-height: calc(100vh - 5.5rem);
    max-height: calc(100dvh - 5.5rem);
    width: auto; height: auto; object-fit: contain; border-radius: 10px;
}
.lightbox__close {
    position: absolute; top: max(1rem, env(safe-area-inset-top)); right: 1rem; width: 2.75rem; height: 2.75rem;
    border: 2px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--ink); font: 400 1.7rem/1 var(--f-body); cursor: pointer;
}
.lightbox__close:hover { border-color: var(--green); }