/* Stile generale con foto di sfondo a tutto schermo */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #121212;
    background-image: 
        linear-gradient(rgba(18, 18, 18, 0.48), rgba(18, 18, 18, 0.55)),
        url("foto/fishnet_on_boat.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh; /* Forza lo sfondo a coprire tutta l'altezza dello schermo */
    color: #f0f0f0;
    margin: 0;
    padding: 0;
    text-align: center;
    user-select: none;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

/* Titolo con esponente allineato a sinistra e ridotto a 1/3 */
header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.barra-superiore {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
}

h1 {
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0;
    letter-spacing: 1px;
    text-align: left;
}

h1 sup {
    font-size: 0.7rem;
    color: #e0e0e0;
    vertical-align: super;
    margin-left: 3px;
    letter-spacing: 0.5px;
}

/* Titolo cliccabile con piccola icona Home discreta */
.titolo-home {
    cursor: pointer;
    transition: opacity 0.3s;
}

.titolo-home:hover {
    opacity: 0.85;
}

.icona-home-discreta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    margin-left: 5px;
    vertical-align: middle;
}

/* Indirizzo email molto piccolo e discreto in alto a destra */
.email-discreta {
    font-size: 0.68rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.email-discreta:hover {
    color: rgba(255, 255, 255, 0.95);
}

/* Menu orizzontale */
.menu-sezioni {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.menu-sezioni a {
    color: #eee;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 8px 15px;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.menu-sezioni a:hover, .menu-sezioni a.attivo {
    color: #fff;
    border-bottom: 2px solid #fff;
}

/* Freccia semicircolare indietro nel menu */
.btn-indietro {
    font-size: 1.3rem !important;
    padding: 6px 12px !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Barra controlli */
.controlli {
    background-color: rgba(30, 30, 30, 0.85);
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

button, select, input {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

button:hover { background-color: #444; }
input[type="number"] { width: 50px; }

/* Griglia Foto */
.griglia {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.card-foto {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.card-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-foto:hover img { transform: scale(1.05); }

/* Pulsanti Mi Piace */
.like-card {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 5px 10px;
    font-size: 0.85rem;
    z-index: 5;
}

.btn-like.votato {
    background-color: #2e7d32;
    border-color: #4caf50;
}

/* Schermo Intero */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contenitore-foto-protetta {
    position: relative;
    max-width: 80%;
    max-height: 75vh;
}

#foto-grande {
    max-width: 100%;
    max-height: 75vh;
    display: block;
}

/* Espansione reale della foto quando si clicca sull'icona tutto schermo */
.lightbox.tutto-schermo .contenitore-foto-protetta,
.lightbox.tutto-schermo #foto-grande,
.lightbox:fullscreen .contenitore-foto-protetta,
.lightbox:fullscreen #foto-grande {
    max-width: 96vw;
    max-height: 92vh;
}

.lightbox.tutto-schermo #didascalia,
.lightbox.tutto-schermo #btn-like-lightbox,
.lightbox.tutto-schermo #btn-download-lightbox {
    display: none;
}

/* Freccia indietro in alto a sinistra nel visualizzatore foto/presentazione */
.indietro-lightbox {
    position: absolute;
    top: 22px;
    left: 30px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    z-index: 1003;
    transition: transform 0.2s;
}

.indietro-lightbox:hover {
    transform: scale(1.15);
}

/* Pulsanti in alto a destra: Schermo intero e Chiudi */
.schermo-intero {
    position: absolute;
    top: 24px;
    right: 85px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 1003;
    transition: transform 0.2s;
}

.schermo-intero:hover {
    transform: scale(1.15);
}

.chiudi {
    position: absolute;
    top: 20px;
    right: 35px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 1003;
}

/* Frecce laterali sinistra e destra */
.lightbox .frecce button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 16px 22px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1002;
    transition: background 0.2s, transform 0.2s;
}

.lightbox .frecce button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.08);
}

.lightbox .frecce button:first-child {
    left: 25px;
}

.lightbox .frecce button:last-child {
    right: 25px;
}

@media (max-width: 600px) {
    .lightbox .frecce button {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    .lightbox .frecce button:first-child { left: 10px; }
    .lightbox .frecce button:last-child { right: 10px; }
}

/* Effetti di transizione */
.effetto-fade { animation: fadeIn 1s; }
.effetto-zoom { animation: zoomIn 1s; }
.effetto-slide { animation: slideIn 0.8s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Nasconde completamente la fascia scura inferiore (Like sito + Commenti) */
.area-social {
    display: none !important;
}
