﻿html,
body {
    overflow-x: hidden;
}

/* =========================
   RITROVAMENTO
========================= */


/* layout principale */

.layout-sidebar {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    width: calc(100% - 36px);
    max-width: 1000px;
    margin: 30px auto 60px;
    padding: 0;
    /* =========================
   SIDEBAR
========================= */

    .sidebar-storia {
        width: 240px;
        flex-shrink: 0;
    }
    /* =========================
   CONTENUTO
========================= */

    .ritrovamento-content {
        flex: 1 1 0;
        min-width: 0;
        background: #f3efe3;
        padding: 40px 42px 70px;
        border: 1px solid #d8d1bf;
        box-shadow: 0 3px 12px rgba(0,0,0,0.10);
        box-sizing: border-box;
        overflow-x: hidden;
    }
        /* =========================
   TITOLO
========================= */

        .ritrovamento-content h1 {
            text-align: center;
            font-size: 40px;
            font-weight: 300;
            color: #1d1d1d;
            margin-bottom: 42px;
            letter-spacing: 1px;
        }
    /* =========================
   TESTO
========================= */

    .storia-testo {
        max-width: 920px;
        margin: 0 auto;
        font-size: 15px;
        line-height: 1.2;
        color: #222;
    }
    /* accapo */

    .accapo-stretto br {
        line-height: 0.8;
    }
    /* =========================
   NOTA FONTE
========================= */

    .nota-fonte {
        text-align: center;
        margin-bottom: 40px;
    }

    .nota-testo {
        margin-top: 18px;
    }
    /* =========================
   LINK
========================= */

    .link-azionemare {
        color: #355b7b;
        text-decoration: none;
    }

        .link-azionemare:hover {
            text-decoration: underline;
        }
    /* =========================
   MENU SIDEBAR
========================= */

    .sidebar-menu {
        background: #214762;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    }

        .sidebar-menu h3 {
            margin: 0;
            padding: 18px 16px;
            background: #173750;
            color: #f0e2b6;
            font-size: 18px;
            font-family: Georgia, serif;
            font-weight: normal;
            border-bottom: 1px solid rgba(255,255,255,0.12);
        }

        .sidebar-menu ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .sidebar-menu li {
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }

            .sidebar-menu li:last-child {
                border-bottom: none;
            }

            .sidebar-menu li a {
                display: block;
                padding: 14px 18px;
                color: #f5ecd2;
                text-decoration: none;
                font-size: 15px;
                line-height: 1.4;
                transition: background 0.2s ease, padding-left 0.2s ease;
            }

                .sidebar-menu li a:hover {
                    background: #102b40;
                    padding-left: 24px;
                    color: #ffffff;
                }
    /* =========================
   IMMAGINI
========================= */

    .prologo-img {
        display: block;
        height: auto;
        margin: 24px auto;
        border: 1px solid #c8bda5;
        box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    }

    .img-piccola {
        width: 420px;
        max-width: 100%;
    }

    .img-media {
        width: 620px;
        max-width: 100%;
    }

    .img-grande {
        width: 820px;
        max-width: 100%;
    }
    /* =========================
   RESPONSIVE
========================= */

    @media screen and (max-width: 900px) {

        .layout-sidebar {
            flex-direction: column;
        }

        .sidebar-storia {
            width: 100%;
        }

        .ritrovamento-content {
            padding: 24px;
        }

            .ritrovamento-content h1 {
                font-size: 34px;
            }

        .storia-testo {
            font-size: 16px;
        }
    }

    html,
    body {
        overflow-x: hidden;
    }

    .mappa-container {
        width: 100%;
        margin-top: 30px;
    }

        .mappa-container iframe {
            width: 100%;
            height: 800px;
            border: 1px solid #c8bda5;
            box-shadow: 0 2px 8px rgba(0,0,0,.12);
        }

    .video-container {
        max-width: 900px;
        margin: 30px auto;
    }

        .video-container iframe {
            width: 100%;
            aspect-ratio: 16 / 9;
            border: 1px solid #c8bda5;
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        }
    /* =========================
   GALLERIA RELITTO
========================= */

    .galleria-relitto {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
        margin-top: 35px;
    }

    .thumb-relitto {
        cursor: pointer;
    }

        .thumb-relitto img {
            width: 100%;
            height: 180px;
            object-fit: cover;
            display: block;
            border: 1px solid #c8bda5;
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .thumb-relitto:hover img {
            transform: scale(1.03);
            box-shadow: 0 4px 12px rgba(0,0,0,0.18);
        }

        .thumb-relitto .internamento-caption {
            margin-top: 8px;
            text-align: center;
            font-size: 14px;
            color: #555;
        }
    /* =========================
   LIGHTBOX
========================= */

    .lightbox {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.92);
        z-index: 99999;
    }

        .lightbox img {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            max-width: 92%;
            max-height: 92%;
            width: auto;
            height: auto;
            box-shadow: 0 0 30px rgba(0,0,0,0.5);
        }
    /* chiusura */

    .chiudi {
        position: absolute;
        top: 18px;
        right: 30px;
        color: #fff;
        font-size: 52px;
        cursor: pointer;
        user-select: none;
        z-index: 100000;
    }
    /* frecce */

    .prev,
    .next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        color: #ffffff;
        font-size: 64px;
        font-weight: normal;
        cursor: pointer;
        user-select: none;
        padding: 12px;
        z-index: 100000;
    }

    .prev {
        left: 25px;
    }

    .next {
        right: 25px;
    }

        .prev:hover,
        .next:hover,
        .chiudi:hover {
            color: #f0e2b6;
        }
    /* =========================
   RESPONSIVE
========================= */

    @media screen and (max-width: 900px) {

        .galleria-relitto {
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 15px;
        }

        .thumb-relitto img {
            height: 140px;
        }

        .prev,
        .next {
            font-size: 46px;
        }

        .chiudi {
            font-size: 42px;
        }
    }
    /* =========================
   FOTO INTRODUTTIVA
========================= */

    .foto-copertina {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 35px 0 45px;
    }

        .foto-copertina img {
            display: block;
            max-width: 500px;
            width: 100%;
            height: auto;
            border: 1px solid #c8bda5;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 10px 25px rgba(0,0,0,0.12);
        }

    .foto-copertina-didascalia {
        margin-top: 10px;
        font-size: 14px;
        color: #666;
        font-style: italic;
    }