/* =========================================================
   1. ESTRUCTURA GENERAL
========================================================= */

.rpe-showcase {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 760px;
    overflow: hidden;

    color: #fff;
    font-family: Montserrat, Arial, sans-serif;
    background: #1d2329;
}

.rpe-showcase * {
    box-sizing: border-box;
}

.rpe-inner {
    position: relative;
    z-index: 3;

    display: flex;
    flex-direction: column;

    max-width: 1240px;
    min-height: inherit;

    margin: 0 auto;
    padding: 44px 42px 54px;
}


/* =========================================================
   2. FONDOS
========================================================= */

.rpe-backgrounds,
.rpe-bg,
.rpe-bg-overlay {
    position: absolute;
    inset: 0;
}

.rpe-bg {
    background-image: var(--rpe-bg-desktop, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 0;
    transform: scale(1.01);

    transition:
        opacity 0.45s ease,
        transform 1s ease;
}

.rpe-bg.is-active {
    opacity: 1;
    transform: scale(1);
}

.rpe-bg-overlay {
    z-index: 2;
    background: rgba(10, 18, 26, 0.42);
}


/* =========================================================
   3. ENCABEZADO
========================================================= */

.rpe-heading {
    max-width: 760px;
    margin: 0 auto 24px;

    text-align: center;
}

.rpe-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 17px;

    border-radius: 4px;
    background: #9a765b;

    font-size: 14px;
    font-weight: 700;
    line-height: 1;

    text-transform: uppercase;
}

.rpe-heading h2 {
    margin: 22px 0 10px;

    color: #fff;

    font-size: 36px;
    font-weight: 700;
    line-height: 1.12;
}

.rpe-heading p {
    margin: 0;

    color: #fff;

    font-size: 17px;
    line-height: 1.45;
}


/* =========================================================
   4. TABS / BOTONES DE PROYECTOS
========================================================= */

.rpe-tabs {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    align-self: center;

    gap: 6px;

    margin: 0 auto 34px;
    padding: 6px;

    left: auto;
    right: auto;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
}

.rpe-tab {
    appearance: none;

    padding: 12px 28px;

    border: 0;
    border-radius: 999px;

    background: transparent;

    color: #fff;

    font: inherit;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.1;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.rpe-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.rpe-tab.is-active {
    background: #fff;
    color: #000;

    font-weight: 700;
}


/* =========================================================
   5. CONTENIDO
========================================================= */

.rpe-content-wrap {
    position: relative;

    display: flex;
    align-items: flex-start;
    justify-content: flex-start;

    flex: 1;
}


/* =========================================================
   6. TARJETA
========================================================= */

.rpe-card {
    display: none;

    width: 520px;
    max-width: 100%;

    padding: 32px 24px 22px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;

    background: rgba(48, 49, 52, 0.42);

    color: #fff;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.12);
}

.rpe-card.is-active {
    display: block;
    animation: rpeFade 0.35s ease;
}

.rpe-card h3 {
    margin: 0 0 10px;

    color: #fff;

    font-size: 32px;
    font-weight: 700;
    line-height: 1.05;
}

.rpe-location {
    margin-bottom: 14px;

    font-size: 20px;
    font-weight: 700;
}

.rpe-description {
    margin-bottom: 24px;

    font-size: 16px;
    line-height: 1.18;
}


/* =========================================================
   7. CARACTERÍSTICAS
========================================================= */

.rpe-features {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.rpe-feature {
    display: flex;
    align-items: flex-start;

    gap: 14px;

    padding: 18px 0;

    border-bottom: 1px solid rgba(255, 255, 255, 0.22);

    font-size: 16px;
    line-height: 1.25;
}

.rpe-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 24px;

    min-height: 24px;
}

.rpe-feature-icon img {
    display: block;

    width: 20px;
    height: 20px;

    object-fit: contain;
}

.rpe-feature-icon-fallback {
    display: block;

    color: #e7ded7;

    font-size: 20px;
    line-height: 1;
}

.rpe-feature-text {
    flex: 1;
}


/* =========================================================
   8. BOTÓN CTA
========================================================= */

.rpe-cta {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 46px;

    margin-top: 20px;

    border-radius: 999px;
    background: #835A3E;

    color: #fff;
    text-decoration: none !important;

    font-weight: 700;

    transition:
        transform 0.2s ease,
        filter 0.2s ease;
}

.rpe-cta:hover {
    color: #fff;

    filter: brightness(1.05);
    transform: translateY(-1px);
}


/* =========================================================
   9. ANIMACIONES
========================================================= */

@keyframes rpeFade {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}


/* =========================================================
   10. TABLET
========================================================= */

@media (max-width: 1024px) {

    .rpe-inner {
        padding: 34px 24px 40px;
    }

    .rpe-tabs {
        margin-left: auto;
        margin-right: auto;
    }

    .rpe-card {
        width: 480px;
    }
}


/* =========================================================
   11. MÓVIL
   Ajustado al diseño DESARROLLOS 3
========================================================= */

@media (max-width: 767px) {

    .rpe-showcase {
        min-height: 1435px;
    }

    .rpe-inner {
        width: 100%;
        max-width: none;
        min-height: 1435px;
        padding: 64px 20px 72px;
    }


    /* Encabezado */

    .rpe-heading {
        width: 100%;
        max-width: 360px;
        margin: 0 auto 45px;
        text-align: center;
    }

    .rpe-eyebrow {
        min-width: 118px;
        min-height: 32px;
        padding: 0 14px;
        border-radius: 3px;
        font-size: 12px;
        line-height: 1;
    }

    .rpe-heading h2 {
        max-width: 330px;
        margin: 24px auto 15px;
        font-size: 27px;
        line-height: 1.12;
    }

    .rpe-heading p {
        max-width: 350px;
        margin: 0 auto;
        font-size: 15.5px;
        line-height: 1.12;
    }


    /* Tabs: en móvil no hay cápsula exterior */

    .rpe-tabs {
        gap: 24px;
        margin: 0 auto;
        padding: 0;
        border: 0;
        background: transparent !important;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .rpe-tab {
        min-width: auto;
        padding: 10px 17px;
        border-radius: 999px;
        background: transparent;
        font-size: 18px;
        line-height: 1;
        font-weight: 400;
    }

    .rpe-tab:hover {
        background: transparent;
    }

    .rpe-tab.is-active {
        min-width: 140px;
        padding: 11px 18px;
        background: #fff;
        color: #000;
        font-weight: 700;
    }


    /* Espacio visual para mostrar el edificio antes de la tarjeta */

    .rpe-content-wrap {
        flex: none;
        width: 100%;
        margin-top: 345px;
        justify-content: center;
    }


    /* Tarjeta */

    .rpe-card {
        width: 327px !important;
        max-width: calc(100vw - 40px);
        padding: 23px 20px 19px;
        border-radius: 18px;
        background: rgba(55, 55, 55, 0.46);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: none;
        backdrop-filter: blur(7px);
        -webkit-backdrop-filter: blur(7px);
    }

    .rpe-card h3 {
        margin: 0 0 10px;
        font-size: 27px;
        line-height: 1;
    }

    .rpe-location {
        margin-bottom: 11px;
        font-size: 18px;
        line-height: 1.1;
    }

    .rpe-description {
        margin-bottom: 23px;
        font-size: 14px;
        line-height: 1.13;
    }


    /* Características */

    .rpe-features {
        border-top: 1px solid rgba(255, 255, 255, 0.20);
    }

    .rpe-feature {
        gap: 10px;
        min-height: 66px;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.20);
        font-size: 15px;
        line-height: 1.12;
    }

    .rpe-feature-icon {
        flex: 0 0 20px;
        min-height: 20px;
        margin-top: 1px;
    }

    .rpe-feature-icon img {
        width: 20px;
        height: 20px;
    }


    /* Botón */

    .rpe-cta {
        min-height: 40px;
        margin-top: 18px;
        border-radius: 999px;
        font-size: 16px;
    }


    /* Fondo */

    .rpe-bg {
        background-position: center top;
    }
}


/* =========================================================
   12. MÓVIL PEQUEÑO
========================================================= */

@media (max-width: 480px) {

    .rpe-inner {
        padding-left: 14px;
        padding-right: 14px;
    }

    .rpe-heading {
        max-width: 365px;
    }

    .rpe-heading h2 {
        font-size: 27px;
    }

    .rpe-tabs {
        max-width: 100%;
        flex-wrap: nowrap;
    }

    .rpe-card {
        width: 327px !important;
        max-width: calc(100vw - 32px);
    }
}

@media (max-width: 767px) {
    .rpe-showcase .rpe-bg {
        background-image: var(--rpe-bg-mobile, var(--rpe-bg-desktop, none)) !important;
    }
}
