/* ==========================================================================
   FONT Montserrat locale
   ========================================================================== */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Regular.woff2') format('woff2'),
         url('../fonts/Montserrat-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Bold.woff2') format('woff2'),
         url('../fonts/Montserrat-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at center, #c42d2d 0%, #4a0010 80%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

h3 {
    padding-top: 20px;
}

a,
.privacy-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover,
.privacy-link:hover {
    color: #cccccc;
}

/* ==========================================================================
   HEADER (solo logo)
   ========================================================================== */
header {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
}

header img,
.header-logo img {
    max-width: 500px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    header img,
    .header-logo img {
        max-width: 320px;
    }
}

/* ==========================================================================
   CONTENITORE BIANCO CENTRATO
   ========================================================================== */
.main-container {
    background-color: #ffffff;
    color: #1a1a1a;
    margin: 0 auto;
    max-width: 1200px;
    width: 92%;
    border-radius: 8px;
    overflow: hidden;
}

/* ==========================================================================
   BLOCCO HERO - via di mezzo per spazio sotto testo scorrevole
   ========================================================================== */
.header-block {
    position: relative;
    height: 340px;
    width: 100%;
    margin: 0;
    padding: 0;
    background: url('../images/header.jpg') center/cover no-repeat;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.header-block .overlay-text {
    background: rgba(0,0,0,0.50);
    padding: 2.5rem 4rem;
    padding-bottom: 140px;               /* valore base (desktop-like) */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Maschera sfumata FISSA in basso - grigio */
.header-block::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 130px;                       /* via di mezzo anche qui */
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(40,40,40,0.3) 30%,
        rgba(60,60,60,0.65) 60%,
        rgba(80,80,80,0.92) 85%,
        rgb(90,90,90) 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* Su mobile: testo dall'alto + spazio intermedio */
@media (max-width: 900px) {
    .header-block {
        height: 340px;
    }
    
    .header-block .overlay-text {
        justify-content: flex-start;
        padding: 2rem 2rem;
        padding-bottom: 160px;           /* VIA DI MEZZO: 160px su mobile */
    }
    
    .header-block h1 {
        margin-top: 1rem;
        font-size: 2.4rem;
    }
}

/* Su desktop/large: maschera nascosta */
@media (min-width: 901px) {
    .header-block::after {
        display: none;
    }
    
    .header-block .overlay-text {
        padding-bottom: 4rem;            /* padding normale su desktop */
    }
}

.header-block h1 {
    margin-bottom: 1rem;
    font-size: 2.8rem;
    font-weight: 700;
}

.header-block p {
    font-size: 1.2rem;
    max-width: 90%;
}

/* ==========================================================================
   GALLERY 4 IMMAGINI
   ========================================================================== */
.images-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.2rem;
    padding: 3.5rem 2.5rem;
    text-align: center;
}

.image-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: transform 0.25s ease;
}

.image-item img:hover {
    transform: scale(1.04);
}

.image-item p {
    margin-top: 1rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: #222;
}

/* ==========================================================================
   VIDEO SECTION
   ========================================================================== */
.video-block {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.video-block video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0 0 0 65%;
    background: rgba(0,0,0,0.85);
    color: #ffffff;
    padding: 3.2rem 2.8rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-overlay h2 {
    margin-bottom: 1.4rem;
    font-size: 2rem;
    color: #ffffff;
}

.video-overlay p {
    margin: 0.6rem 0;
    font-size: 1.05rem;
}

.social-icons {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}

.social-icons a {
    color: #ffffff;
    transition: opacity 0.25s, color 0.25s;
}

.social-icons a:hover {
    opacity: 0.75;
    color: #cccccc;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    text-align: center;
    padding: 3rem 1rem 4rem;
    color: #ffffff;
}

.footer-content {
    font-size: 0.95rem;
}

.footer-content span,
.footer-content .privacy-link {
    color: #ffffff;
}

.privacy-link {
    text-decoration: underline;
    cursor: pointer;
}

/* ==========================================================================
   MODAL PRIVACY
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.70);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-content {
    background: white;
    color: #111;
    max-width: 720px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 3rem 2.8rem;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.close {
    position: absolute;
    top: 1.2rem;
    right: 1.8rem;
    font-size: 2.4rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.close:hover {
    color: #000;
}

/* Responsive generali */
@media (max-width: 900px) {
    .video-overlay {
        inset: 0;
        padding: 2.8rem 2rem;
    }
}

@media (max-width: 600px) {
    .header-block .overlay-text {
        padding: 2rem 1.8rem;
        padding-bottom: 160px;           /* coerente con mobile principale */
    }

    .images-section {
        padding: 2.5rem 1.5rem;
    }

    .video-block {
        height: 420px;
    }
}