﻿/* style.css */

/* Reset di base e Stili Globali */
:root {
    --primary-color: #2c3e50; /* Blu scuro/grigio ardesia */
    --secondary-color: #e74c3c; /* Rosso/corallo per accenti */
    --light-color: #ecf0f1; /* Grigio molto chiaro */
    --dark-color: #333;
    --text-color: #555;
    --font-main: 'Montserrat', sans-serif;
    --font-headings: 'Playfair Display', serif;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
    --photo-grid-gap: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.7;
    color: var(--text-color);
    background-color: #f9f9f9;
}

.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.7rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* --- Hero Section --- */
#hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/s_biografia.jpg') no-repeat center center/cover;
    color: var(--light-color);
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
}

    #hero h1 {
        font-size: 3.5rem;
        color: #fff;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        margin-bottom: 0.5rem;
    }

    #hero .tagline {
        font-size: 1.5rem;
        font-weight: 300;
        color: var(--light-color);
        text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    }

/* --- Navbar Styles --- */
#navbar {
    background: var(--primary-color);
    color: #fff;
    padding: 0.8rem 0;
    z-index: 1000;
    min-height: 60px;
    position: relative;
}

    #navbar.sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        box-shadow: var(--shadow);
        animation: slideDown 0.3s ease-out;
    }

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--font-headings);
}

.logo img {
    height: 45px;
    width: auto;
}

#navbar ul.nav-links {
    display: flex;
    align-items: center;
}

    #navbar ul.nav-links li {
        margin: 0 1rem;
    }

        #navbar ul.nav-links li a {
            color: #fff;
            text-decoration: none;
            font-weight: 600;
            padding: 0.5rem 0.75rem;
            transition: color 0.3s ease, transform 0.2s ease;
            display: inline-block;
        }

            #navbar ul.nav-links li a:hover,
            #navbar ul.nav-links li a.active {
                color: var(--secondary-color);
                transform: translateY(-2px);
            }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

/* --- Sezioni Generali --- */
section {
    padding-top: 100px;
    padding-bottom: 80px;
    border-bottom: 1px solid #e0e0e0;
}

    section:last-of-type {
        border-bottom: none;
    }

    section h2 {
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 3rem;
        position: relative;
        padding-bottom: 0.8rem;
    }

        section h2::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 4px;
            background-color: var(--secondary-color);
            border-radius: 2px;
        }

.icon-title {
    margin-right: 0.7rem;
    color: var(--secondary-color);
}

/* --- Bio Section (Solo Testo) --- */
#bio .bio-text-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
    font-size: 1.05rem;
    line-height: 1.8;
}

    #bio .bio-text-content p {
        margin-bottom: 1.5rem;
    }

    #bio .bio-text-content strong {
        color: var(--primary-color);
        font-weight: 600;
    }

    #bio .bio-text-content em {
        font-style: italic;
        color: var(--secondary-color);
        font-weight: 500;
    }

/* --- Photo Wall Section (Soluzione 2: Masonry-like) --- */
#photowall {
    background-color: #f0f0f0;
}

    #photowall h2 {
        margin-bottom: 2.5rem;
    }

.photo-grid-wrapper {
    padding: 0 var(--photo-grid-gap);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    /* RIMOSSO: grid-auto-rows: 180px; */
    grid-auto-flow: dense; /* Tenta di riempire gli spazi */
    gap: var(--photo-grid-gap);
    align-items: start; /* Allinea gli item all'inizio della loro cella di griglia (asse verticale) */
}

.photo-item {
    position: relative;
    overflow: hidden; /* Per border-radius e overlay */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* L'item occupa la colonna */
    /* L'altezza sarà determinata dall'immagine interna */
    line-height: 0; /* Aiuta a rimuovere spazi extra se img non è display:block */
}

    .photo-item:hover {
        transform: scale(1.03);
        box-shadow: 0 8px 20px rgba(0,0,0,0.25);
        z-index: 10;
    }

    .photo-item img {
        width: 100%;
        height: auto; /* L'altezza si adatta per mantenere le proporzioni originali dell'immagine */
        /* object-fit: cover; // Non strettamente necessario se width:100% e height:auto */
        display: block; /* Rimuove eventuale spazio sotto l'immagine */
        border-radius: 8px; /* Se l'immagine dovesse sporgere dall'overflow:hidden del parent */
        transition: opacity 0.3s ease;
    }

    .photo-item:hover img {
        opacity: 0.85;
    }

    .photo-item.p-wide {
        grid-column: span 2;
    }



.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    padding: 20px 10px 10px 10px;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
    border-bottom-left-radius: 8px; /* Per seguire il raggio del contenitore */
    border-bottom-right-radius: 8px;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
    transform: translateY(0);
}


#photowall-featured {
    padding-top: 60px; /* Meno padding sopra se segue un'altra sezione di foto */
    padding-bottom: 80px;
    background-color: #ffffff; /* Sfondo diverso per staccare, opzionale */
}

    #photowall-featured h2 {
        margin-bottom: 2.5rem;
    }

.featured-photos-grid {
    display: grid;
    /* Scegli quante colonne per le foto wide. 1 o 2 sono comuni. */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 1-2 colonne a seconda della larghezza */
    /* Oppure fisso: grid-template-columns: 1fr; // Una foto per riga */
    /* Oppure fisso: grid-template-columns: repeat(2, 1fr); // Due foto per riga */
    gap: 20px; /* Spazio maggiore tra le foto featured */
    padding: 0 10px; /* Padding laterale per la griglia */
}

.featured-photo-item img {
    width: 100%;
    height: auto; /* L'altezza si adatta per mantenere proporzioni, essendo wide l'altezza sarà minore */
    object-fit: cover; /* 'cover' qui va bene perché vogliamo che riempia la larghezza 'wide' */
    display: block;
    border-radius: 8px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.featured-photo-item:hover img {
    opacity: 0.85;
    transform: scale(1.02); /* Zoom leggermente minore per foto grandi */
}




/* --- Video Section --- */
#videos .video-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    font-size: 1rem;
    color: #666;
}

#videos .small-text {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 1.5rem;
    color: #777;
}

#videos .video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

    .video-wrapper:hover {
        transform: translateY(-5px);
    }

    .video-wrapper iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

/* --- Contact Section --- */
#contact > p {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

#contact .contact-info {
    text-align: center;
}

    #contact .contact-info li {
        margin-bottom: 1.2rem;
        font-size: 1.2rem;
    }

        #contact .contact-info li i {
            margin-right: 1rem;
            color: var(--secondary-color);
            width: 25px;
            text-align: center;
        }

    #contact .contact-info a {
        transition: color 0.3s ease;
    }

        #contact .contact-info a:hover {
            color: var(--primary-color);
        }

/* --- Footer --- */
footer {
    background: var(--dark-color);
    color: #ccc;
    text-align: center;
    padding: 2.5rem 0;
    font-size: 0.9rem;
}

    footer a {
        color: var(--light-color);
        font-weight: 500;
    }

        footer a:hover {
            color: var(--secondary-color);
        }

    footer p {
        margin-bottom: 0.5rem;
    }

/* --- Cookie Consent Banner --- */
#cookieConsentBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(30,30,30,0.97);
    color: var(--light-color);
    padding: 20px 25px;
    box-shadow: 0 -3px 15px rgba(0,0,0,0.25);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
}

    #cookieConsentBanner p {
        margin: 0 15px 0 0;
        line-height: 1.6;
    }

    #cookieConsentBanner a.policy-link-inline {
        color: var(--secondary-color);
        text-decoration: underline;
        font-weight: 600;
    }

        #cookieConsentBanner a.policy-link-inline:hover {
            color: #fff;
        }

    #cookieConsentBanner button {
        background-color: var(--secondary-color);
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 5px;
        cursor: pointer;
        font-weight: bold;
        transition: background-color 0.3s ease, transform 0.2s ease;
        white-space: nowrap;
    }

        #cookieConsentBanner button:hover {
            background-color: #c0392b;
            transform: translateY(-2px);
        }

/* --- Policy Modal (Overlay) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.75);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    padding: 35px 40px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    color: var(--text-color);
    animation: fadeInModal 0.4s ease-out;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

    .modal-close-btn:hover {
        color: var(--dark-color);
        transform: rotate(90deg);
    }

#policyModalBody h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2rem;
}

#policyModalBody h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    text-align: left;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

    #policyModalBody h2::after {
        display: none;
    }

#policyModalBody h3 {
    font-size: 1.3rem;
    font-family: var(--font-main);
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 1.8rem;
    margin-bottom: 0.7rem;
}

#policyModalBody p, #policyModalBody ul {
    margin-bottom: 1rem;
    font-size: 1rem;
}

#policyModalBody ul {
    list-style: disc;
    padding-left: 30px;
}

#policyModalBody a {
    color: var(--secondary-color);
    font-weight: 600;
}

    #policyModalBody a:hover {
        text-decoration: underline;
    }

.policy-link-inline {
    color: var(--secondary-color);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

    .policy-link-inline:hover {
        color: var(--primary-color);
    }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) { /* Tablet */
    #hero h1 {
        font-size: 3rem;
    }

    #hero .tagline {
        font-size: 1.3rem;
    }

    section h2 {
        font-size: 2.2rem;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) { /* Mobile */
    #navbar ul.nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 0.5rem 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        border-top: 1px solid rgba(255,255,255,0.15);
        z-index: 999;
    }

        #navbar ul.nav-links.active {
            display: flex !important;
            animation: slideInMenu 0.3s ease-out forwards;
        }

    @keyframes slideInMenu {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    #navbar ul.nav-links li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

        #navbar ul.nav-links li a {
            display: block;
            padding: 1rem 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            color: #fff;
        }

            #navbar ul.nav-links li a:hover {
                background-color: rgba(255,255,255,0.1);
                color: var(--secondary-color);
                transform: translateY(0);
            }

        #navbar ul.nav-links li:last-child a {
            border-bottom: none;
        }

    .menu-toggle {
        display: block;
    }

    #hero {
        min-height: 60vh;
    }

        #hero h1 {
            font-size: 2.5rem;
        }

        #hero .tagline {
            font-size: 1.1rem;
        }

    section {
        padding-top: 80px;
        padding-bottom: 60px;
    }

        section h2 {
            font-size: 2rem;
            margin-bottom: 2rem;
        }

            section h2::after {
                width: 80px;
                height: 3px;
            }

    #bio .bio-text-content {
        text-align: left;
        font-size: 1rem;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 8px;
    }

    .photo-grid-wrapper {
        padding: 0;
    }


    #videos .video-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #cookieConsentBanner {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

        #cookieConsentBanner p {
            margin: 0 0 15px 0;
        }

    .modal-content {
        padding: 25px 20px;
        max-height: 95vh;
    }

    #policyModalBody h1 {
        font-size: 1.8rem;
    }

    #policyModalBody h2 {
        font-size: 1.5rem;
    }

    #policyModalBody h3 {
        font-size: 1.2rem;
    }

    #policyModalBody p, #policyModalBody ul {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) { /* Schermi molto piccoli */
    #hero h1 {
        font-size: 2rem;
    }

    #hero .tagline {
        font-size: 1rem;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .logo a {
        font-size: 1.4rem;
    }

    #navbar ul.nav-links li a {
        padding: 0.8rem 1rem;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .photo-item.p-wide {
        grid-column: span 2;
    }
    /* .photo-item.p-tall non avrà un effetto di altezza maggiore se l'immagine non è già alta */
}
