/* GENERALE  */
body, html {
    height: 100%;
    margin: 0;
    font-family: "DM Sans", serif;
}

body {
    display: flex;
    flex-direction: column;
}
  
main {
    margin-top: 110px;
    flex: 1; /* Questo elemento prenderà tutto lo spazio disponibile */
}

@media screen and (max-width: 768px) {
    main {
        margin-top: 100px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.titolone p {
    font-family: "Inter", sans-serif;
    font-size: 140px;
    font-weight: 600; /* Semi-Bold */
    line-height: 76%;
    letter-spacing: -8px;
    margin-bottom: 0px !important;
}

.titolo {
    font-family: "DM Sans", serif;
    font-size: 60px;
    font-weight: 500; /* Medium */
    line-height: 97.2%;
    letter-spacing: -3%;
    color: #181717;
}

.sottotitolo {
    font-family: "DM Sans", serif;
    font-size: 32px;
    font-weight: 400; /* Regular */
    line-height: 117%;
    letter-spacing: -3%;
    color: #181717;
}

.testo {
    font-family: "DM Sans", serif;
    font-size: 21px;
    font-weight: 500; /* Medium */
    line-height: 120%;
    letter-spacing: -3%;
    color: #606060;
}

.testo a {
    color: #181717;
}

.footer-testo {
    font-family: "DM Sans", serif;
    font-size: 14px;
    font-weight: 500; /* Medium */
    color: #181717;
}

.menu-btn {
    font-family: "Inter", sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -1px;
    text-decoration: underline;
}

.navbar-toggler {
    padding: unset !important;
    font-size: unset !important;
    line-height: unset !important;
    color: unset !important;
    background-color: unset !important;
    border: unset !important;
    border-radius: unset !important;
}

.navbar-toggler:hover {
    text-decoration: underline;
}

@media screen and (max-width: 992px) {
    .titolone p {
        font-size: 140px;
        line-height: 76%;
        letter-spacing: -8px;
    }
    
    .titolo {
        font-size: 60px;
        line-height: 97.2%;
        letter-spacing: -3%;
    }
    
    .sottotitolo {
        font-size: 32px;
        line-height: 117%;
        letter-spacing: -3%;
    }
    
    .testo {
        font-size: 21px;
        line-height: 120%;
        letter-spacing: -3%;
    }
}

@media screen and (max-width: 768px) {
    .titolone p {
        font-size: 65px;
        line-height: 82%;
        letter-spacing: -2px;
    }
    
    .titolo {
        font-size: 35px;
        line-height: 97.2%;
        letter-spacing: -3%;
    }
    
    .sottotitolo {
        font-size: 24px;
        line-height: 117%;
        letter-spacing: -3%;
    }
    
    .testo {
        font-size: 14px;
        line-height: 120%;
        letter-spacing: -3%;
    }
    
    .footer-testo {
        font-size: 13px;
    }
}

.bordo {
    border: 1px solid #181717;
    margin: 0.5rem 0 5rem 0;;
}

.bordo-corto {
    border: 1px solid #181717;
    margin-bottom: 2.5rem;
}

.white {
    background-color: #fff;
}

/* NAVBAR */
nav .logo img {
    height: 90px;
    width: auto;
}

nav {
    background-color: #fff;
    height: 110px;
}

@media screen and (max-width: 768px) {
    nav .logo img {
        height: 80px;
    }
    
    nav {
        height: 100px;
    }
}

/* HERO  */
.hero {
    position: relative;
    width: 100%;
    min-height: 60vh;
    overflow: hidden;
    height: calc(100vh - 110px);
}

@media screen and (max-width: 768px) {
    .hero {
        height: calc(100vh - 100px);
    }   
}

.hero .titolone {
    position: absolute;
    z-index: 1000;
    bottom: 0;
}

.hero video {
    object-fit: cover;
    height: 100vh;
}

/* SCRITTA HOMEPAGE */
.hero .riga1 {
    padding-left:240px;
}

.hero .riga2 {
    padding-left:170px;
}

.bio .riga3 {
    padding-left:100px
}

.bio .riga4 {
    padding-left:245px;
}

@media screen and (max-width: 576px) {
    .hero .riga1 {
        padding-left: 90px;
    }
    
    .hero .riga2 {
        padding-left: 0px;
    }
    
    .bio .riga3 {
        padding-left: 0px
    }
    
    .bio .riga4 {
        padding-left: 0px;
    }
}

/* BIO  */
.bio .titolone {
    position: relative;
    z-index: 1000;
    left: 0;
}

.spazio {
    padding-top: 15rem;
}

@media screen and (max-width: 576px) {
    .spazio {
        padding-top: 7.5rem;
    }
}

.hero-text-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

.hero-text {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1rem;
    background-color: #fff;
    max-width: 90%;
}

/* PROGETTI  */
.progetti-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-container {
    perspective: 1000px;
    position: relative;
}

/* Rimuoviamo il transform e le proprietà per il flip */
.card-flip {
    width: 100%;
    aspect-ratio: 4 / 2;
    position: relative;
}

/* Le facce sono sovrapposte e gestiscono l'opacità per la dissolvenza */
.card-front,
.card-back {
    position: absolute;
    inset: 0;  /* top, right, bottom, left a 0 */
    display: flex;
    transition: opacity 0.9s ease;
}

/* La faccia frontale parte visibile */
.card-front {
    opacity: 1;
    z-index: 2;
}

/* La faccia retro parte invisibile */
.card-back {
    opacity: 0;
    background-color: #fafafa;
    flex-direction: column;
}

/* Al passaggio del mouse, il front sfuma e il back appare */
.card-container:hover .card-front {
    opacity: 0;
}

.card-container:hover .card-back {
    opacity: 1;
}

/* Stili per il testo sul retro rimangono invariati */
.card-back h3 {
    z-index: 3;
    color: #000;
    margin-bottom: 0;
    padding: 10px 10px 5px 10px;
}

.card-back p {
    font-size: 13px;
    color: #000;
    padding: 5px 10px 10px 10px;
}

.back-img {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-back img {
    width: 60%;
    padding: 60px;
} 

/* CONTATTI  */
.contatti a {
    color: #181717;
    text-decoration: unset;
}

/* LOGO ESPLORA PHOTOGRAPHY  */
.LogoEsplora {
    width: 250px;
}

@media screen and (max-width: 768px) {
    .LogoEsplora {
        width: 200px;
    } 
}

@media screen and (max-width: 576px) {
    .LogoEsplora {
        width: 150px;
    }
}

/* SENZA NOME */
.gallery-section {
    overflow: hidden; /* Nasconde eventuali scrollbar verticali */
    padding: 1rem 0;
}
  
.gallery-container {
    display: flex;
    gap: 1rem; /* Spazio tra le immagini */
    overflow-x: auto; /* Abilita lo scroll orizzontale */
    scroll-snap-type: x mandatory; /* Per uno scroll "a scatto" (opzionale) */
    -webkit-overflow-scrolling: touch; /* Scroll fluido su dispositivi mobili */
    padding-bottom: 1rem;
}
  
/* Rende le immagini rettangolari e non ridimensionabili all'interno del flex */
.gallery-container img {
    flex-shrink: 0;
    max-height: 550px;   /* Larghezza fissa per ogni immagine */
    height: auto;  /* Altezza fissa per ottenere un rettangolo */
    object-fit: cover; /* Copre l'intero box senza deformazioni */
    scroll-snap-align: start; /* Allinea ogni immagine a inizio scroll */
}

.gallery-caption {
    position: relative;
    top: 0;
    left: 0;
    padding: 0.5rem;
    font-size: 1rem;
    z-index: 1;
}

@media screen and (max-width: 576px) {
    .gallery-container img {
        max-height: 400px; 
    }
}  

/* PITTURA CATALOGO */
.pdf-preview {
    text-align: center;
    margin: 2rem 0;
}
  
.pdf-preview img {
    max-width: 100%;
    cursor: pointer;
    transition: transform 0.5s ease;
}
  
.pdf-preview img:hover {
    transform: scale(1.02);
}  

/* VIDEO */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%; /* 16:9 = 9/16 * 100 = 56.25% */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* FOOTER */
footer {
    position: relative;
    bottom: 0;
    width: 100%;
}