/* ----------------------------------- */
/* File CSS Omnicomprensivo           */
/* Gianni Valletta Prototipe (v1.0)   */
/* ----------------------------------- */

/* --- Reset e Variabili Globali --- */
:root {
    --primary-bg: #0f172a; /* Blu notte */
    --text-primary: #d1d5db; /* Grigio chiaro */
    --text-headings: #e6d3b3; /* Crema / Oro antico */
    --accent-color: #e6d3b3;
    --font-headings: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

h1, h2 {
    font-family: var(--font-headings);
    color: var(--text-headings);
    margin-bottom: 20px;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

h3 {
    font-family: var(--font-headings);
    color: var(--text-headings);
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.text-center {
    text-align: center;
    margin-top: 40px;
}

/* --- Header e Navigazione --- */
.site-header {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(230, 211, 179, 0.2);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    list-style: none;
    display: flex;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
    color: var(--text-primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after, .nav-menu a.active::after {
    width: 100%;
}

/* Stile per link attivo */
.nav-menu a.active {
    color: var(--accent-color);
}


.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-headings);
    font-size: 1.8rem;
    cursor: pointer;
}

/* --- Sezione Hero (Homepage) --- */
.hero {
    height: 100vh;
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('img/opera-l-amore-vola.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content h1 {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--text-headings);
}

/* --- Sezioni Comuni e Pulsanti (Homepage) --- */
.intro-bio, .featured-works, .gallery-page-section, .bio-section, .reviews-section, .contact-section {
    padding: 80px 0;
}
/* Regola padding della sezione opere/biografia/contatti per l'header fisso */
.gallery-page-section, .bio-section, .reviews-section, .contact-section {
    padding-top: 120px; 
}


.intro-bio {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    margin-top: 20px;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--primary-bg);
}


/* --- STILI GRIGLIA OPERE (Usati in Home e Opere) --- */

.gallery-page-section h2, .featured-works h2, .reviews-section h2, .contact-section h2, .bio-section h2 {
    margin-bottom: 40px;
}

.gallery-page-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonne su desktop */
    gap: 25px;
}

.gallery-page-item {
    background-color: #0c1221;
    border: 1px solid rgba(230, 211, 179, 0.1);
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.gallery-page-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(230, 211, 179, 0.4);
}

.gallery-page-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3; /* Mantiene le immagini uniformi */
    object-fit: cover;
}

.work-details {
    padding: 15px;
    text-align: center;
}

.work-title {
    font-family: var(--font-headings);
    color: var(--text-headings);
    font-size: 1.1rem;
    font-weight: 700;
}

.work-dimensions {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-top: 5px;
    opacity: 0.8;
}


/* --- STILI LIGHTBOX (POPUP) --- */

#lightbox-modal {
    display: none; /* Nascosto di default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    
    /* Centra il contenuto con flex */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#lightbox-image {
    max-width: 90%;
    max-height: 80vh; 
    border-radius: 5px;
}

#lightbox-caption {
    margin-top: 15px;
    color: #fff;
    font-family: var(--font-headings);
    font-size: 1.2rem;
    text-align: center;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: var(--accent-color);
}


/* --- STILI PAGINA BIOGRAFIA --- */

.bio-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Colonna immagine più stretta */
    gap: 50px;
    align-items: flex-start;
}

.bio-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.intro-paragraph {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 30px;
    color: var(--accent-color);
}

.bio-content h2 {
    text-align: left;
    margin-top: 0;
}

.bio-content h3 {
    text-align: left;
}


/* --- STILI PAGINA RECENSIONI --- */

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colonne su desktop */
    gap: 30px;
}

.review-card {
    background-color: #0c1221; /* Sfondo leggermente più scuro del body */
    border: 1px solid rgba(230, 211, 179, 0.2);
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
    box-shadow: 0 5px 15px rgba(230, 211, 179, 0.1);
}

.review-text p {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 25px;
}

.review-author {
    border-top: 1px solid rgba(230, 211, 179, 0.1);
    padding-top: 15px;
}

.author-name {
    font-family: var(--font-headings);
    color: var(--accent-color);
    font-weight: 700;
    font-style: normal;
    margin-bottom: 2px;
}

.author-source {
    font-size: 0.9rem;
    color: var(--text-primary);
    opacity: 0.7;
}


/* --- STILI PAGINA CONTATTI --- */

.contact-section {
    text-align: center;
}

.contact-intro {
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-item {
    background-color: #0c1221;
    border: 1px solid rgba(230, 211, 179, 0.2);
    border-radius: 8px;
    padding: 40px 30px;
    width: 100%;
    max-width: 350px;
    transition: box-shadow 0.3s ease;
}

.contact-item:hover {
    box-shadow: 0 5px 15px rgba(230, 211, 179, 0.15);
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.contact-item h3 {
    margin-bottom: 10px;
}

.contact-item p {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.contact-link {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: underline;
}

/* Stile per i link social grandi */
.social-links-big {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links-big a {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid var(--accent-color);
    border-radius: 5px;
}

.social-links-big a:hover {
    background-color: var(--accent-color);
    color: var(--primary-bg);
}


/* --- Footer --- */
.site-footer {
    background-color: #0c1221;
    padding: 40px 0 20px;
    border-top: 1px solid rgba(230, 211, 179, 0.2);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-social a {
    font-size: 1.5rem;
    margin-left: 20px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(230, 211, 179, 0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: #8892b0;
}

.footer-legal a {
    color: #8892b0;
}
.footer-legal a:hover {
    color: var(--accent-color);
}

/* AGGIUNGI AL BLOCCO DEL FOOTER in style.css */

.footer-contact p {
    margin-bottom: 5px; /* Aggiunge spazio tra le righe di contatto nel footer */
}

/* =================================== */
/* MEDIA QUERIES (RESPONSIVITÀ)       */
/* =================================== */

/* Tablet grandi (fino a 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

/* Tablet (fino a 992px) */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    h2 {
        font-size: 2rem;
    }

    /* Griglie a 2 colonne */
    .gallery-page-grid {
        grid-template-columns: repeat(2, 1fr); /* Opere / Home Opere */
    }
    .review-grid {
        grid-template-columns: 1fr; /* Recensioni a 1 colonna */
    }
    
    /* Biografia: da 2 a 1 colonna */
    .bio-grid {
        grid-template-columns: 1fr; 
    }
    .bio-image {
        order: -1; /* Mette l'immagine sopra il testo su mobile */
        margin-bottom: 30px;
    }
    .bio-content h2 {
        text-align: center;
    }
    .bio-content h3 {
        text-align: center;
    }
}

/* Mobile (fino a 768px) */
@media (max-width: 768px) {
    .hamburger {
        display: block; 
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; 
        width: 70%;
        height: 100vh;
        background-color: var(--primary-bg);
        transition: right 0.4s ease-in-out;
        padding-top: 100px;
    }

    .main-nav.active {
        right: 0; 
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
    }

    .nav-menu li {
        margin: 20px 0;
    }
    
    .nav-menu a {
        font-size: 1.5rem;
    }
    
    /* Griglie a 1 colonna */
    .gallery-page-grid {
        grid-template-columns: 1fr; /* Opere / Home Opere a 1 colonna */
    }
    
    /* Contatti */
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .contact-item {
        max-width: 90%; 
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-social a {
        margin: 0 10px;
    }
}

/* Smartphone piccoli (fino a 480px) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
}
