@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Font del titolo - Hemi Head (branding/font/font.otf) */
@font-face {
    font-family: 'TitleFont';
    src: url('../branding/font/font.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Palette brand Malnate: rosso, oro, bianco */
    --red: #F92226;
    --red-dark: #c51c1f;
    --gold: #B29771;
    --white: #ffffff;

    /* Neutri caldi */
    --ink: #2a0e0b;            /* testo principale */
    --muted: #8a5048;          /* testo secondario */
    --ink-on-gold: #3a2400;    /* testo scuro sui fondi oro */

    /* Superfici */
    --bg: #faf6f4;             /* canvas near-white caldo */
    --surface: #ffffff;
    --surface-2: #fbf7f5;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-strong: rgba(255, 255, 255, 0.94);
    --line: rgba(42, 14, 11, 0.10);         /* hairline neutra */
    --line-gold: rgba(178, 151, 113, 0.45);  /* hairline oro */
    --card-border: rgba(42, 14, 11, 0.08);

    /* Ombre morbide */
    --shadow-sm: 0 1px 2px rgba(42, 14, 11, 0.04), 0 6px 18px rgba(42, 14, 11, 0.06);
    --shadow-md: 0 2px 6px rgba(42, 14, 11, 0.05), 0 18px 44px rgba(42, 14, 11, 0.10);

    /* Raggi */
    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 24px;
    --r-pill: 999px;

    /* Scala di spaziatura */
    --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
    --sp-6: 32px; --sp-7: 48px;  --sp-8: 64px; --sp-9: 96px;

    /* Larghezze */
    --w-content: 1120px;
    --w-read: 720px;

    /* Alias di compatibilita' (nomi ancora usati da JS/inline) */
    --red-soft: var(--red-dark);
    --gold-soft: var(--gold);
    --text-primary: var(--ink);
    --text-secondary: var(--muted);
    --bg-primary: var(--bg);
    --accent: var(--red);
    --accent-hover: var(--red-dark);
    --shadow-subtle: var(--shadow-sm);
    --shadow-hover: var(--shadow-md);

    --title-font: 'TitleFont', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-x: clip;
}

::selection {
    background: var(--red);
    color: #fff;
}

a {
    color: var(--red);
}

img {
    max-width: 100%;
}

/* Eyebrow: piccola etichetta oro sopra i titoli di sezione */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-3);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--sp-3);
}

.eyebrow::before {
    content: '';
    width: 26px;
    height: 2px;
    background: var(--gold);
    display: inline-block;
}

.eyebrow.center {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Grechina: piccola silhouette del brand (ponte/asparagi) come ornamento di sezione */
.section-ornament {
    width: 116px;
    aspect-ratio: 1313 / 500;
    margin: 0 auto var(--sp-3);
    background-color: var(--gold);
    -webkit-mask: url('../branding/design.svg') center / contain no-repeat;
    mask: url('../branding/design.svg') center / contain no-repeat;
}

.section-ornament.left {
    margin-left: 0;
    margin-right: 0;
}


/* ===================== SFONDO STATICO ===================== */
/* Nessun canvas: canvas palloni rimosso dalla chrome del sito */
#app-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--bg);
    background-image:
        radial-gradient(1200px 600px at 100% -5%, rgba(249, 34, 38, 0.06), transparent 60%),
        radial-gradient(900px 500px at 0% 105%, rgba(178, 151, 113, 0.08), transparent 60%);
}

/* Watermark discreto della silhouette (asparagi) in basso */
#app-bg::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(1400px, 150%);
    aspect-ratio: 1313 / 500;
    background-color: rgba(42, 14, 11, 0.035);
    -webkit-mask: url('../branding/design.svg') bottom / contain no-repeat;
    mask: url('../branding/design.svg') bottom / contain no-repeat;
}

.content-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ===================== HEADER / NAVBAR ===================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-3) 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(250, 246, 244, 0.82);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    z-index: -1;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    text-decoration: none;
    color: var(--red);
}

.logo-img {
    height: 54px;
    width: auto;
}

.logo-text {
    font-family: var(--title-font);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.15;
    max-width: 240px;
    color: var(--red);
}

.auth-section {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}

.btn {
    padding: 12px 22px;
    border-radius: var(--r-pill);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    border: 1px solid transparent;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    line-height: 1;
}

.btn-primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 8px 20px rgba(249, 34, 38, 0.22);
}

.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
}

.btn-gold {
    background: var(--gold);
    color: var(--ink-on-gold);
}

.btn-gold:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
}

.btn-ghost:hover {
    background: var(--red);
    color: #fff;
}


/* ===================== MAIN NAV (desktop) ===================== */
.main-nav {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
    margin: 0 var(--sp-5);
    position: relative;
}

.nav-indicator {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(249, 34, 38, 0.08);
    border-radius: var(--r-pill);
    z-index: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1.2), width 0.4s cubic-bezier(0.4, 0, 0.2, 1.2), height 0.4s cubic-bezier(0.4, 0, 0.2, 1.2);
    pointer-events: none;
}

.main-nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
    padding: 8px 16px;
    border-radius: var(--r-pill);
    position: relative;
    z-index: 1;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--red);
    background: transparent !important;
}

/* Su desktop solo testo, le icone servono su mobile */
.main-nav a cbs-icon {
    display: none;
}

.main-nav a cbs-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}


/* ===================== HERO ===================== */
.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(56px, 8vw, 92px) var(--sp-5) clamp(64px, 9vw, 104px);
    max-width: var(--w-content);
    margin: var(--sp-6) auto 0;
    border-radius: var(--r-lg);
    background: var(--red);
    box-shadow: var(--shadow-md);
}

/* Vignettatura sottile per dare profondita' senza gradiente marcato */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 50% -20%, rgba(255, 255, 255, 0.12), transparent 55%);
    z-index: 0;
}

.hero .eyebrow {
    color: var(--gold);
}

.hero .eyebrow::before {
    background: var(--gold);
}

.hero h1 {
    font-family: var(--title-font);
    font-size: clamp(31px, 6.5vw, 72px);
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.05;
    margin-bottom: var(--sp-4);
    color: #fff;
    overflow-wrap: break-word;
}

.hero h1 .accent {
    color: var(--gold);
}

.hero p {
    font-size: clamp(16px, 2.2vw, 20px);
    color: rgba(255, 255, 255, 0.92);
    max-width: 620px;
    margin: 0 auto;
    font-weight: 400;
}

.hero .hero-actions {
    display: flex;
    gap: var(--sp-3);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--sp-6);
}

.hero .btn-ghost {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.hero .btn-ghost:hover {
    background: #fff;
    color: var(--red);
}

.hero .badge {
    display: inline-block;
    margin-bottom: var(--sp-5);
    padding: 7px 18px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Silhouette del ponte sul fondo della banda hero */
.hero .bridge-bg {
    position: absolute;
    left: 50%;
    bottom: -6%;
    transform: translateX(-50%);
    width: 128%;
    max-width: none;
    aspect-ratio: 1313 / 500;
    background-color: rgba(255, 255, 255, 0.14);
    -webkit-mask: url('../branding/design.svg') bottom / contain no-repeat;
    mask: url('../branding/design.svg') bottom / contain no-repeat;
    z-index: 0;
}

.hero > *:not(.bridge-bg) {
    position: relative;
    z-index: 1;
}


/* ===================== LAYOUT / SEZIONI ===================== */
.container {
    max-width: var(--w-content);
    margin: 0 auto;
    padding: var(--sp-7) var(--sp-5) var(--sp-9);
}

.section-head {
    text-align: center;
    margin: var(--sp-8) 0 var(--sp-6);
}

.section-head:first-child {
    margin-top: var(--sp-5);
}

.section-head .section-title {
    margin: var(--sp-2) 0;
}

.section-head .section-subtitle {
    margin-bottom: 0;
}

.section-title {
    font-family: var(--title-font);
    font-size: clamp(28px, 4.4vw, 42px);
    font-weight: 400;
    text-align: center;
    line-height: 1.1;
    margin: var(--sp-8) 0 var(--sp-2);
    color: var(--ink);
}

.section-title:first-child {
    margin-top: 0;
}

.section-title .accent {
    color: var(--red);
}

.section-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 16px;
    margin-bottom: var(--sp-6);
}


/* ===================== DIVISORE SILHOUETTE (asparagi) ===================== */
/* La silhouette e' usata come mask CSS cosi' si puo' tinteggiare */
.bridge-divider {
    width: 100%;
    max-width: 560px;
    height: 26px;
    margin: var(--sp-7) auto;
    background-color: var(--line-gold);
    -webkit-mask: url('../branding/design.svg') center / contain no-repeat;
    mask: url('../branding/design.svg') center / contain no-repeat;
    pointer-events: none;
}

.bridge-divider.gold {
    background-color: var(--gold);
}

.bridge-divider.white {
    background-color: rgba(255, 255, 255, 0.85);
}


/* ===================== PANNELLI GLASS ===================== */
.glass-panel {
    background: var(--surface);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
}


/* ===================== GALLERIA FOTO ===================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: var(--sp-4);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-md);
    aspect-ratio: 3 / 2;
    cursor: pointer;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    background: #fff;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(42, 14, 11, 0.72), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: var(--sp-4);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    transform: translateY(8px);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Modalita' carosello automatico (piu' di 6 foto) */
.gallery-grid.is-carousel {
    display: block;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.gallery-track {
    display: flex;
    gap: var(--sp-4);
    width: max-content;
    animation: gallery-scroll linear infinite;
}

.gallery-track:hover {
    animation-play-state: paused;
}

.gallery-track .gallery-item {
    flex: 0 0 auto;
    width: 320px;
}

@keyframes gallery-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--sp-6);
    background: rgba(42, 14, 11, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: var(--r-sm);
    border: 3px solid #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 30px;
    font-size: 38px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
}


/* ===================== WIDGET FACEBOOK ===================== */
.fb-widget {
    width: 100%;
    max-width: 524px;
    margin: 0 auto;
    border-radius: var(--r-lg);
    padding: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
}

.fb-widget-header {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-5);
    background: var(--red);
    color: #fff;
    border-bottom: 3px solid var(--gold);
}

.fb-widget-header .fb-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--r-sm);
    flex-shrink: 0;
}

.fb-widget-header h3 {
    font-size: 17px;
    font-weight: 700;
}

.fb-widget-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.fb-widget-header .fb-header-cta {
    margin-left: auto;
    background: #fff;
    color: var(--red);
    padding: 9px 18px;
    border-radius: var(--r-pill);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.fb-widget-header .fb-header-cta:hover {
    background: var(--gold);
    color: var(--ink-on-gold);
}

.fb-widget-body {
    padding: var(--sp-4);
    min-height: 140px;
    background: var(--surface);
}

#fbPageContainer {
    width: 100%;
}

.fb-widget-body .fb-page,
.fb-widget-body .fb-page > span,
.fb-widget-body iframe {
    width: 100% !important;
    max-width: 100% !important;
}

.fb-fallback {
    text-align: center;
    padding: var(--sp-6) var(--sp-5);
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.fb-fallback strong {
    color: var(--ink);
}


/* ===================== BANDA HOME: NEWS + HIGHLIGHTS ===================== */
.home-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-6);
    align-items: start;
}


/* ===================== INFO CARD ===================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: var(--sp-5);
    margin-top: var(--sp-5);
}

.info-card {
    border-radius: var(--r-md);
    padding: var(--sp-6);
    text-align: center;
    border-top: 2px solid var(--gold);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-card .icon-wrap {
    width: 58px;
    height: 58px;
    margin: 0 auto var(--sp-4);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: #fff;
}

.info-card h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: var(--sp-2);
    color: var(--ink);
}

.info-card p {
    color: var(--muted);
    font-size: 14px;
}


/* ===================== FOOTER ===================== */
.footer {
    padding: var(--sp-8) var(--sp-5) var(--sp-6);
    background: var(--red);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    border-top: 3px solid var(--gold);
    margin-top: auto;
}

.footer-inner {
    max-width: var(--w-content);
    margin: 0 auto;
}

.footer-cols {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--sp-7);
    text-align: left;
    padding-bottom: var(--sp-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--gold);
    margin-bottom: var(--sp-4);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 3px 0;
    width: fit-content;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-col p {
    margin: 0 0 var(--sp-2);
    color: rgba(255, 255, 255, 0.8);
}

.footer .footer-brand {
    font-family: var(--title-font);
    font-size: 22px;
    color: #fff;
    margin-bottom: var(--sp-3);
    letter-spacing: 0.5px;
    line-height: 1.15;
}

.footer .footer-social {
    display: flex;
    gap: var(--sp-3);
    margin: var(--sp-4) 0 0;
}

.footer .footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    transition: all 0.2s;
}

.footer .footer-social a:hover {
    background: #fff;
    color: var(--red);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--sp-3);
    padding-top: var(--sp-5);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
}

.footer .footer-powered {
    font-size: 12px;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.72);
}

.footer a {
    color: var(--gold);
}

.footer .footer-powered a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.footer .footer-powered a:hover {
    text-decoration: underline;
}

app-footer {
    margin-top: auto;
    width: 100%;
}


/* ===================== PAGINA CONTATTI ===================== */
.contact-container {
    max-width: 640px;
    margin: var(--sp-7) auto;
    padding: var(--sp-7);
    border-radius: var(--r-lg);
    border-top: 3px solid var(--gold);
}

.contact-container h1 {
    font-family: var(--title-font);
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 400;
    margin-bottom: var(--sp-3);
    color: var(--ink);
}

.contact-container > p {
    color: var(--muted);
    margin-bottom: var(--sp-6);
}


/* ===================== DOVE SIAMO / CAMPI ===================== */
.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: var(--sp-5);
    margin-top: var(--sp-4);
}

.field-card {
    border-radius: var(--r-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 2px solid var(--gold);
}

.field-map {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--surface-2);
}

.field-map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.field-info {
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.field-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
}

.field-address {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--muted);
    font-size: 14px;
}

.field-address cbs-icon {
    color: var(--red);
    display: inline-flex;
    flex-shrink: 0;
}

.field-address cbs-icon svg {
    width: 18px;
    height: 18px;
}

.field-note {
    font-size: 13px;
    color: var(--muted);
}

.field-info .btn {
    align-self: flex-start;
    margin-top: var(--sp-2);
}


/* ===================== SPONSOR ===================== */
.sponsor-tier {
    margin-top: var(--sp-7);
}

.sponsor-tier:first-child {
    margin-top: var(--sp-4);
}

.sponsor-tier-title {
    font-family: var(--title-font);
    font-weight: 400;
    font-size: clamp(22px, 3vw, 28px);
    color: var(--ink);
    text-align: center;
    margin-bottom: var(--sp-2);
}

/* Riga oro sotto il titolo di fascia */
.sponsor-tier-title + .sponsor-grid {
    margin-top: var(--sp-5);
}

.sponsor-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-4);
}

.sponsor-card {
    width: 300px;
    max-width: 100%;
    border-radius: var(--r-md);
    padding: var(--sp-6) var(--sp-5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-4);
    text-decoration: none;
    color: var(--ink);
    border-top: 2px solid var(--gold);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.sponsor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.sponsor-logo {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-logo img {
    max-height: 100%;
    max-width: 250px;
    object-fit: contain;
    display: block;
}

.sponsor-name {
    font-weight: 700;
    font-size: 17px;
    text-align: center;
}

.sponsor-card.no-logo {
    min-height: 150px;
}

.sponsor-card.no-logo .sponsor-name {
    font-size: 20px;
}


/* ===================== PAGINA ERRORE ===================== */
.error-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.error-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--sp-8) var(--sp-5);
}

.error-content h1 {
    font-family: var(--title-font);
    font-size: clamp(88px, 18vw, 140px);
    font-weight: 400;
    line-height: 1;
    margin-bottom: var(--sp-3);
    color: var(--red);
}

.error-content h2 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    margin-bottom: var(--sp-4);
    color: var(--ink);
}

.error-content p {
    color: var(--muted);
    font-size: 18px;
    margin-bottom: var(--sp-6);
}


/* ===================== COOKIE BANNER ===================== */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(180%);
    width: calc(100% - 48px);
    max-width: 720px;
    z-index: 2000;
    border-radius: var(--r-md);
    padding: var(--sp-5) var(--sp-5);
    background: var(--panel-strong);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
}

.cookie-banner-text strong {
    font-size: 15px;
    font-weight: 700;
    display: block;
    margin-bottom: var(--sp-1);
    color: var(--ink);
}

.cookie-banner-text p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--red);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
}

.cookie-banner-actions {
    display: flex;
    gap: var(--sp-2);
    flex-shrink: 0;
}


/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
    .footer-cols {
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-6);
    }
    .footer-col.footer-brand-col {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .cookie-banner {
        bottom: 100px;
        padding: var(--sp-4) var(--sp-5);
    }
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--sp-4);
    }
    .cookie-banner-actions .btn {
        flex: 1;
    }
    .header {
        flex-direction: row;
        justify-content: space-between;
        gap: var(--sp-3);
        padding: var(--sp-3) var(--sp-4);
        text-align: left;
    }
    /* Nav flottante glass in basso su mobile */
    .main-nav {
        position: fixed !important;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        width: max-content;
        max-width: calc(100vw - 24px);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        border-radius: var(--r-pill);
        display: flex;
        justify-content: space-around;
        align-items: center;
        gap: var(--sp-1);
        padding: 10px 16px;
        z-index: 1000;
        margin: 0 !important;
    }
    /* Su mobile solo icone */
    .main-nav a {
        padding: 10px 14px;
        background: transparent !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .main-nav a span {
        display: none;
    }
    .main-nav a cbs-icon {
        display: inline-flex;
    }
    .nav-indicator {
        display: none;
    }
    .footer {
        padding-bottom: 100px;
    }
    .footer-cols {
        grid-template-columns: 1fr;
        gap: var(--sp-6);
        text-align: left;
    }
    /* Su mobile la colonna Naviga è ridondante con la nav flottante */
    .footer-nav-col {
        display: none;
    }
    .footer-bottom {
        flex-direction: column;
    }
    .auth-section {
        gap: var(--sp-2);
    }
    .logo-img {
        height: 44px;
    }
    .logo-text {
        font-size: 15px;
        max-width: 180px;
    }
    .hero {
        padding: clamp(40px, 12vw, 56px) var(--sp-5) clamp(48px, 14vw, 64px);
        margin: var(--sp-4) var(--sp-4) 0;
    }
    .container {
        padding-left: var(--sp-4);
        padding-right: var(--sp-4);
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--sp-3);
    }
    .contact-container {
        padding: var(--sp-6) var(--sp-5);
        margin: var(--sp-5) var(--sp-4);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
