/* Mobile-first styles per Coro Aqua Ciara: base styles apply to small screens, then scale up with min-width breakpoints */

/* Barra di navigazione sempre visibile in alto durante lo scorrimento */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Evita che il menu fisso copra i titoli quando si usano link con #ancora */
html {
    scroll-padding-top: 76px;
}

.hero {
    background: url('img/aquaciara2025.png') center top/cover no-repeat;
    position: relative;
    color: white;
    padding: 60px 0; /* mobile default padding */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    min-height: 220px;
    /* on mobile we don't force flex layout so content stacks naturally */
    display: block;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55); /* più scuro su mobile per leggibilità */
    z-index: 0;
}
.hero .container {
    position: relative;
    z-index: 1;
}

/* Tipografia mobile */
.hero h1 {
    font-size: 1.6rem;
    line-height: 1.05;
    margin: 0 0 0.5rem 0;
}
.hero p.lead {
    font-size: 0.95rem;
    margin: 0;
}

.supporters img {
    margin: 8px;
    height: auto;
}
.social-icons a {
    font-size: 1.6rem;
    margin: 0 8px;
    color: #155724;
}

/* Stile specifico per il logo nella pagina Chi siamo (mobile) */
.chisiamo-logo {
    max-width: 120px;
}

/* Tablet and small-desktop: miglioramenti progressivi */
@media (min-width: 577px) {
    .hero {
        padding: 80px 0;
        background-position: center center; /* vertically center when image is cropped */
        background-size: cover;
        min-height: 260px;
        display: block; /* ancora stacking ma più spazio */
    }
    .hero::before {
        background: rgba(0,0,0,0.45);
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p.lead {
        font-size: 1rem;
    }
    .supporters img {
        margin: 8px;
        height: auto;
    }
    .chisiamo-logo {
        max-width: 160px;
    }
    .social-icons a {
        font-size: 1.8rem;
    }
}

/* Desktop and large screens: apply flex layout and full desktop styling */
@media (min-width: 769px) {
    .hero {
        padding: 180px 0;
        background-position: center center; /* ensure vertical centering when cover crops */
        background-size: cover;
        min-height: 280px;
        display: flex;
        align-items: center;
    }
    .hero::before {
        background: rgba(0,0,0,0.35);
    }
    .hero h1 {
        font-size: 2.8rem;
        line-height: 1.02;
    }
    .hero p.lead {
        font-size: 1.25rem;
    }
    .supporters img {
        margin: 10px;
        height: auto;
    }
    .social-icons a {
        font-size: 2rem;
        margin: 0 10px;
    }
    .chisiamo-logo {
        max-width: 220px;
    }
}

/* Modern alpine theme overrides: variables and enhanced components */
:root {
    --alpine-green: #113e2b; /* deep alpine green */
    --wood: #b37a3b; /* warm wood accent */
    --cream: #f7efe6; /* soft text color */
    --dark-overlay: rgba(5,10,7,0.5);
    --accent: #c99a57;
    --glass: rgba(255,255,255,0.06);
}

/* Constrain content and add consistent horizontal padding */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Make the hero feel cinematic: use background blend, softer overlay and a little parallax hint */
.hero {
    background-image: linear-gradient(180deg, rgba(17,62,43,0.18), rgba(0,0,0,0.06)), url('img/aquaciara2025.png');
    background-blend-mode: multiply;
    color: var(--cream);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.6);
}

.hero::before {
    /* more nuanced gradient overlay for wide screens while remaining readable on mobile */
    background: linear-gradient(180deg, rgba(2,36,18,0.6), rgba(0,0,0,0.28));
    /* blur removed to disable header blur effect */
}

/* Center and animate hero content slightly for a modern feel */
.hero .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(8px);
    animation: heroFadeUp 640ms ease forwards 160ms;
}

@keyframes heroFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Heading: slightly serif, bold and elegant, evoking tradition */
.hero h1 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--cream);
}

.hero p.lead {
    color: rgba(247,239,230,0.95);
}

/* Logo treatment: circular emblem with subtle glass + wood accent */
.chisiamo-logo {
    max-width: 120px; /* keep mobile sensible */
    display: inline-block;
    padding: 6px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 6px 18px rgba(4,10,6,0.45);
}

/* Supporter images: grayscale until hovered, small lift effect */
.supporters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.supporters img {
    margin: 8px;
    transition: transform 220ms ease, box-shadow 220ms ease;
    transform-origin: center;
    /* removed grayscale filter and max-width to show full-color logos at natural size */
}
.supporters img:hover {
    transform: translateY(-6px) scale(1.06);
    box-shadow: 0 10px 20px rgba(3,10,6,0.35);
}

/* Social icons: rounded badges with accent on hover */
.social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1.25rem;
}
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: auto;
    min-height: 40px;
    padding: 0.4rem 0.9rem;
    margin: 0;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    text-decoration: none;
    white-space: nowrap;
    transition: background 180ms ease, transform 180ms ease, color 180ms ease;
}
.social-icons a:hover {
    background: linear-gradient(135deg, var(--wood), var(--accent));
    color: #fff;
    transform: translateY(-4px);
}

/* Glassy content card to reuse on pages (e.g., "Chi siamo") */
.glass-card {
    background: rgba(17,62,43,0.04);
    border-radius: 12px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.04);
    backdrop-filter: blur(6px) saturate(1.06);
    box-shadow: 0 8px 30px rgba(3,10,6,0.2);
}

.poster-zoom {
    flex: 0 0 auto;
    display: block;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 0.375rem;
    background: none;
    cursor: zoom-in;
    text-align: left;
}
.poster-zoom img {
    display: block;
    transition: transform 220ms ease;
}
.poster-zoom:hover img {
    transform: scale(1.06);
}
.image-lightbox {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    padding: 3rem 1rem 1rem;
    border: 0;
    background: transparent;
    overflow: hidden;
}
.image-lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-lightbox::backdrop {
    background: rgba(0,0,0,0.9);
}
.image-lightbox img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.375rem;
}
.image-lightbox-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    padding: 0 0.5rem;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
    .poster-zoom img { transition: none; }
    .poster-zoom:hover img { transform: none; }
}

/* Desktop refinements: stronger hero typography and layout */
@media (min-width: 769px) {
    .hero .container { align-items: flex-start; padding-left: 24px; }
    .chisiamo-logo { max-width: 200px; }
    .hero h1 { font-size: 3.4rem; }
}

/* Accessibility: increase contrast for small text when needed */
@media (prefers-contrast: more) {
    .hero p.lead { color: #f7efe6; }
}


/* Photo gallery */
.photo-gallery .gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(17,62,43,0.12);
    background: rgba(17,62,43,0.04);
    box-shadow: 0 8px 24px rgba(3,10,6,0.12);
}
.photo-gallery .gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 220ms ease;
}
.photo-gallery .gallery-item:hover img {
    transform: scale(1.04);
}
.photo-gallery .gallery-caption {
    padding: 0.75rem 0.9rem 0.9rem;
    color: #113e2b;
    font-size: 0.95rem;
}
@media (min-width: 768px) {
    .photo-gallery .gallery-item img { height: 260px; }
}

/* Rassegne page */
.rassegna-section h2 {
    color: var(--alpine-green);
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.rassegna-anno {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(17,62,43,0.12);
}
.rassegna-anno:last-child {
    border-bottom: 0;
}
.rassegna-titolo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--alpine-green);
    margin: 0 0 0.35rem;
    line-height: 1.3;
}
.rassegna-cori {
    margin: 0;
    padding-left: 1.15rem;
    color: #2b2b2b;
}
.rassegna-cori li {
    margin-bottom: 0.15rem;
    line-height: 1.4;
}
.rassegna-cori a {
    color: var(--alpine-green);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.rassegna-cori a:hover {
    color: var(--wood);
}
@media (min-width: 992px) {
    .rassegna-section + .rassegna-section {
        border-left: 1px solid rgba(17,62,43,0.12);
        padding-left: 1.5rem;
    }
}
