/* ===== Proyectos: cards del home + página del proyecto ===== */

/* ---------- Carrusel de cards  [rbl_proyectos] ---------- */
.rbl-pcards { --per-view: 3; --gap: 22px; width: 100%; }
.rbl-pcards__stage { position: relative; }
.rbl-pcards.is-activo .rbl-pcards__stage { padding: 0 46px; }
.rbl-pcards__viewport { overflow: hidden; }
.rbl-pcards__track { display: flex; gap: var(--gap); will-change: transform; }
.rbl-pcards:not(.is-activo) .rbl-pcards__track { justify-content: center; }

.rbl-pcards__nav { display: none; }
.rbl-pcards.is-activo .rbl-pcards__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #c0b49d;
    color: #fff;
    cursor: pointer;
    line-height: 0;
    box-shadow: none;
    transition: background .2s ease;
}
.rbl-pcards.is-activo .rbl-pcards__nav:hover,
.rbl-pcards.is-activo .rbl-pcards__nav:focus-visible { background: #a89b82; }
.rbl-pcards__nav--prev { left: 6px; }
.rbl-pcards__nav--next { right: 6px; }

.rbl-pcard {
    position: relative;
    display: block;
    flex: 0 0 calc((100% - var(--gap) * (var(--per-view) - 1)) / var(--per-view));
    min-width: 0;
    aspect-ratio: 254 / 280;
    overflow: hidden;
    border-radius: 18px;
    background: #4f5660;
    color: #fff;
    text-decoration: none;
}
.rbl-pcard__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform .6s ease;
}
.rbl-pcard:hover .rbl-pcard__bg { transform: scale(1.04); }
.rbl-pcard__tag {
    position: absolute;
    top: 16px;
    left: 0;
    padding: 9px 18px;
    border-radius: 0 8px 8px 0;
    color: #fff;
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1;
}
.rbl-pcard__info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    padding: 18px 20px;
    background: rgba(79, 86, 96, .72);
    color: #fff;
}
.rbl-pcard__titulo {
    display: block;
    margin-bottom: 2px;
    font-size: 1.15rem;
    line-height: 1.2;
    text-transform: uppercase;
}
.rbl-pcard__l { display: block; font-size: .8rem; line-height: 1.35; }
.rbl-pcard__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-height: 0;
    margin-top: 0;
    padding: 0 10px;
    overflow: hidden;
    opacity: 0;
    border-radius: 4px;
    background: #0a3fd8;
    color: #fff;
    font-size: .75rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    transition: max-height .3s ease, opacity .3s ease, margin-top .3s ease, padding .3s ease;
}
.rbl-pcard:hover .rbl-pcard__btn,
.rbl-pcard:focus-visible .rbl-pcard__btn {
    max-height: 40px;
    margin-top: 10px;
    padding: 9px 10px;
    opacity: 1;
}
@media (hover: none) {
    .rbl-pcard__btn { max-height: 40px; margin-top: 10px; padding: 9px 10px; opacity: 1; }
}
@media (max-width: 1024px) { .rbl-pcards { --per-view: 2; } }
@media (max-width: 600px)  { .rbl-pcards { --per-view: 1; } }

/* ---------- Página del proyecto ---------- */
.single-proyectos .site-content > .ast-container,
.single-proyectos #content .ast-container { max-width: none; padding: 0; display: block; }
.single-proyectos #primary { width: 100%; max-width: none; margin: 0; padding: 0; }

.rbl-proy {
    --rbl-hero-top: clamp(84px, 6vw, 118px);
    --beige: #c0b49d;
    --gris: #4f5660;
    color: var(--gris);
    width: 100%;
}
.rbl-proy *, .rbl-proy *::before, .rbl-proy *::after { box-sizing: border-box; }
.rbl-proy-wrap { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.rbl-proy-h2 { margin: 0 0 32px; text-align: center; color: var(--gris); font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 300; line-height: 1.2; }
.rbl-proy-h2--left { text-align: left; margin-bottom: 18px; }
.rbl-proy-h2 strong, .rbl-proy-h2 b { font-weight: 700; }

/* 1. Encabezado */
.rbl-proy-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(380px, 40vw, 580px);
    background-color: #6c8bb0;
    background-size: cover;
    background-position: center;
}
.rbl-proy-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 60%); }
.rbl-proy-hero__in {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: var(--rbl-hero-top) clamp(20px, 5vw, 70px) clamp(32px, 4vw, 56px);
    color: #fff;
}
.rbl-proy-tag {
    display: inline-block;
    margin-bottom: 18px;
    padding: 10px 18px;
    border-radius: 8px;
    color: #fff;
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1;
}
.rbl-proy-hero__titulo { margin: 0; color: #fff; font-size: clamp(1.8rem, 3.6vw, 3rem); font-weight: 300; line-height: 1.1; text-transform: uppercase; }
.rbl-proy-hero__precio { margin: 6px 0 0; color: #fff; font-size: clamp(1.2rem, 2.2vw, 1.8rem); font-weight: 300; }

/* 2. Barra de datos */
.rbl-proy-specs { background: #e9ecec; padding: 31.2px 20px; } /* arriba/abajo +20 % (antes 26px) */
.rbl-proy-specs__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 56px; margin: 0 auto; padding: 0; max-width: 1000px; list-style: none; }
.rbl-proy-spec { display: flex; align-items: center; gap: 14px; margin: 0; }
.rbl-proy-spec__ic { display: block; width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.rbl-proy-spec__txt { display: flex; flex-direction: column; font-size: .8rem; line-height: 1.3; }
.rbl-proy-spec__txt strong { font-size: .88rem; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; }
.rbl-proy-spec__txt span { color: #7a7f87; }

/* 3. Descripción */
.rbl-proy-desc { padding: clamp(36px, 5vw, 64px) 0; background: #fff; }
.rbl-proy-desc__grid { display: grid; grid-template-columns: 34% 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.rbl-proy-desc__foto img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 22px; }
.rbl-proy-desc__contenido { color: #6b717b; font-size: .8rem; line-height: 2; }
.rbl-proy-desc__contenido p { margin: 0 0 1em; }
.rbl-proy-stats { display: flex; justify-content: space-around; gap: 12px; margin-top: 22px; padding: 18px 12px; border-radius: 18px; background: #e9ecec; text-align: center; }
.rbl-proy-stat { display: flex; flex-direction: column; align-items: center; flex: 1; }
.rbl-proy-stat__n { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 300; line-height: 1; color: var(--gris); }
.rbl-proy-stat__t { margin-top: 6px; color: #8a8f97; font-size: .66rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1.2; }

/* 4. Galería */
.rbl-proy-gal { padding: clamp(36px, 5vw, 64px) 0; background: #f1efeb; }
.rbl-gal { --thumbs: 4; --tgap: 12px; }
.rbl-gal__main { position: relative; overflow: hidden; border-radius: 22px; background: #d9d2c4; }
.rbl-gal__slides { display: grid; }
.rbl-gal__slide {
    grid-area: 1 / 1;
    position: relative;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 0;
    transition: opacity 0s linear .8s, visibility 0s linear .8s;
}
.rbl-gal__slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity .8s ease, visibility 0s; }
.rbl-gal__slide img { display: block; width: 100%; aspect-ratio: 1.82 / 1; object-fit: cover; cursor: zoom-in; }
.rbl-gal__cap {
    position: absolute;
    left: 0;
    bottom: 22px;
    max-width: 70%;
    padding: 14px 34px 14px 38px;
    border-radius: 0 12px 12px 0;
    background: rgba(79, 86, 96, .92);
    color: #fff;
    font-size: .95rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    pointer-events: none;
}
.rbl-gal__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(225, 225, 225, .75);
    color: #4f5660;
    cursor: pointer;
    line-height: 0;
}
.rbl-gal__nav:hover { background: rgba(245, 245, 245, .95); }
.rbl-gal__nav--prev { left: 14px; }
.rbl-gal__nav--next { right: 14px; }

.rbl-gal__thumbs { margin-top: 14px; }
.rbl-gal__tview { overflow: hidden; }
.rbl-gal__ttrack { display: flex; gap: var(--tgap); transition: transform .5s ease; will-change: transform; }
.rbl-gal__thumb {
    flex: 0 0 calc((100% - var(--tgap) * (var(--thumbs) - 1)) / var(--thumbs));
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #d9d2c4;
    cursor: pointer;
    opacity: .75;
    transition: opacity .25s ease;
    line-height: 0;
}
.rbl-gal__thumb img { display: block; width: 100%; aspect-ratio: 1.2 / 1; object-fit: cover; }
.rbl-gal__thumb:hover, .rbl-gal__thumb.is-active { opacity: 1; }
.rbl-gal__thumb.is-active { outline: 2px solid var(--beige); outline-offset: -2px; }

/* 5. Ubicación */
.rbl-proy-ubic { padding: clamp(36px, 5vw, 64px) 0 clamp(20px, 3vw, 32px); background: #fff; }
/* Mapa ~30 % más grande: sección más ancha (1180 px) y columna del mapa 1.2fr frente a 1fr del texto
   (en 1000 px el mapa medía ~460 px; ahora ~600 px) */
.rbl-proy-ubic .rbl-proy-wrap { max-width: 1180px; }
.rbl-proy-ubic__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 4vw, 40px); align-items: center; }
.rbl-proy-ubic__mapa img { display: block; width: 100%; height: auto; border-radius: 22px; }
.rbl-proy-ubic__dir { margin: 0 0 14px; color: #7a7f87; font-size: .8rem; line-height: 1.4; }
.rbl-proy-ubic__cta { margin: 0 0 14px; color: var(--gris); font-size: .8rem; }
/* Botones de ubicación: anchos, con el icono a la derecha del texto */
.rbl-proy-ubic__btns { display: flex; flex-wrap: wrap; gap: 16px; }
.rbl-proy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex: 1 1 200px;
    max-width: 260px;
    min-height: 56px;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: none;
    transition: opacity .2s ease, background .2s ease;
}
.rbl-proy-btn img { display: block; width: auto; height: 1.3em; max-width: 1.6em; flex: 0 0 auto; }
.rbl-proy-btn--waze { background: #c3b3a5; color: #fff; border: 1px solid #c3b3a5; }
.rbl-proy-btn--gmaps { background: #fff; color: var(--gris); border: 1px solid #c3b3a5; }
.rbl-proy-btn:hover { opacity: .85; }

/* 6. Planos */
.rbl-proy-planos { padding: 10px 0 clamp(40px, 5vw, 72px); background: #fff; }
.rbl-plan__tabs { display: flex; justify-content: center; gap: clamp(8px, 2vw, 22px); margin-bottom: 18px; }
.rbl-plan__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 4px 14px 8px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    color: var(--gris);
    font-size: .9rem;
    line-height: 1.2;
    cursor: pointer;
    letter-spacing: .02em;
}
.rbl-plan__tab span:first-child { font-size: .8rem; }
.rbl-plan__tab.is-active { border-bottom-color: var(--beige); }
.rbl-plan__stage { position: relative; padding: 0 56px; }
.rbl-plan__box { display: grid; border: 1px solid #d6d6d6; background: #fff; }
.rbl-plan__slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; z-index: 0; display: flex; align-items: center; justify-content: center; aspect-ratio: 1.38 / 1; transition: opacity 0s linear .6s, visibility 0s linear .6s; }
.rbl-plan__slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity .6s ease, visibility 0s; }
.rbl-plan__slide img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; cursor: zoom-in; }
.rbl-plan__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: var(--beige);
    color: #fff;
    cursor: pointer;
    line-height: 0;
    transition: background .2s ease;
}
.rbl-plan__nav:hover { background: #a89b82; }
.rbl-plan__nav--prev { left: 10px; }
.rbl-plan__nav--next { right: 10px; }

/* Lightbox (caja de luz) */
.rbl-lb {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 64px;
    background: rgba(20, 22, 26, .92);
}
.rbl-lb[hidden] { display: none; }
.rbl-lb__fig { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.rbl-lb__img { display: block; max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; margin: 0 auto; border-radius: 6px; background: #fff; }
.rbl-lb__cap { margin-top: 12px; color: #fff; font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; }
.rbl-lb__btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.rbl-lb__btn:hover { background: rgba(255, 255, 255, .3); }
.rbl-lb__close { top: 14px; right: 14px; }
.rbl-lb__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.rbl-lb__next { right: 14px; top: 50%; transform: translateY(-50%); }
.rbl-lb-bloqueo { overflow: hidden; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
    .rbl-proy-specs__list { gap: 22px 36px; }
    .rbl-proy-desc__grid { grid-template-columns: 40% 1fr; }
    .rbl-gal { --thumbs: 4; }
}

/* ---------- Celular ---------- */
@media (max-width: 767px) {
    .rbl-proy-hero__in { text-align: center; }
    .rbl-proy-specs__list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; }
    .rbl-proy-spec { flex-direction: column; text-align: center; gap: 8px; }
    .rbl-proy-spec__txt { align-items: center; }
    .rbl-proy-desc__grid { grid-template-columns: 1fr; }
    .rbl-proy-desc__foto { max-width: 320px; margin: 0 auto; }
    .rbl-gal { --thumbs: 3; --tgap: 8px; }
    .rbl-gal__cap { bottom: 12px; padding: 10px 20px 10px 18px; font-size: .75rem; }
    .rbl-gal__nav { width: 30px; height: 30px; }
    .rbl-proy-ubic__grid { grid-template-columns: 1fr; }
    .rbl-proy-h2--left { text-align: center; }
    .rbl-proy-ubic__txt { text-align: center; }
    .rbl-proy-ubic__btns { justify-content: center; }
    .rbl-plan__stage { padding: 0 38px; }
    .rbl-plan__nav { width: 26px; height: 26px; }
    .rbl-plan__nav--prev { left: 4px; }
    .rbl-plan__nav--next { right: 4px; }
    .rbl-plan__tab { padding: 4px 8px 8px; font-size: .8rem; }
    .rbl-lb { padding: 56px 12px; }
}
