/* =========================================================
   assets/css/abisso.css
   Layout Immersivo, Dettagli Fondale e Video con Coralli
   ========================================================= */

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    background-color: #0d1117; 
    font-family: 'Fredoka One', sans-serif; 
    overflow-x: hidden; 
}

.abisso-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 50px 20px 120px 20px; /* Aumentato il padding inferiore per far spazio a bottiglie e forziere */
    background-image: url('../img/kraken/grotta.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.titolo-ricetta-completa {
    color: #ffca28;
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    z-index: 10;
}

/* --- TENTACOLI SCENOGRAFICI --- */
.tentacolo-cornice {
    position: fixed;
    width: 20vw;
    max-width: 240px;
    min-width: 120px;
    z-index: 1; 
    opacity: 0.85;
    pointer-events: none;
}
.tentacolo-sx-basso { left: 0; bottom: 0; }
.tentacolo-dx-alto { right: 0; top: 0;  }
.tentacolo-cornice img { width: 100%; height: auto; display: block; }

/* --- STRUTTURE DEL FONDALE (FORZIERE E BOTTIGLIE) --- */
.decorazione-fondale {
    position: fixed; /* Rimangono ancorate al browser sul fondo */
    bottom: 0;
    z-index: 2; /* Sopra i tentacoli di sfondo, sotto la card principale */
    pointer-events: none;
    filter: drop-shadow(0 -5px 10px rgba(0,0,0,0.5));
}

.fondale-bottiglie {
    left: 230px;
    width: 15vw;
    max-width: 180px;
    min-width: 90px;
}

.fondale-forziere {
    right: 10px;
    width: 20vw;
    max-width: 240px;
    min-width: 120px;
}

.decorazione-fondale img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- WRAPPER E PERGAMENA --- */
.forziere-card-wrapper {
    position: relative;
    z-index: 5; /* Sopra tutto il resto */
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.card-pergamena {
    background-color: #f4eccf !important;
    border: 10px solid #e2d4a8;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    color: #2b1d0c;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; 
    gap: 40px;
}

.sezione-blocco { margin-bottom: 25px; }
.card-pergamena h2 { font-family: 'Pirata One', cursive; font-size: 2.2rem; color: #8B4513; margin-bottom: 12px; border-bottom: 2px dashed rgba(139, 69, 19, 0.2); padding-bottom: 4px; }
.card-pergamena p { font-family: sans-serif; font-size: 1.1rem; line-height: 1.6; }

.lista-ingredienti, .lista-preparazione { list-style: none; font-family: sans-serif; font-size: 1.1rem; }
.lista-ingredienti li { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.lista-ingredienti li span { color: #00897b; }
.lista-preparazione li { margin-bottom: 12px; line-height: 1.6; }

.pergamena-colonna-media { display: flex; flex-direction: column; gap: 30px; }
.blocco-media h3 { font-size: 1.2rem; color: #5c3a21; margin-bottom: 12px; text-align: center; }

.cornice-legno {
    border: 8px solid #3e2723;
    background: #000;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8), 0 5px 15px rgba(0,0,0,0.5);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.cornice-legno img { width: 100%; height: auto; display: block; }

/* --- CONTENITORE VIDEO E CORALLI --- */
.video-coralli-container { position: relative; padding: 10px; }
.corallo-video { position: absolute; z-index: 10; height: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)); pointer-events: none; }
.cv-alto-sx { width: 55px; top: -5px; left: -5px; }
.cv-basso-dx { width: 70px; bottom: -8px; right: -5px; }
.cv-basso-sx { width: 60px; bottom: -5px; left: -8px; }

.video-responsive-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; width: 100%; }
.video-responsive-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* --- BOTTONE DI RITORNO MODIFICATO (STRUTTURA VERTICALE KRAKEN) --- */
.area-controlli { 
    text-align: center; 
    margin-top: 40px; 
}

.btn-torna-grotta {
    display: inline-flex;
    flex-direction: column; /* Dispone l'icona sopra e il testo sotto */
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.icona-kraken {
    width: 65px; /* Dimensione del polipetto */
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.btn-torna-grotta span {
    color: #ffca28;
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    border-bottom: 2px dashed transparent;
    transition: border-color 0.2s;
}

.btn-torna-grotta:hover {
    transform: scale(1.05);
}

.btn-torna-grotta:hover span {
    border-color: #ffca28; /* Effetto sottolineatura elegante al passaggio del mouse */
}
/* --- SEZIONE DOWNLOAD PDF --- */
.blocco-download {
    margin-top: 40px;
    padding: 20px;
    background: rgba(139, 69, 19, 0.05); /* Un leggero tono nocciola di fondo */
    border-radius: 10px;
    border: 2px dashed rgba(139, 69, 19, 0.3);
    text-align: center;
}

.blocco-download h2 {
    color: #5d4037 !important;
    font-size: 1.8rem !important;
}

.download-wrapper p {
    font-size: 1rem;
    margin-bottom: 20px;
    font-style: italic;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #8B4513; /* Marrone cuoio */
    color: #fff !important;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: #5d4037;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

.icona-pdf {
    width: 35px;
    height: auto;
    filter: brightness(0) invert(1); /* Rende l'icona bianca */
}

/* Responsive mobile */
@media (max-width: 600px) {
    .btn-download {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
    }
}
/* --- BOLLE BACKGROUND --- */
.sistema-bolle { position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; z-index: 3; }
.bolla { position: absolute; background: rgba(255,255,255,0.15); border-radius: 50%; }
.bolla-1 { width: 15px; height: 15px; left: 8%; bottom: 0; animation: risalitaBolla 14s linear infinite; }
.bolla-2 { width: 22px; height: 22px; left: 90%; bottom: 0; animation: risalitaBolla 18s linear infinite 3s; }
@keyframes risalitaBolla { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 0.4; } 90% { opacity: 0.4; } 100% { transform: translateY(-100vh); opacity: 0; } }

/* =========================================================
   MEDIA QUERIES TOTALMENTE RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .titolo-ricetta-completa { font-size: 1.8rem; }
    
    .card-pergamena {
        grid-template-columns: 1fr; /* Colonna singola su tablet e smartphone */
        padding: 25px;
        gap: 30px;
    }

    .tentacolo-cornice {
        width: 14vw;
        opacity: 0.3; /* Rimangono molto discreti */
    }

    /* GESTIONE ELEMENTI FONDALE SU SMARTPHONE */
    /* Spingiamo ancora più all'esterno forziere e bottiglie su schermi stretti per non intascare il layout */
    .fondale-bottiglie { left: -10px; opacity: 0.5; width: 18vw; }
    .fondale-forziere { right: -10px; opacity: 0.5; width: 22vw; }
}

@media (max-width: 480px) {
    .corallo-video { transform: scale(0.8); }
    .icona-kraken { width: 50px; } /* Rimpicciolisce leggermente il polipetto sui telefoni piccoli */
}