/* ==========================================================================
   FICHA PUBLICA DE VIVIENDA
   Primer bloque: cabecera + galeria + datos principales
   ========================================================================== */

.vivienda-page{
    background:#fff;
    color:#111827;
    font-family:Arial, Helvetica, sans-serif;
}

.vivienda-main{
    min-height:70vh;
}

.vivienda-container{
    width:min(1380px, calc(100% - 48px));
    margin:0 auto;
}


/* ==========================================================================
   CABECERA DE FICHA
   ========================================================================== */

.vivienda-top{
    padding:54px 0 28px;
}


.vivienda-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:40px;
}

.vivienda-heading__main{
    min-width:0;
    max-width:900px;
}

.vivienda-reference{
    margin:0 0 10px;
    color:#00a4e4;
    font-size:16px;
    font-weight:850;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.vivienda-heading h1{
    margin:0;
    color:#111827;
    font-size:clamp(34px,4vw,58px);
    font-weight:850;
    letter-spacing:-.045em;
    line-height:1.02;
}

.vivienda-location{
    margin:16px 0 0;
    color:#667085;
    font-size:16px;
    font-weight:600;
}

.vivienda-price{
    flex:0 0 auto;
    padding-bottom:4px;
    color:#111827;
    font-size:clamp(30px,3vw,44px);
    font-weight:850;
    letter-spacing:-.035em;
    white-space:nowrap;
}


/* ==========================================================================
   GALERIA
   ========================================================================== */

.vivienda-gallery-section{
    padding:0 0 28px;
}

.vivienda-gallery{
    display:grid;
    grid-template-columns:minmax(0,1fr) 150px;
    gap:14px;
}

.vivienda-gallery__main{
    position:relative;
    overflow:hidden;
    min-height:0;
    border-radius:22px;
    background:#f1f3f5;
}


.vivienda-gallery__counter{
    position:absolute;
    right:18px;
    bottom:18px;
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-height:38px;
    padding:0 14px;
    border:1px solid rgba(255,255,255,.35);
    border-radius:999px;
    background:rgba(17,24,39,.72);
    backdrop-filter:blur(12px);
    color:#fff;
    font-size:12px;
    font-weight:800;
}

.vivienda-gallery__thumbs{
    display:flex;
    flex-direction:column;
    gap:10px;
    max-height:640px;
    overflow-y:auto;
    padding-right:3px;
    scrollbar-width:thin;
}

.vivienda-gallery__thumb{
    position:relative;
    flex:0 0 auto;
    width:100%;
    height:100px;
    padding:0;
    overflow:hidden;
    border:2px solid transparent;
    border-radius:12px;
    background:#f1f3f5;
    cursor:pointer;
    opacity:.72;
    transition:
        opacity .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.vivienda-gallery__thumb:hover{
    opacity:1;
    transform:translateY(-1px);
}

.vivienda-gallery__thumb.is-active{
    border-color:#00a4e4;
    opacity:1;
}

.vivienda-gallery__thumb img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
}

.vivienda-gallery-empty{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:460px;
    padding:40px;
    border-radius:22px;
    background:#f6f7f8;
    color:#8a8f98;
    font-size:15px;
    font-weight:600;
}


/* ==========================================================================
   DATOS PRINCIPALES
   ========================================================================== */

.vivienda-summary{
    padding:0 0 76px;
}

.vivienda-facts{
    display:flex;
    align-items:stretch;
    gap:0;
    width:max-content;
    max-width:100%;
    overflow:hidden;
    border:1px solid #e6e8eb;
    border-radius:16px;
    background:#fff;
}

.vivienda-fact{
    display:flex;
    align-items:baseline;
    gap:7px;
    padding:18px 24px;
}

.vivienda-fact + .vivienda-fact{
    border-left:1px solid #e6e8eb;
}

.vivienda-fact strong{
    color:#111827;
    font-size:21px;
    font-weight:850;
}

.vivienda-fact span{
    color:#667085;
    font-size:13px;
    font-weight:650;
}

.vivienda-short-description{
    max-width:900px;
    margin:28px 0 0;
    color:#475467;
    font-size:18px;
    line-height:1.75;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 980px){

    .vivienda-container{
        width:min(100% - 32px, 1380px);
    }

    .vivienda-heading{
        align-items:flex-start;
        flex-direction:column;
        gap:18px;
    }

    .vivienda-price{
        padding-bottom:0;
    }

    .vivienda-gallery{
        grid-template-columns:1fr;
    }

    .vivienda-gallery__main{
        min-height:0;
    }

    .vivienda-gallery__thumbs{
        flex-direction:row;
        max-height:none;
        overflow-x:auto;
        overflow-y:hidden;
        padding:0 0 3px;
    }

    .vivienda-gallery__thumb{
        width:126px;
        height:86px;
    }
}

@media (max-width: 640px){

    .vivienda-container{
        width:calc(100% - 24px);
    }

    .vivienda-top{
        padding:30px 0 20px;
    }


    .vivienda-heading h1{
        font-size:34px;
        line-height:1.05;
    }

    .vivienda-location{
        margin-top:12px;
        font-size:14px;
    }

    .vivienda-price{
        font-size:32px;
    }

    .vivienda-gallery__main{
        min-height:0;
        border-radius:16px;
    }

    .vivienda-gallery__thumb{
        width:96px;
        height:68px;
        border-radius:10px;
    }

    .vivienda-summary{
        padding-bottom:54px;
    }

    .vivienda-facts{
        width:100%;
        display:grid;
        grid-template-columns:repeat(3,1fr);
    }

    .vivienda-fact{
        display:flex;
        align-items:flex-start;
        flex-direction:column;
        gap:3px;
        padding:15px 12px;
    }

    .vivienda-fact + .vivienda-fact{
        border-left:1px solid #e6e8eb;
    }

    .vivienda-fact strong{
        font-size:18px;
    }

    .vivienda-fact span{
        font-size:11px;
        line-height:1.25;
    }

    .vivienda-short-description{
        margin-top:22px;
        font-size:16px;
        line-height:1.7;
    }
}


/* ==========================================================================
   BLOQUE 2 · DESCRIPCION + CARACTERISTICAS
   ========================================================================== */

.vivienda-details{
    padding:0 0 96px;
}

.vivienda-details__grid{
    display:grid;
    grid-template-columns:minmax(0, 1.65fr) minmax(280px, .65fr);
    gap:28px;
    align-items:start;
}

.vivienda-details__main{
    min-width:0;
}

.vivienda-detail-card{
    padding:34px 36px;
    border:1px solid #e6e8eb;
    border-radius:22px;
    background:#fff;
}

.vivienda-detail-card + .vivienda-detail-card{
    margin-top:24px;
}

.vivienda-section-eyebrow{
    margin:0 0 8px;
    color:#00a4e4;
    font-size:12px;
    font-weight:800;
    letter-spacing:.12em;
    text-transform:uppercase;
}

.vivienda-detail-card h2{
    margin:0;
    color:#111827;
    font-size:30px;
    font-weight:850;
    letter-spacing:-.035em;
    line-height:1.1;
}

.vivienda-description__text{
    margin-top:24px;
    color:#475467;
    font-size:17px;
    line-height:1.85;
}

.vivienda-features__grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    margin-top:24px;
}

.vivienda-feature{
    display:flex;
    align-items:center;
    gap:11px;
    min-height:52px;
    padding:12px 14px;
    border:1px solid #eceef0;
    border-radius:13px;
    background:#fafbfc;
    color:#344054;
    font-size:14px;
    font-weight:650;
}

.vivienda-feature__mark{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 26px;
    width:26px;
    height:26px;
    border-radius:50%;
    background:#eaf7fd;
    color:#0089c7;
    font-size:13px;
    font-weight:900;
}

.vivienda-details__aside{
    position:sticky;
    top:98px;
}

.vivienda-extra{
    padding:30px;
}

.vivienda-extra__list{
    margin-top:22px;
}

.vivienda-extra__item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:16px 0;
    border-top:1px solid #eceef0;
}

.vivienda-extra__item:first-child{
    border-top:0;
    padding-top:0;
}

.vivienda-extra__item:last-child{
    padding-bottom:0;
}

.vivienda-extra__item span{
    color:#667085;
    font-size:13px;
    font-weight:650;
}

.vivienda-extra__item strong{
    color:#111827;
    font-size:14px;
    font-weight:800;
    text-align:right;
}

@media (max-width: 980px){

    .vivienda-details{
        padding-bottom:72px;
    }

    .vivienda-details__grid{
        grid-template-columns:1fr;
    }

    .vivienda-details__aside{
        position:static;
    }

    .vivienda-extra{
        max-width:none;
    }
}

@media (max-width: 640px){

    .vivienda-details{
        padding-bottom:54px;
    }

    .vivienda-detail-card{
        padding:26px 20px;
        border-radius:17px;
    }

    .vivienda-detail-card h2{
        font-size:25px;
    }

    .vivienda-description__text{
        margin-top:20px;
        font-size:16px;
        line-height:1.78;
    }

    .vivienda-features__grid{
        grid-template-columns:1fr;
        gap:9px;
        margin-top:20px;
    }

    .vivienda-feature{
        min-height:48px;
    }

    .vivienda-extra{
        padding:26px 20px;
    }
}


.vivienda-gallery__nav{
    position:absolute;
    top:50%;
    z-index:3;
    display:flex;
    align-items:center;
    justify-content:center;
    width:48px;
    height:48px;
    padding:0;
    border:1px solid rgba(255,255,255,.45);
    border-radius:50%;
    background:rgba(17,24,39,.58);
    backdrop-filter:blur(10px);
    color:#fff;
    font-size:34px;
    font-weight:400;
    line-height:0;
    cursor:pointer;
    transform:translateY(-50%);
    transition:
        transform .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.vivienda-gallery__nav:hover{
    background:rgba(17,24,39,.82);
    transform:translateY(-50%) scale(1.06);
    box-shadow:0 10px 24px rgba(0,0,0,.18);
}

.vivienda-gallery__nav--prev{
    left:18px;
}

.vivienda-gallery__nav--next{
    right:18px;
}

@media (max-width: 640px){

    .vivienda-reference{
        font-size:14px;
    }

    .vivienda-gallery__nav{
        width:42px;
        height:42px;
        font-size:30px;
    }

    .vivienda-gallery__nav--prev{
        left:12px;
    }

    .vivienda-gallery__nav--next{
        right:12px;
    }
}


/* ==========================================================================
   GALERIA · IMAGEN COMPLETA + FLECHAS CENTRADAS + ZOOM
   ========================================================================== */

.vivienda-gallery__open{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    padding:0;
    border:0;
    background:#f1f3f5;
    cursor:zoom-in;
}

.vivienda-gallery__open img{
    width:100%;
    height:auto;
    max-height:720px;
    object-fit:contain;
}

.vivienda-gallery__nav svg,
.vivienda-lightbox__nav svg{
    display:block;
    width:22px;
    height:22px;
    fill:none;
    stroke:currentColor;
    stroke-width:2.2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.vivienda-lightbox[hidden]{
    display:none;
}

.vivienda-lightbox{
    position:fixed;
    inset:0;
    z-index:9999;
}

.vivienda-lightbox__backdrop{
    position:absolute;
    inset:0;
    background:rgba(5,10,18,.92);
    backdrop-filter:blur(10px);
}

.vivienda-lightbox__dialog{
    position:relative;
    z-index:1;
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}

.vivienda-lightbox__stage{
    position:relative;
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    touch-action:none;
    cursor:grab;
}

.vivienda-lightbox__stage.is-dragging{
    cursor:grabbing;
}

.vivienda-lightbox__stage img{
    display:block;
    max-width:92vw;
    max-height:90vh;
    width:auto;
    height:auto;
    object-fit:contain;
    user-select:none;
    -webkit-user-drag:none;
    transform-origin:center center;
    will-change:transform;
}

.vivienda-lightbox__close,
.vivienda-lightbox__nav{
    position:absolute;
    z-index:3;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.28);
    background:rgba(17,24,39,.58);
    color:#fff;
    backdrop-filter:blur(10px);
    cursor:pointer;
    transition:
        transform .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.vivienda-lightbox__close{
    top:18px;
    right:18px;
    width:46px;
    height:46px;
    border-radius:50%;
    font-size:28px;
    line-height:1;
}

.vivienda-lightbox__nav{
    top:50%;
    width:50px;
    height:50px;
    border-radius:50%;
    transform:translateY(-50%);
}

.vivienda-lightbox__nav--prev{
    left:18px;
}

.vivienda-lightbox__nav--next{
    right:18px;
}

.vivienda-lightbox__nav:hover,
.vivienda-lightbox__close:hover{
    background:rgba(17,24,39,.85);
    box-shadow:0 10px 24px rgba(0,0,0,.2);
}

.vivienda-lightbox__nav:hover{
    transform:translateY(-50%) scale(1.06);
}

.vivienda-lightbox__close:hover{
    transform:scale(1.06);
}

.vivienda-lightbox__hint{
    position:absolute;
    left:50%;
    bottom:18px;
    z-index:3;
    transform:translateX(-50%);
    padding:8px 12px;
    border-radius:999px;
    background:rgba(17,24,39,.62);
    color:rgba(255,255,255,.9);
    font-size:12px;
    font-weight:650;
    white-space:nowrap;
    pointer-events:none;
}

body.is-lightbox-open{
    overflow:hidden;
}

@media (max-width: 640px){

    .vivienda-gallery__open img{
        max-height:none;
    }

    .vivienda-lightbox__stage img{
        max-width:100vw;
        max-height:100vh;
    }

    .vivienda-lightbox__nav{
        width:44px;
        height:44px;
    }

    .vivienda-lightbox__nav--prev{
        left:10px;
    }

    .vivienda-lightbox__nav--next{
        right:10px;
    }

    .vivienda-lightbox__close{
        top:10px;
        right:10px;
        width:42px;
        height:42px;
    }

    .vivienda-lightbox__hint{
        bottom:10px;
        max-width:calc(100% - 24px);
        white-space:normal;
        text-align:center;
    }
}


/* Separación del botón global "Volver a viviendas" respecto al contenido */
.vivienda-top .site-nav-button{
    margin-bottom:28px;
}

@media (max-width:640px){
    .vivienda-top .site-nav-button{
        margin-bottom:24px;
        font-size:15px;
    }
}


/* ==========================================================================
   CONTACTO FINAL DE LA FICHA
   ========================================================================== */

.vivienda-contact{
    padding:0 0 96px;
}

.vivienda-contact__panel{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(360px,.8fr);
    gap:54px;
    align-items:center;
    padding:46px 48px;
    border:1px solid #dceef6;
    border-radius:24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(0,164,228,.11), transparent 38%),
        linear-gradient(135deg,#fbfeff 0%,#f5fbfe 100%);
    box-shadow:0 18px 55px rgba(15,23,42,.06);
}

.vivienda-contact__copy{
    max-width:700px;
}

.vivienda-contact__copy h2{
    margin:0;
    color:#111827;
    font-size:clamp(34px,4vw,52px);
    font-weight:850;
    letter-spacing:-.045em;
    line-height:1;
}

.vivienda-contact__copy > p:not(.vivienda-section-eyebrow){
    max-width:620px;
    margin:18px 0 0;
    color:#475467;
    font-size:17px;
    line-height:1.7;
}

.vivienda-contact__reference{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    margin-top:24px;
    color:#00a4e4;
    font-size:14px;
    font-weight:800;
}

.vivienda-contact__reference span{
    color:#a8b4bf;
}

.vivienda-contact__actions{
    display:grid;
    gap:12px;
}

.vivienda-contact__button{
    display:grid;
    grid-template-columns:44px minmax(0,1fr) auto;
    align-items:center;
    gap:14px;
    min-height:72px;
    padding:12px 16px;
    border:1px solid #dce8ee;
    border-radius:16px;
    background:rgba(255,255,255,.92);
    color:#111827;
    text-decoration:none;
    box-shadow:0 7px 22px rgba(15,23,42,.04);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease,
        background-color .18s ease;
}

.vivienda-contact__button:hover,
.vivienda-contact__button:focus,
.vivienda-contact__button:visited{
    color:#111827;
    text-decoration:none;
}

.vivienda-contact__button:hover{
    transform:translateY(-3px);
    border-color:#00a4e4;
    background:#fff;
    box-shadow:0 14px 30px rgba(0,164,228,.13);
}

.vivienda-contact__button-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    border-radius:13px;
    background:#eef9fd;
    color:#00a4e4;
    transition:
        transform .18s ease,
        background-color .18s ease;
}

.vivienda-contact__button-icon svg{
    width:23px;
    height:23px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.vivienda-contact__button:hover .vivienda-contact__button-icon{
    transform:scale(1.05);
    background:#e2f5fc;
}

.vivienda-contact__button > span:nth-child(2){
    display:flex;
    flex-direction:column;
    min-width:0;
    gap:4px;
}

.vivienda-contact__button strong{
    color:#111827;
    font-size:15px;
    font-weight:800;
}

.vivienda-contact__button small{
    overflow:hidden;
    color:#667085;
    font-size:12px;
    font-weight:600;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.vivienda-contact__arrow{
    color:#111827;
    font-size:20px;
    font-weight:800;
    transition:transform .18s ease;
}

.vivienda-contact__button:hover .vivienda-contact__arrow{
    transform:translateX(4px);
}

/* WhatsApp mantiene coherencia Lexmar, con un matiz verde solo en el icono */
.vivienda-contact__button--whatsapp .vivienda-contact__button-icon{
    background:#ecfaf1;
    color:#1e9f58;
}

.vivienda-contact__button--whatsapp:hover{
    border-color:#1e9f58;
    box-shadow:0 14px 30px rgba(30,159,88,.12);
}

.vivienda-contact__button--whatsapp:hover .vivienda-contact__button-icon{
    background:#e2f7ea;
}


/* Teléfono con acento naranja */
.vivienda-contact__button--phone .vivienda-contact__button-icon{
    background:#fff3e8;
    color:#f28a2e;
}

.vivienda-contact__button--phone:hover{
    border-color:#f28a2e;
    box-shadow:0 14px 30px rgba(242,138,46,.14);
}

.vivienda-contact__button--phone:hover .vivienda-contact__button-icon{
    background:#ffead7;
}

@media (max-width:980px){

    .vivienda-contact{
        padding-bottom:72px;
    }

    .vivienda-contact__panel{
        grid-template-columns:1fr;
        gap:34px;
        padding:38px;
    }

    .vivienda-contact__actions{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .vivienda-contact__button{
        grid-template-columns:44px minmax(0,1fr);
    }

    .vivienda-contact__arrow{
        display:none;
    }
}

@media (max-width:760px){

    .vivienda-contact__actions{
        grid-template-columns:1fr;
    }

    .vivienda-contact__button{
        grid-template-columns:44px minmax(0,1fr) auto;
    }

    .vivienda-contact__arrow{
        display:block;
    }
}

@media (max-width:640px){

    .vivienda-contact{
        padding-bottom:54px;
    }

    .vivienda-contact__panel{
        gap:28px;
        padding:28px 20px;
        border-radius:18px;
    }

    .vivienda-contact__copy h2{
        font-size:34px;
    }

    .vivienda-contact__copy > p:not(.vivienda-section-eyebrow){
        margin-top:14px;
        font-size:15px;
        line-height:1.65;
    }

    .vivienda-contact__reference{
        margin-top:20px;
        font-size:13px;
    }

    .vivienda-contact__button{
        min-height:68px;
        border-radius:14px;
    }
}


/* ==========================================================================
   MAPA DE UBICACION
   ========================================================================== */

.vivienda-map-section{
    padding:0 0 96px;
}

.vivienda-map-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:36px;
    margin-bottom:24px;
}

.vivienda-map-heading > div:first-child{
    max-width:720px;
}

.vivienda-map-heading h2{
    margin:0;
    color:#111827;
    font-size:clamp(32px,3.4vw,46px);
    font-weight:850;
    letter-spacing:-.04em;
    line-height:1.05;
}

.vivienda-map-heading > div:first-child > p:not(.vivienda-section-eyebrow){
    margin:14px 0 0;
    color:#667085;
    font-size:16px;
    line-height:1.65;
}

.vivienda-map-status{
    display:flex;
    align-items:flex-start;
    gap:11px;
    max-width:390px;
    padding:14px 16px;
    border:1px solid #dceef6;
    border-radius:14px;
    background:#f8fcfe;
}

.vivienda-map-status__dot{
    flex:0 0 10px;
    width:10px;
    height:10px;
    margin-top:5px;
    border-radius:50%;
    background:#00a4e4;
    box-shadow:0 0 0 5px rgba(0,164,228,.10);
}

.vivienda-map-status > div{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.vivienda-map-status strong{
    color:#111827;
    font-size:13px;
    font-weight:800;
}

.vivienda-map-status span{
    color:#667085;
    font-size:12px;
    line-height:1.45;
}

.vivienda-map-card{
    position:relative;
    overflow:hidden;
    border:1px solid #dce8ee;
    border-radius:22px;
    background:#edf5f8;
    box-shadow:0 18px 52px rgba(15,23,42,.08);
    isolation:isolate;
}

.vivienda-map{
    width:100%;
    height:520px;
    background:#edf5f8;
}

.vivienda-map-card .leaflet-container{
    font-family:Arial, Helvetica, sans-serif;
}

.vivienda-map-card .leaflet-control-zoom{
    overflow:hidden;
    margin-top:18px;
    margin-left:18px;
    border:0;
    border-radius:12px;
    box-shadow:0 8px 24px rgba(15,23,42,.13);
}

.vivienda-map-card .leaflet-control-zoom a{
    width:38px;
    height:38px;
    line-height:38px;
    color:#111827;
    border:0;
    background:rgba(255,255,255,.96);
}

.vivienda-map-card .leaflet-control-zoom a:hover{
    background:#eef9fd;
    color:#00a4e4;
}

.vivienda-map-card .leaflet-control-attribution{
    padding:4px 7px;
    border-radius:8px 0 0 0;
    background:rgba(255,255,255,.88);
    color:#667085;
    font-size:10px;
}

.vivienda-map-pin{
    position:relative;
    width:26px;
    height:26px;
    border:4px solid #fff;
    border-radius:50% 50% 50% 0;
    background:#00a4e4;
    box-shadow:0 5px 16px rgba(0,91,128,.28);
    transform:rotate(-45deg);
}

.vivienda-map-pin::after{
    content:"";
    position:absolute;
    top:6px;
    left:6px;
    width:6px;
    height:6px;
    border-radius:50%;
    background:#fff;
}

.vivienda-map-badge{
    position:absolute;
    left:18px;
    bottom:18px;
    z-index:500;
    display:inline-flex;
    align-items:center;
    min-height:38px;
    padding:0 14px;
    border:1px solid rgba(255,255,255,.75);
    border-radius:999px;
    background:rgba(255,255,255,.93);
    backdrop-filter:blur(12px);
    color:#111827;
    box-shadow:0 8px 24px rgba(15,23,42,.11);
    font-size:12px;
    font-weight:800;
    pointer-events:none;
}

.vivienda-map-expand{
    position:absolute;
    top:18px;
    right:18px;
    z-index:500;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:42px;
    padding:0 14px;
    border:1px solid rgba(255,255,255,.80);
    border-radius:11px;
    background:rgba(255,255,255,.94);
    backdrop-filter:blur(12px);
    color:#111827;
    box-shadow:0 8px 24px rgba(15,23,42,.12);
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
    transition:
        transform .18s ease,
        color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.vivienda-map-expand svg{
    width:18px;
    height:18px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.vivienda-map-expand:hover{
    transform:translateY(-2px);
    border-color:#00a4e4;
    color:#00a4e4;
    box-shadow:0 12px 28px rgba(0,164,228,.15);
}

.vivienda-map-card.is-fullscreen{
    position:fixed;
    inset:0;
    z-index:9998;
    width:100vw;
    height:100dvh;
    border:0;
    border-radius:0;
}

.vivienda-map-card.is-fullscreen .vivienda-map{
    height:100dvh;
}

body.is-map-fullscreen{
    overflow:hidden;
}

@media (max-width:820px){

    .vivienda-map-section{
        padding-bottom:72px;
    }

    .vivienda-map-heading{
        align-items:flex-start;
        flex-direction:column;
        gap:18px;
    }

    .vivienda-map-status{
        width:100%;
        max-width:none;
        box-sizing:border-box;
    }

    .vivienda-map{
        height:460px;
    }
}

@media (max-width:640px){

    .vivienda-map-section{
        padding-bottom:54px;
    }

    .vivienda-map-heading{
        margin-bottom:18px;
    }

    .vivienda-map-heading h2{
        font-size:30px;
    }

    .vivienda-map-heading > div:first-child > p:not(.vivienda-section-eyebrow){
        font-size:14px;
    }

    .vivienda-map-card{
        border-radius:17px;
    }

    .vivienda-map{
        height:410px;
    }

    .vivienda-map-expand{
        top:12px;
        right:12px;
        min-height:40px;
        padding:0 12px;
    }

    .vivienda-map-badge{
        left:12px;
        bottom:12px;
        min-height:36px;
        padding:0 12px;
    }

    .vivienda-map-card .leaflet-control-zoom{
        margin-top:12px;
        margin-left:12px;
    }
}


/* ==========================================================================
   UBICACION + ACCESOS RAPIDOS
   ========================================================================== */

.vivienda-location-row{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:10px 16px;
    margin-top:16px;
}

.vivienda-location-row .vivienda-location{
    margin:0;
}

.vivienda-location-actions{
    display:inline-flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
}

.vivienda-location-action{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-height:32px;
    padding:0 10px;
    border:1px solid transparent;
    border-radius:9px;
    color:#00a4e4;
    font-size:12px;
    font-weight:750;
    line-height:1;
    text-decoration:none;
    transition:
        transform .18s ease,
        border-color .18s ease,
        background-color .18s ease,
        box-shadow .18s ease,
        color .18s ease;
}

.vivienda-location-action:hover,
.vivienda-location-action:focus,
.vivienda-location-action:visited{
    text-decoration:none;
}

.vivienda-location-action--map{
    border-color:#d8edf6;
    background:#f8fcfe;
    color:#00a4e4;
}

.vivienda-location-action--map:hover{
    transform:translateY(-2px);
    border-color:#00a4e4;
    background:#eef9fd;
    color:#008fc8;
    box-shadow:0 7px 18px rgba(0,164,228,.12);
}

.vivienda-location-action--contact{
    border-color:#e1e4e8;
    background:#fff;
    color:#111827;
}

.vivienda-location-action--contact:hover{
    transform:translateY(-2px);
    border-color:#111827;
    background:#f7f7f8;
    color:#111827;
    box-shadow:0 7px 18px rgba(17,24,39,.09);
}

.vivienda-location-action__icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:17px;
    height:17px;
    flex:0 0 17px;
}

.vivienda-location-action__icon svg{
    width:16px;
    height:16px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}

#vivienda-map-section,
#vivienda-contact-section{
    scroll-margin-top:110px;
}

@media (max-width:640px){

    .vivienda-location-row{
        align-items:flex-start;
        gap:9px 10px;
        margin-top:13px;
    }

    .vivienda-location-actions{
        width:100%;
    }

    .vivienda-location-action{
        min-height:34px;
        padding:0 10px;
    }

    #vivienda-map-section,
    #vivienda-contact-section{
        scroll-margin-top:88px;
    }
}


/* ==========================================================================
   404 DE FICHA DE VIVIENDA
   ========================================================================== */

.vivienda-404{
    min-height:calc(100vh - 166px);
    display:flex;
    align-items:center;
    padding:72px 0 92px;
}

.vivienda-404__panel{
    max-width:820px;
    margin:0 auto;
    padding:58px 56px;
    border:1px solid #dceef6;
    border-radius:24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(0,164,228,.11), transparent 40%),
        linear-gradient(135deg,#fbfeff 0%,#f6fbfe 100%);
    box-shadow:0 18px 55px rgba(15,23,42,.06);
    text-align:center;
}

.vivienda-404__panel h1{
    max-width:680px;
    margin:0 auto;
    color:#111827;
    font-size:clamp(38px,5vw,64px);
    font-weight:850;
    letter-spacing:-.05em;
    line-height:1;
}

.vivienda-404__panel > p:not(.vivienda-section-eyebrow){
    max-width:620px;
    margin:22px auto 0;
    color:#667085;
    font-size:17px;
    line-height:1.7;
}

.vivienda-404__actions{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:14px;
    margin-top:30px;
}

.vivienda-404__secondary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:0 17px;
    border:1px solid #111827;
    border-radius:11px;
    background:#fff;
    color:#111827;
    box-sizing:border-box;
    font-size:13px;
    font-weight:700;
    text-decoration:none;
    transition:
        color .18s ease,
        background-color .18s ease;
}

.vivienda-404__secondary:hover{
    transform:translateY(-2px);
    border-color:#111827;
    background:#f7f7f8;
    color:#111827;
    box-shadow:0 7px 18px rgba(17,24,39,.09);
    text-decoration:none;
}

@media (max-width:640px){

    .vivienda-404{
        padding:46px 0 58px;
    }

    .vivienda-404__panel{
        padding:38px 22px;
        border-radius:18px;
    }

    .vivienda-404__panel h1{
        font-size:38px;
    }

    .vivienda-404__panel > p:not(.vivienda-section-eyebrow){
        margin-top:18px;
        font-size:15px;
    }

    .vivienda-404__actions{
        flex-direction:column;
        margin-top:26px;
    }

    .vivienda-404__actions .site-nav-button,
    .vivienda-404__secondary{
        width:100%;
        box-sizing:border-box;
    }
}


/* Ajustes finales de botones 404 */
.vivienda-404__primary{
    justify-content:center;
}

