/* ===================================================
   NDS — PAGINA RETE (Artigiani)
   Layout alternato foto/video + testo
   Design system Nido di Seta · luxury minimal
   =================================================== */


/* ===== HERO ===== */
.nds-rete-hero {
    position: relative;
    min-height: 70vh;
    height: 70vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* L'overlay scuro è gestito da .nds-hero-row::before in style-global.css */

.nds-rete-hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.nds-rete-hero-label {
    font-family: "Inter", sans-serif !important;
    font-size: 10px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: var(--nds-gold-pale) !important;
    display: block;
    margin-bottom: 6px;
}

.nds-rete-hero-title {
    font-family: "Ambroise Std", serif !important;
    font-size: clamp(24px, 3vw, 48px) !important;
    font-weight: 300 !important;
    color: var(--nds-white) !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    letter-spacing: 2px;
}


/* ===== INTRO ===== */
.nds-rete-intro {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    padding: 100px 20px;
}

.nds-rete-intro-label {
    font-family: "Inter", sans-serif !important;
    font-size: 10px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: var(--nds-gold-light) !important;
    display: block;
    margin-bottom: 8px;
}

.nds-rete-intro-text {
    font-family: "Inter", sans-serif !important;
    font-size: clamp(16px, 2vw, 20px) !important;
    font-weight: 300 !important;
    line-height: 1.8 !important;
    color: var(--nds-text) !important;
    margin: 0 0 24px !important;
}

.nds-rete-intro-body {
    font-family: "Inter", sans-serif !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    line-height: 1.9 !important;
    color: var(--nds-text-secondary) !important;
    max-width: 720px;
    margin: 0 auto !important;
}


/* ===== MAPPA — full bleed fuori dal container Bridge ===== */

/*
   Bridge renderizza page-rete.php dentro .container > .container_inner
   che ha max-width 1320px e padding laterali.
   Usiamo il classico trucco full-bleed con margin/width su 100vw
   per portare la sezione e la mappa a larghezza schermo intera.
*/
.nds-mappa-section {
    background: var(--nds-bg-cream);
    padding: 20px 0 0;
    margin-bottom: 0;

    /* full-bleed: sfora dal container */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;

    box-sizing: border-box;
    overflow: hidden;
}

.nds-mappa-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 8%;
}

.nds-mappa-label {
    font-family: "Inter", sans-serif !important;
    font-size: 10px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: var(--nds-gold-light) !important;
    display: block;
    margin-bottom: 8px;
}

.nds-mappa-title {
    font-family: "Ambroise Std", serif !important;
    font-size: clamp(28px, 3vw, 42px) !important;
    font-weight: 300 !important;
    line-height: 1.15 !important;
    color: var(--nds-dark) !important;
    margin: 0 !important;
}

#nds-mappa {
    width: 100%;
    height: 500px;
    display: block;
    border-top: 1px solid var(--nds-border);
    /* stacco visivo dalla sezione successiva tramite box-shadow verso il basso */
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

/* Stacco dalla prima scheda artigiano */
.nds-mappa-section + .nds-rete-row {
    margin-top: 0;
    border-top: none;
}

/* Override InfoWindow Google Maps */
.gm-style .gm-style-iw-c {
    border-radius: 0 !important;
    padding: 12px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12) !important;
}

.gm-style .gm-style-iw-d {
    overflow: auto !important;
}


/* ===== RIGHE ARTIGIANI (layout alternato) ===== */
.nds-rete-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 520px;
}

/* Dispari (default): media sx, testo dx */
.nds-rete-row .nds-rete-media  { order: 1; }
.nds-rete-row .nds-rete-content { order: 2; }

/* Pari (reversed): testo sx, media dx */
.nds-rete-row--reversed .nds-rete-media  { order: 2; }
.nds-rete-row--reversed .nds-rete-content { order: 1; }

/* Sfondi alternati per le colonne testo */
.nds-rete-row:nth-child(odd) .nds-rete-content {
    background: var(--nds-white);
}

.nds-rete-row:nth-child(even) .nds-rete-content {
    background: var(--nds-bg-cream);
}


/* ===== COLONNA MEDIA ===== */
.nds-rete-media {
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.nds-rete-foto {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Video embed (YouTube / Vimeo) — container 16:9 a piena altezza */
.nds-rete-video-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 520px;
    overflow: hidden;
    background: var(--nds-dark);
}

.nds-rete-video-wrap iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-height: 520px;
    transform: translate(-50%, -50%);
    border: 0;
}

/* Video file MP4 */
.nds-rete-video-file {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    display: block;
    background: var(--nds-dark);
}


/* ===== COLONNA TESTO ===== */
.nds-rete-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 8%;
    min-height: 520px;
    box-sizing: border-box;
}

.nds-rete-label {
    font-family: "Inter", sans-serif !important;
    font-size: 10px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: var(--nds-gold-light) !important;
    display: block;
    margin-bottom: 8px;
}

.nds-rete-nome {
    font-family: "Ambroise Std", serif !important;
    font-size: clamp(28px, 3vw, 42px) !important;
    font-weight: 300 !important;
    line-height: 1.15 !important;
    color: var(--nds-dark) !important;
    margin: 0 0 24px !important;
}

.nds-rete-bio {
    font-family: "Inter", sans-serif !important;
    font-size: 13px !important;
    font-weight: 300 !important;
    line-height: 1.9 !important;
    color: var(--nds-text-secondary) !important;
    max-width: 480px;
    margin: 0 !important;
}

/* Eventuali <br> generati da ACF */
.nds-rete-bio br {
    display: block;
    content: "";
    margin-top: 12px;
}


/* ===== EMPTY STATE ===== */
.nds-rete-empty {
    text-align: center;
    padding: 80px 20px;
}

.nds-rete-empty p {
    font-family: "Inter", sans-serif !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    color: var(--nds-text-faint) !important;
    letter-spacing: 1px;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

    .nds-rete-intro {
        padding: 70px 24px;
    }

    .nds-mappa-section {
        padding: 60px 0 0;
    }

    .nds-mappa-header {
        padding: 0 24px;
    }

    #nds-mappa {
        height: 320px;
    }

    .nds-rete-row {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    /* Su mobile: sempre media sopra, testo sotto */
    .nds-rete-row .nds-rete-media   { order: 1 !important; }
    .nds-rete-row .nds-rete-content { order: 2 !important; }

    .nds-rete-foto {
        min-height: 300px;
        max-height: 50vh;
    }

    .nds-rete-video-wrap {
        min-height: 260px;
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .nds-rete-video-wrap iframe {
        min-height: 260px;
    }

    .nds-rete-video-file {
        min-height: 260px;
        max-height: 50vh;
    }

    .nds-rete-content {
        padding: 48px 24px;
        min-height: auto;
    }

    .nds-rete-bio {
        max-width: 100%;
    }
}
