/* ARS Torino — modern site styles */

:root {
    /* Palette dal logo ARS: lime (A), oliva (rs), bosco (albero) */
    --color-lime: #b8ce3c;
    --color-primary: #6d8c3c;
    --color-primary-dark: #2e4a28;
    --color-primary-light: #8faf52;
    --color-accent: var(--color-lime);
    --color-accent-hover: #a3ba32;
    --color-earth: #8b6f4e;
    --color-bg: #f9fbf6;
    --color-bg-alt: #f2f6eb;
    --color-surface: #ffffff;
    --color-text: #2a3320;
    --color-text-muted: #5a6648;
    --color-border: #d8e4c8;
    --font-sans: 'DM Sans', system-ui, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(46, 74, 40, 0.08);
    --shadow-lg: 0 12px 48px rgba(46, 74, 40, 0.12);
    --header-h: 80px;
    --event-alert-h: 0px;
    --home-video-banner-h: 0px;
    --container-max: 1140px;
    --container: min(var(--container-max), 100% - 2rem);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-light); }

.container {
    width: var(--container);
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: 1rem;
}

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

.skip-link {
    position: absolute; top: -100px; left: 1rem; z-index: 9999;
    padding: 0.75rem 1.25rem; background: var(--color-primary); color: #fff;
    border-radius: var(--radius); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--header-h);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.site-header.is-scrolled {
    background: rgba(255,255,255,0.95);
    border-color: var(--color-border);
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-h); width: var(--container); margin-inline: auto;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}
.logo:hover { opacity: 0.92; }
.logo-img {
    display: block;
    height: 58px;
    width: auto;
    max-width: min(220px, 42vw);
    aspect-ratio: 327 / 179;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}
.logo-img--footer {
    height: 56px;
    max-width: 210px;
}

.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--color-primary); border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav ul { display: flex; list-style: none; gap: 0.25rem; }
.main-nav a {
    padding: 0.5rem 0.85rem; border-radius: 8px;
    color: var(--color-text); font-weight: 500; font-size: 0.925rem;
}
.main-nav a:hover,
.main-nav a.is-active {
    color: var(--color-primary);
    background: var(--color-bg-alt);
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.5rem; border-radius: 50px;
    font-family: inherit; font-weight: 600; font-size: 0.95rem;
    border: 2px solid transparent; cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--outline { border-color: rgba(255,255,255,0.6); color: #fff; background: transparent; }
.btn--outline:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn--outline-light { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
.btn--outline-light:hover { background: var(--color-primary); color: #fff; }
.btn--accent { background: var(--color-accent); color: var(--color-primary-dark); }
.btn--accent:hover { background: var(--color-accent-hover); color: var(--color-primary-dark); }
.btn--small { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn--full { width: 100%; }

/* Home — banner fisso video evento (sempre visibile senza scroll) */
body.has-home-video-banner {
    --home-video-banner-h: 3.35rem;
}

.home-video-banner {
    position: fixed;
    top: calc(var(--header-h) + var(--event-alert-h));
    left: 0;
    right: 0;
    z-index: 998;
    background: linear-gradient(90deg, #1a3d18, var(--color-primary-dark) 40%, var(--color-primary));
    color: #fff;
    border-bottom: 2px solid var(--color-lime);
    box-shadow: 0 4px 16px rgba(46, 74, 40, 0.25);
    animation: eventAlertIn 0.45s ease-out;
}

.home-video-banner__inner {
    display: flex;
    align-items: center;
    gap: 0.65rem 1rem;
    flex-wrap: wrap;
    min-height: var(--home-video-banner-h);
    padding: 0.45rem 0;
}

.home-video-banner__badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--color-lime);
    color: var(--color-primary-dark);
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
}

.home-video-banner__text {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.35;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.55rem;
}

.home-video-banner__text strong {
    font-weight: 600;
}

.home-video-banner__event {
    opacity: 0.92;
}

.home-video-banner__when {
    font-size: 0.8rem;
    opacity: 0.85;
}

.home-video-banner__when::before {
    content: '·';
    margin-right: 0.35rem;
}

.home-video-banner__cta {
    flex-shrink: 0;
}

body.has-home-video-banner .hero {
    padding-top: calc(var(--header-h) + var(--event-alert-h) + var(--home-video-banner-h));
}

body.has-home-video-banner.has-event-alert:not(.event-alert-hidden) .hero {
    padding-top: calc(var(--header-h) + var(--event-alert-h) + var(--home-video-banner-h));
}

body.has-home-video-banner .flash {
    top: calc(var(--header-h) + var(--event-alert-h) + var(--home-video-banner-h) + 0.5rem);
}

/* Banner evento imminente */
body.has-event-alert {
    --event-alert-h: 3.25rem;
}

.event-alert {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    border-bottom: 2px solid var(--color-lime);
    box-shadow: 0 4px 16px rgba(46, 74, 40, 0.2);
    animation: eventAlertIn 0.45s ease-out;
}

@keyframes eventAlertIn {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 1; transform: translateY(0); }
}

.event-alert.is-dismissed {
    display: none;
}

body.has-event-alert.event-alert-hidden {
    --event-alert-h: 0px;
}

.event-alert__inner {
    display: flex;
    align-items: center;
    gap: 0.65rem 1rem;
    flex-wrap: wrap;
    min-height: var(--event-alert-h);
    padding: 0.5rem 0;
}

.event-alert__badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--color-lime);
    color: var(--color-primary-dark);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.event-alert__text {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.35;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
}

.event-alert__text strong {
    font-weight: 600;
}

.event-alert__when {
    opacity: 0.9;
    font-size: 0.82rem;
}

.event-alert__when::before {
    content: '·';
    margin-right: 0.35rem;
}

.event-alert__cta {
    flex-shrink: 0;
}

.event-alert__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition);
}

.event-alert__close:hover {
    background: rgba(255, 255, 255, 0.28);
}

body.has-event-alert:not(.event-alert-hidden) .hero {
    padding-top: calc(var(--header-h) + var(--event-alert-h));
}

body.has-event-alert:not(.event-alert-hidden) .page-hero:not(.page-hero--image) {
    padding-top: calc(var(--header-h) + var(--event-alert-h) + 4rem);
}

body.has-event-alert:not(.event-alert-hidden) .page-hero--compact {
    padding-top: calc(var(--header-h) + var(--event-alert-h) + 2.5rem);
}

body.has-event-alert:not(.event-alert-hidden) .page-hero--image {
    margin-top: calc(var(--header-h) + var(--event-alert-h));
}

body.has-event-alert:not(.event-alert-hidden) main > .section:first-child,
body.has-event-alert:not(.event-alert-hidden) main > article.section:first-child {
    padding-top: calc(5rem + var(--event-alert-h));
}

body.has-event-alert:not(.event-alert-hidden) .flash {
    top: calc(var(--header-h) + var(--event-alert-h) + 0.5rem);
}

/* Hero */
.hero {
    position: relative; min-height: 100vh; display: flex; flex-direction: column;
    justify-content: center; padding-top: var(--header-h);
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    overflow: hidden;
}
.hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(
        to top,
        rgba(20, 28, 18, 0.7) 0%,
        rgba(20, 28, 18, 0.2) 35%,
        transparent 60%
    );
    z-index: 1;
}
.hero--no-overlay .hero-bg::after {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.45) 45%,
        rgba(0, 0, 0, 0.32) 100%
    );
}
.hero-bg img {
    width: 100%; height: 100%; object-fit: cover;
    object-position: center center;
}
.hero-content {
    position: relative; z-index: 2; padding: 4rem 0 6rem;
    color: #fff; max-width: 720px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}
.hero--no-overlay .hero-content {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.hero-eyebrow {
    font-size: 0.85rem; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--color-accent); margin-bottom: 1rem;
}
.hero-title {
    font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700; line-height: 1.1; margin-bottom: 1.25rem;
}
.hero-title span { color: var(--color-accent); }
.hero-lead { font-size: 1.15rem; opacity: 0.92; margin-bottom: 2rem; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-scroll {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
    color: rgba(255,255,255,0.7); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* Sections */
.section { padding: 5rem 0; }
.section--muted { background: var(--color-bg-alt); }
.section--activities {
    background: linear-gradient(160deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: #fff;
}
.section--cta { background: var(--color-surface); }
.section--contact-preview { background: var(--color-bg-alt); }

.section-header { margin-bottom: 2.5rem; }
.section-header--light .section-label,
.section-header--light h2 { color: #fff; }
.section-header h2 {
    font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600; line-height: 1.2; margin-top: 0.5rem;
}
.section-label {
    display: inline-block; font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--color-lime);
}
.section-header-link { margin-top: 1rem; display: inline-block; }

.lead { font-size: 1.2rem; color: var(--color-text-muted); margin-bottom: 1.5rem; }
.content-narrow { max-width: 720px; margin-inline: auto; }
.content-narrow p + p { margin-top: 1rem; }

/* About */
.about-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.about-figure {
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg); margin: 0;
}
.about-figure img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.section-banner {
    margin: 0 0 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.section-banner img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}
.about-text p + p { margin-top: 1rem; }
.about-stats { display: flex; flex-direction: column; gap: 1rem; }
.stat-card {
    background: var(--color-surface); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--color-border);
}
.stat-card--accent {
    background: var(--color-primary); color: #fff; border-color: transparent;
}
.stat-number {
    display: block; font-family: var(--font-display); font-size: 2rem;
    font-weight: 700; color: var(--color-primary); margin-bottom: 0.35rem;
}
.stat-card--accent .stat-number { color: var(--color-accent); }
.stat-label { font-size: 0.9rem; color: var(--color-text-muted); }
.stat-card--accent .stat-label { color: rgba(255,255,255,0.85); }

.link-arrow {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-weight: 600; margin-top: 1.25rem;
}
.link-arrow::after { content: '→'; transition: transform var(--transition); }
.link-arrow:hover::after { transform: translateX(4px); }

/* Cards */
.cards-grid { display: grid; gap: 1.5rem; }
.cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
.feature-card {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg); padding: 2rem;
    backdrop-filter: blur(4px);
    transition: transform var(--transition), background var(--transition);
}
.feature-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.15); }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 {
    font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 0.75rem;
}
.feature-card p { opacity: 0.88; font-size: 0.95rem; }

.highlight-box {
    margin-top: 2.5rem; padding: 2rem;
    background: rgba(255,255,255,0.08); border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.highlight-box p { flex: 1; min-width: 280px; opacity: 0.9; }
.highlight-box--page {
    background: var(--color-surface); border-color: var(--color-border);
    box-shadow: var(--shadow); color: var(--color-text);
}
.highlight-box--page h2 {
    font-family: var(--font-display); margin-bottom: 1rem; color: var(--color-primary);
}

/* News */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.news-grid--full { grid-template-columns: repeat(2, 1fr); }
.news-card {
    background: var(--color-surface); border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-card-image-link { display: block; overflow: hidden; }
.news-card-image-link img {
    width: 100%; aspect-ratio: 16/10; object-fit: cover;
    transition: transform 0.4s ease;
}
.news-card:hover .news-card-image-link img { transform: scale(1.04); }
.news-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-card--full { flex-direction: row; }
.news-card--full .news-card-image-link { flex: 0 0 42%; max-width: 42%; }
.news-card--full .news-card-image-link img { height: 100%; min-height: 220px; aspect-ratio: auto; }
.news-card--full .news-card-body { flex: 1; }
.news-card-footer {
    margin-top: auto; padding-top: 1rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    border-top: 1px solid var(--color-border);
}
.news-card h3 a, .news-card h2 a { color: inherit; }
.news-card h3 a:hover, .news-card h2 a:hover { color: var(--color-primary); }
.news-card--full h2 {
    font-family: var(--font-display); font-size: 1.35rem;
    margin: 0.75rem 0; line-height: 1.3;
}
.news-card h3 {
    font-family: var(--font-display); font-size: 1.1rem;
    margin: 0.75rem 0 0.5rem; line-height: 1.35;
}
.news-card-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    font-size: 0.8rem;
}
.news-category {
    background: var(--color-bg-alt); color: var(--color-primary);
    padding: 0.2rem 0.6rem; border-radius: 50px; font-weight: 600;
}
.news-card p { color: var(--color-text-muted); font-size: 0.95rem; }
.news-author { display: block; margin-top: 1rem; font-size: 0.85rem; color: var(--color-text-muted); }
.news-card-venue {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin: -0.25rem 0 0.5rem;
    line-height: 1.4;
}
.news-card-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }

/* CTA & forms */
.cta-box {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 2rem; padding: 3rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: var(--radius-lg); color: #fff;
}
.cta-content h2 {
    font-family: var(--font-display); font-size: 1.75rem; margin-bottom: 0.5rem;
}
.cta-content p { opacity: 0.9; }

.newsletter-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.newsletter-form input,
.contact-form input,
.contact-form textarea {
    font-family: inherit; font-size: 1rem;
    padding: 0.85rem 1.15rem; border: 2px solid var(--color-border);
    border-radius: 50px; background: var(--color-surface);
    transition: border-color var(--transition);
}
.newsletter-form input:focus,
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none; border-color: var(--color-primary);
}
.newsletter-form--large input { min-width: 260px; flex: 1; }
.newsletter-form input { border-radius: 50px; }

.contact-list { list-style: none; margin: 1.5rem 0 2rem; }
.contact-list li { margin-bottom: 1rem; }
.contact-list strong { display: block; font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--color-text-muted); margin-bottom: 0.2rem; }
.contact-preview-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
.map-block { display: flex; flex-direction: column; gap: 1rem; }
.map-venue, .map-address { font-size: 0.95rem; line-height: 1.5; }
.map-venue strong, .map-address strong { color: var(--color-primary-dark); }
.map-actions {
    display: flex; flex-wrap: wrap; gap: 0.65rem;
}
.btn--map {
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    border-radius: 50px;
    background: var(--color-surface);
    color: var(--color-primary-dark);
    border: 2px solid var(--color-primary);
}
.btn--map:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-1px);
}
.btn--map-accent {
    background: var(--color-primary);
    color: #fff;
}
.btn--map-accent:hover {
    background: var(--color-primary-dark);
    color: #fff;
}
.maps-page .map-block + .map-block {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--color-border);
}
.contact-preview-actions {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    margin-top: 1.5rem;
}
.btn--inline { margin-top: 0; }
.section--contact-preview .btn--outline-light {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}
.section--contact-preview .btn--outline-light:hover {
    background: var(--color-primary);
    color: #fff;
}
.map-placeholder {
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid var(--color-border);
    min-height: 280px;
}
.map-placeholder iframe { width: 100%; height: 280px; border: 0; }
.map-placeholder--large iframe { height: 400px; }

/* Page hero */
.page-hero {
    position: relative;
    padding: calc(var(--header-h) + 4rem) 0 3rem;
    background: linear-gradient(160deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
}
.page-hero--image {
    padding: 0;
    margin-top: var(--header-h);
    background: var(--color-primary-dark);
    color: #fff;
    overflow: hidden;
}
.page-hero-media {
    position: relative;
    width: 100%;
    height: clamp(300px, 42vw, 520px);
    overflow: hidden;
    background: var(--color-bg-alt);
}
.page-hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(46, 74, 40, 0.75) 0%,
        rgba(46, 74, 40, 0.2) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 1;
}
.page-hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}
.page-hero-content {
    position: relative;
    z-index: 2;
    padding: 1.75rem 0 2.5rem;
}
.page-hero--image .section-label { color: var(--color-lime); }
.page-hero--compact { padding-top: calc(var(--header-h) + 2.5rem); }
.page-hero--compact .page-hero-lead { opacity: 0.9; max-width: 560px; margin-top: 1rem; }
.page-hero h1 {
    font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.75rem);
    margin-top: 0.5rem; line-height: 1.2;
}

/* Article */
.article-page .article-header { margin-bottom: 2rem; }
.article-page h1 {
    font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.2; margin: 0.75rem 0;
}
.article-meta { color: var(--color-text-muted); font-size: 0.95rem; }
.article-figure {
    margin: 0 0 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--color-bg-alt);
    text-align: center;
}
.article-figure img {
    width: 100%;
    max-height: min(85vh, 720px);
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    margin-inline: auto;
}
.article-body p + p { margin-top: 1rem; }
.article-footer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.highlight-figure {
    margin: 0 0 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg-alt);
    text-align: center;
}
.highlight-figure img {
    width: 100%;
    max-height: 360px;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    margin-inline: auto;
}

/* Values */
.values-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
    margin-top: 3rem;
}
.value-card {
    padding: 2rem; background: var(--color-surface);
    border-radius: var(--radius-lg); border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
}
.value-card h3 {
    font-family: var(--font-display); color: var(--color-primary);
    margin-bottom: 0.75rem;
}

/* Contact page */
.contact-page-grid {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start;
}
.contact-list--large li {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1rem 0; border-bottom: 1px solid var(--color-border);
}
.contact-icon { font-size: 1.5rem; }
.newsletter-block {
    margin-top: 2rem; padding: 1.5rem;
    background: var(--color-bg-alt); border-radius: var(--radius-lg);
}
.newsletter-block h3 { font-family: var(--font-display); margin-bottom: 0.5rem; }

.contact-form .form-group { margin-bottom: 1.25rem; }
.contact-form label {
    display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 0.4rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%; border-radius: var(--radius);
}
.contact-form textarea { border-radius: var(--radius); resize: vertical; min-height: 140px; }

.form-group--recaptcha { margin-top: 0.5rem; }
.form-recaptcha-note {
    margin: 0.65rem 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--color-text-muted);
}
.form-recaptcha-note a { color: var(--color-primary); }
.form-recaptcha-note--dev {
    padding: 0.65rem 0.85rem;
    background: #fff8e6;
    border: 1px solid #f0e0a8;
    border-radius: var(--radius);
    color: #6b5a20;
}

/* Flash */
.flash {
    position: fixed; top: calc(var(--header-h) + 1rem); left: 50%; transform: translateX(-50%);
    z-index: 2000; width: min(480px, 90vw);
    padding: 1rem 1.5rem; border-radius: var(--radius);
    font-weight: 500; box-shadow: var(--shadow-lg);
    animation: slideDown 0.35s ease;
}
.flash--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash--error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Footer */
.site-footer {
    background: var(--color-primary-dark); color: rgba(255,255,255,0.85);
    padding: 4rem 0 0;
}
.footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2.5rem; width: var(--container); margin-inline: auto;
    padding-bottom: 3rem;
}
.footer-brand .logo { margin-bottom: 0.25rem; }
.footer-tagline { margin-top: 0.75rem; font-size: 0.9rem; opacity: 0.75; }
.footer-links h3, .footer-contact h3, .footer-newsletter h3 {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 1rem; color: var(--color-accent);
}
.footer-links ul, .footer-contact ul { list-style: none; }
.footer-links a, .footer-contact a { color: rgba(255,255,255,0.8); }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-links li, .footer-contact li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-newsletter p { font-size: 0.9rem; margin-bottom: 1rem; opacity: 0.8; }
.footer-newsletter .newsletter-form input {
    flex: 1; min-width: 0; background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2); color: #fff;
}
.footer-newsletter .newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }

.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 0; border-top: 1px solid rgba(255,255,255,0.1);
    width: var(--container); margin-inline: auto;
    font-size: 0.85rem; opacity: 0.7;
}
.social-link {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.1); color: #fff;
    transition: background var(--transition);
}
.social-link:hover { background: var(--color-accent); color: var(--color-primary-dark); }

main { padding-top: 0; }

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9998;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -8px 32px rgba(46, 74, 40, 0.15);
    padding: 1.25rem 0;
    max-height: 90vh;
    overflow-y: auto;
}
.cookie-banner__inner {
    width: var(--container);
    margin-inline: auto;
}
.cookie-banner h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary-dark);
}
.cookie-banner h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}
.cookie-banner p { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cookie-prefs-list { list-style: none; margin-bottom: 1rem; }
.cookie-prefs-list li { margin-bottom: 0.75rem; }
.cookie-prefs-list label {
    display: flex; gap: 0.65rem; align-items: flex-start;
    font-size: 0.9rem; cursor: pointer;
}
.cookie-prefs-list input { margin-top: 0.2rem; accent-color: var(--color-primary); }
body.cookie-banner-open { padding-bottom: 0; }

.cookie-settings-fab {
    position: fixed;
    bottom: 1.25rem; right: 1.25rem;
    z-index: 9997;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition), transform 0.15s ease;
}
.cookie-settings-fab:hover { background: var(--color-primary-dark); transform: scale(1.05); }
body.cookie-banner-open .cookie-settings-fab { bottom: auto; top: 1rem; }

.map-cookie-notice {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    min-height: 120px;
    display: flex; align-items: center; justify-content: center;
}
.map-placeholder:not(:has(iframe[src])) .map-cookie-notice[hidden] { display: none; }
.link-button {
    background: none; border: none; padding: 0;
    color: var(--color-primary); font-weight: 600;
    cursor: pointer; text-decoration: underline;
    font-family: inherit; font-size: inherit;
}
.legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin: 2rem 0 0.75rem;
    color: var(--color-primary-dark);
}
.legal-content h3 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }
.legal-content ul { margin: 0.5rem 0 1rem 1.25rem; }
.legal-content li { margin-bottom: 0.35rem; }
.legal-back { margin-top: 2.5rem; }
.footer-bottom a { color: rgba(255,255,255,0.85); }
.footer-bottom a:hover { color: #fff; }

/* Responsive — tablet */
@media (max-width: 992px) {
    .cards-grid--3, .news-grid, .values-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-grid, .contact-preview-grid, .contact-page-grid { grid-template-columns: 1fr; }
    .section-header { flex-wrap: wrap; }
}

/* Responsive — mobile */
@media (max-width: 768px) {
    :root {
        --header-h: 64px;
        --container: 100%;
    }

    body.has-event-alert {
        --event-alert-h: 4.5rem;
    }

    .event-alert__inner {
        padding: 0.65rem 0;
    }

    .event-alert__cta {
        order: 3;
    }

    .event-alert__close {
        order: 4;
        margin-left: auto;
    }

    html { -webkit-text-size-adjust: 100%; }

    .container { padding-inline: 1.15rem; }

    /* Header & menu a schermo intero */
    .header-inner { padding-inline: 0.25rem; }
    .logo-img { height: 42px; max-width: 150px; }
    .logo-img--footer { height: 40px; max-width: 140px; }

    .nav-toggle {
        display: flex;
        z-index: 1002;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }
    .nav-toggle.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.is-active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    body.nav-open { overflow: hidden; }
    body.nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(26, 40, 22, 0.55);
        z-index: 999;
        backdrop-filter: blur(2px);
    }

    .main-nav {
        position: fixed;
        inset: 0;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1001;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: calc(var(--header-h) + var(--safe-top) + 1rem) 1.15rem calc(1.5rem + var(--safe-bottom));
        background: var(--color-surface);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        opacity: 1;
        pointer-events: none;
        transition: transform 0.3s ease;
        box-shadow: none;
        border: none;
    }
    .main-nav.is-open {
        transform: translateX(0);
        pointer-events: auto;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0.25rem;
        width: 100%;
    }
    .main-nav a {
        display: block;
        padding: 1rem 1.1rem;
        font-size: 1.05rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    .nav-cta {
        width: 100%;
        margin-top: 1rem;
        padding: 0.9rem 1.25rem;
        font-size: 1rem;
        min-height: 48px;
    }

    /* Hero home */
    .hero {
        min-height: 100svh;
        min-height: 100dvh;
    }
    .hero-content {
        padding: 2rem 0 3.5rem;
        max-width: 100%;
    }
    .hero-title {
        font-size: clamp(1.85rem, 9vw, 2.75rem);
    }
    .hero-lead {
        font-size: 1rem;
        line-height: 1.55;
        margin-bottom: 1.5rem;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    .hero-actions .btn {
        width: 100%;
        min-height: 48px;
    }
    .hero-scroll { display: none; }

    /* Hero pagine interne */
    .page-hero--image { margin-top: var(--header-h); }
    .page-hero-media {
        height: clamp(220px, 52vw, 340px);
    }
    .page-hero-content {
        padding: 1.35rem 0 2rem;
    }
    .page-hero h1 {
        font-size: clamp(1.5rem, 6.5vw, 2rem);
    }
    .page-hero-lead { font-size: 0.95rem; }
    .page-hero--compact {
        padding-top: calc(var(--header-h) + 1.25rem);
        padding-bottom: 1.75rem;
    }

    /* Sezioni */
    .section { padding: 3rem 0; }
    .section-header h2 { font-size: clamp(1.45rem, 5.5vw, 2rem); }
    .section-header-link { display: block; margin-top: 0.75rem; }

    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-figure { order: -1; }

    .highlight-box {
        flex-direction: column;
        align-items: stretch;
        padding: 1.35rem;
    }
    .highlight-box .btn { width: 100%; }

    .news-card--full { flex-direction: column; }
    .news-card--full .news-card-image-link { flex: none; max-width: 100%; }
    .news-card--full .news-card-image-link img { min-height: 200px; }
    .news-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .cards-grid--3,
    .news-grid,
    .news-grid--full,
    .values-grid { grid-template-columns: 1fr; }

    /* CTA & form */
    .cta-box {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.25rem;
        gap: 1.25rem;
    }
    .cta-content h2 { font-size: 1.35rem; }

    .newsletter-form,
    .newsletter-form--large {
        flex-direction: column;
        width: 100%;
        gap: 0.65rem;
    }
    .newsletter-form input,
    .newsletter-form--large input,
    .contact-form input,
    .contact-form textarea {
        width: 100%;
        font-size: 16px;
        min-height: 48px;
    }
    .newsletter-form .btn,
    .newsletter-form--large .btn { width: 100%; min-height: 48px; }

    .contact-preview-actions {
        flex-direction: column;
        gap: 0.65rem;
    }
    .contact-preview-actions .btn,
    .section--contact-preview .btn--outline-light {
        width: 100%;
        min-height: 48px;
        text-align: center;
    }

    .map-actions {
        flex-direction: column;
    }
    .map-actions .btn--map {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }
    .map-placeholder iframe { height: 240px; }
    .map-placeholder--large iframe { height: 280px; }

    .contact-list--large li { flex-direction: row; align-items: flex-start; }

    /* Footer */
    .site-footer { padding-top: 2.5rem; }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-bottom: 2rem;
    }
    .footer-newsletter .newsletter-form {
        flex-direction: column;
    }
    .footer-newsletter .newsletter-form .btn { width: 100%; }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding-bottom: calc(1.25rem + var(--safe-bottom));
    }

    /* Cookie */
    .cookie-banner {
        padding: 1rem 0 calc(1rem + var(--safe-bottom));
    }
    .cookie-banner__inner { padding-inline: 1.15rem; }
    .cookie-banner__actions {
        flex-direction: column;
    }
    .cookie-banner__actions .btn {
        width: 100%;
        min-height: 48px;
    }
    .cookie-settings-fab {
        bottom: calc(1rem + var(--safe-bottom));
        right: 1rem;
    }

    .flash {
        top: calc(var(--header-h) + 0.5rem);
        width: calc(100% - 2rem);
        left: 1rem;
        right: 1rem;
        transform: none;
    }
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-12px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* Eventi e condivisione social */
.events-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.events-month-nav a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.events-month-nav a:hover { text-decoration: underline; }

.events-month-nav__current {
    font-size: 1.15rem;
    color: var(--color-heading);
}

.events-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--color-text-muted);
}

.events-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.event-card {
    display: grid;
    grid-template-columns: minmax(0, 280px) 1fr;
    gap: 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.event-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    min-height: 0;
    background: var(--color-bg-alt);
}

.event-card__image img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    object-position: center;
    display: block;
}

.event-card__body {
    padding: 1.25rem 1.25rem 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-card__date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.event-card__location {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0;
}

.event-card__footer {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.share-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.share-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    font-family: inherit;
    line-height: 1.3;
}

.share-btn--facebook {
    background: #1877f2;
    border-color: #1877f2;
    color: #fff;
}

.share-btn--whatsapp {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

.share-hint {
    width: 100%;
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-accent);
}

.share-hint--note {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.event-page .article-footer {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
}

.event-description {
    margin-top: 1rem;
}

.event-video {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
}

.event-video__title {
    font-size: 1.35rem;
    margin: 0 0 1.25rem;
}

.event-video__embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
}

.event-video__embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.event-video__player {
    width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-md, 8px);
    background: #111;
}

.event-card__video-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-accent);
    margin-right: 0.75rem;
}

.events-replays {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
}

.events-replays__title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.events-replays__lead {
    color: var(--color-text-muted);
    margin: 0 0 1.5rem;
}

.events-replays__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.events-replays__list a {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-surface-alt, #f8faf8);
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.events-replays__list a:hover {
    background: var(--color-surface-hover, #eef4ee);
}

.events-replays__list span {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .event-card {
        grid-template-columns: 1fr;
    }
    .event-card__body {
        padding: 0 1.25rem 1.25rem;
    }
    .event-card__image { min-height: 0; }
    .events-month-nav {
        flex-direction: column;
        text-align: center;
    }
}

/* Smartphone piccoli */
@media (max-width: 480px) {
    .logo-img { height: 38px; max-width: 130px; }
    .hero-eyebrow { font-size: 0.75rem; }
    .feature-card { padding: 1.35rem; }
    .stat-card { padding: 1.15rem; }
    .value-card { padding: 1.35rem; }
    .footer-bottom p { font-size: 0.8rem; line-height: 1.5; }
}
