/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

/* Animazione fade-up */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animazione fade-in per la bio */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stili Generali */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a; /* Sfondo scuro per un look immersivo */
    color: #f0f0f0; /* Testo chiaro */
    line-height: 1.6;
}

a {
    color: #4a90e2; /* Blu chiaro per link */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    color: #ffffff; /* Titoli bianchi */
    margin-bottom: 1rem;
}

header {
    background-color: #111; /* Header leggermente più scuro */
    padding: 1rem 0;
    position: sticky; /* Menu fisso */
    top: 0;
    z-index: 1000;
    width: 100%;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    color: #f0f0f0;
    font-weight: bold;
}

main {
    max-width: 1200px; /* Limita larghezza contenuto */
    margin: 2rem auto; /* Centra il contenuto */
    padding: 0 20px;
}

section {
    padding: 4rem 0; /* Spaziatura tra sezioni */
    border-bottom: 1px solid #333; /* Linea separatrice sottile */
}

section:last-child {
    border-bottom: none;
}

/* Stili Sezione Home */
#home {
    text-align: center;
}

.cover-placeholder {
    background-color: #333;
    height: 400px; /* Altezza placeholder */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    color: #888;
    font-size: 1.5rem;
}

.visual-menu {
    /* Da definire stile menu visuale */
    margin-top: 2rem;
    padding: 1rem;
    background-color: #222;
    border-radius: 5px;
    color: #888;
}

/* Stili Sezione Bio */
.artist-photo-placeholder {
    max-width: 250px;
    height: auto;
    border-radius: 50%; /* Foto tonda */
    float: left; /* Foto a sinistra, testo a destra */
    margin-right: 2rem;
    margin-bottom: 1rem;
    border: 3px solid #444;
}

/* Stili Sezioni Cinema e Video */
.project-item {
    margin-bottom: 6rem;
}

.project-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.project-type {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #4a90e2;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    font-weight: 500;
}

.project-item img {
    max-width: 100%;
    height: auto;
    border: 1px solid #444;
}

.video-placeholder {
    background-color: #333;
    height: 300px; /* Altezza placeholder video */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

/* Stili Sezione Foto */
.photo-subnav {
    text-align: center;
    margin-bottom: 2rem;
}

.photo-subnav a {
    margin: 0 10px;
    font-weight: bold;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Griglia responsiva */
    gap: 10px;
}

.gallery-item {
    width: 100%;
    height: 200px; /* Altezza fissa per uniformità */
    object-fit: cover; /* Copre l'area senza distorcere */
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 1px solid #444;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* Stili Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* Stili Sezione Musica */
.audio-track {
    background-color: #222;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.audio-track p {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

audio {
    width: 100%;
}

/* Stili Sezione Collaborazioni */
.collaboration-item {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    background-color: #222;
    padding: 1rem;
    border-radius: 5px;
}

.collaboration-item img {
    max-width: 150px;
    height: auto;
    object-fit: cover;
    border: 1px solid #444;
}

/* Stili Sezione Sceneggiature */
.script-item {
    background-color: #222;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 5px;
}

.script-excerpt {
    margin: 2rem 0;
    padding: 2rem;
    background-color: #111;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #333;
}

.screenplay-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    line-height: 1.4;
    white-space: pre-wrap;
    margin: 0;
    padding: 0;
    color: #ccc;
}

.screenplay-text {
    max-width: 800px;
    margin: 0 auto;
}

/* Stili specifici per gli elementi della sceneggiatura */
.screenplay-text > div {
    margin-bottom: 0.5rem;
}

/* Stili per i nomi dei personaggi */
.screenplay-text > div:has(> strong) {
    margin-left: 2rem;
    margin-bottom: 0.25rem;
}

/* Stili per le didascalie */
.screenplay-text > div:not(:has(> strong)) {
    margin-left: 1rem;
    margin-bottom: 0.5rem;
}

/* Stili per le intestazioni delle scene */
.screenplay-text > div:first-child {
    margin-left: 0;
    font-weight: bold;
    text-transform: uppercase;
}

pre {
    white-space: pre-wrap; /* Va a capo automaticamente */
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace;
    color: #ccc;
}

.copyright {
    font-size: 0.9rem;
    color: #888;
    margin-top: 2rem;
    text-align: center;
}

/* Stili Sezione Contatti */
#contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #f0f0f0;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #444;
    background-color: #333;
    color: #f0f0f0;
    border-radius: 3px;
    box-sizing: border-box; /* Include padding nella larghezza */
}

#contact-form textarea {
    min-height: 150px;
}

#contact-form button {
    background-color: #4a90e2; /* Blu */
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

#contact-form button:hover {
    background-color: #357abd; /* Blu più scuro */
}

.social-links {
    margin: 1rem 0;
}

.social-links a {
    margin: 0 10px;
    color: #f0f0f0;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #333;
    color: #888;
}

/* Media Queries per Responsiveness (Esempio) */
@media (max-width: 768px) {
    .artist-photo-placeholder {
        float: none; /* Rimuove float su schermi piccoli */
        display: block;
        margin: 0 auto 1rem; /* Centra la foto */
    }

    .collaboration-item {
        flex-direction: column;
        text-align: center;
    }

    .collaboration-item img {
        max-width: 200px;
    }
}

/* Stili Hero Section */
#hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: flex-start; /* Allinea in alto */
    justify-content: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/hero-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1600px; /* Aumentato da 1200px a 1600px */
    text-align: center;
    padding: 0 20px;
    animation: fadeUp 0.8s ease-out forwards;
    margin-top: 13vh; /* Ridotto da 15vh a 10vh per spostare ancora più in alto */
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.0rem; /* Ridotto da 3.8rem a 3.2rem */
    line-height: 1.0;
    margin: 0;
    padding: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.hero-content h1 span {
    display: block;
    margin-bottom: 2rem; /* Aumentato ulteriormente lo spazio tra le righe */
    width: 100%;
    padding: 0 30px; /* Aumentato il padding laterale */
    box-sizing: border-box;
}

/* Overlay scuro sull'immagine */
.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

/* Media Queries */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
}

/* Stili Home Bio Section */
#home-bio {
    padding: 6rem 2rem;
    text-align: center;
    background-color: #1a1a1a;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.bio-intro {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.bio-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.bio-button:hover {
    background-color: #357abd;
    text-decoration: none;
}

/* Media Queries */
@media (max-width: 768px) {
    #home-bio {
        padding: 4rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
}

/* Stili Bio Page */
.bio-content {
    background-color: #1a1a1a; /* Stesso sfondo scuro del sito */
    min-height: calc(100vh - 200px);
    padding: 80px 20px;
    animation: fadeIn 0.8s ease-out forwards;
}

.bio-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.bio-image {
    flex: 0 0 400px;
    margin-top: 0;
}

.profile-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: block;
}

.bio-text {
    flex: 1;
    max-width: 800px;
    display: flex;
    flex-direction: column;
}

.bio-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    margin-top: 0; /* Allineato con la parte superiore della foto */
}

.bio-text p {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #f0f0f0;
    margin-bottom: 1.5rem;
}

.bio-text .final-thoughts {
    font-size: 1.2rem;
    color: #ffffff;
    border-left: 3px solid #4a90e2;
    padding-left: 1.5rem;
    margin-top: 2.5rem;
}

.bio-text strong {
    color: #ffffff;
    font-weight: 500;
}

.bio-text em {
    color: #4a90e2; /* Colore azzurro per i titoli dei film */
}

/* Media Queries per Bio */
@media (max-width: 1024px) {
    .bio-container {
        gap: 40px;
    }
    
    .bio-image {
        flex: 0 0 350px;
    }
}

@media (max-width: 768px) {
    .bio-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .bio-image {
        flex: none;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .bio-text h1 {
        font-size: 2.4rem;
        text-align: center;
        margin-top: 0; /* Evita eccessivo spazio in alto su schermi piccoli */
    }
    
    .bio-content {
        padding: 60px 20px;
    }
}

@media (max-width: 480px) {
    .bio-text h1 {
        font-size: 2rem;
    }
    
    .bio-text p {
        font-size: 1rem;
    }
    
    .bio-text .final-thoughts {
        font-size: 1.1rem;
    }
}

/* Stili per i thumbnail video */
.video-thumbnail {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.02);
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent #ffffff;
}

.video-thumbnail:hover .play-button {
    background: rgba(73, 144, 226, 0.9);
}

/* Stili per le categorie di foto */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.category-item {
    position: relative;
    text-align: center;
    overflow: hidden;
}

.category-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-item img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border: 1px solid #444;
    transition: transform 0.3s ease;
}

.category-item:hover img {
    transform: scale(1.05);
}

.category-item h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 2.5rem;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 2rem;
    border-radius: 5px;
}

.category-item:hover h3 {
    opacity: 1;
}

/* Stili per la griglia delle foto nelle pagine di categoria */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    perspective: 1000px;
}

.gallery-item {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

.gallery-item:hover ~ .gallery-item {
    filter: blur(5px);
}

.video-projects {
    margin-bottom: 4rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.video-item {
    background-color: #222;
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
}

.video-item h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 1rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-item p {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.5;
}

.audio-tracks {
    margin-top: 3rem;
}

.audio-tracks h3 {
    color: #fff;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    perspective: 1000px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.photo-item[data-size="large"] {
    grid-column: span 2;
    grid-row: span 2;
}

.photo-item[data-size="medium"] {
    grid-column: span 1;
    grid-row: span 2;
}

.photo-item[data-size="small"] {
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover {
    z-index: 10;
    transform: scale(1.05);
}

.photo-item:hover ~ .photo-item {
    filter: blur(5px);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover {
    color: #bbb;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes zoomIn {
    from {transform: scale(0.8);}
    to {transform: scale(1);}
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .photo-item[data-size="large"] {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .photo-item[data-size="medium"] {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 480px) {
    .photo-grid {
        grid-template-columns: 1fr;
    }
    
    .photo-item[data-size="large"],
    .photo-item[data-size="medium"],
    .photo-item[data-size="small"] {
        grid-column: span 1;
        grid-row: span 1;
    }
} 