/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Tema hijo para el proyecto Resident.
Author: Resident
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/

/* =========================================================
   PROYECTO RESIDENT
   Estilos para portales individuales de conjuntos
   Archivo: style.css
   ========================================================= */


/* =========================================================
   1. VARIABLES Y AJUSTES GENERALES
   ========================================================= */

:root {
    --resident-dark: #0f172a;
    --resident-muted: #64748b;
    --resident-soft: #f8fafc;
    --resident-soft-2: #f1f5f9;
    --resident-white: #ffffff;
    --resident-border: #e2e8f0;
    --resident-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --resident-shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.07);
    --resident-radius-xl: 32px;
    --resident-radius-lg: 24px;
    --resident-radius-md: 16px;
}

/* Scroll suave para el menú interno */
html {
    scroll-behavior: smooth;
}

/* Evita que las anclas queden ocultas debajo del header */
#inicio,
#servicios,
#nosotros,
#galeria,
#noticias,
#recursos,
#contacto {
    scroll-margin-top: 110px;
}

/* Contenedor general de cada conjunto */
.resident-conjunto {
    width: 100%;
    background: #ffffff;
    color: var(--resident-dark);
    overflow: hidden;
}

/* Ajuste general de enlaces */
.resident-conjunto a {
    color: inherit;
    text-decoration: none;
}

.resident-conjunto a:hover {
    text-decoration: none;
}

/* Imágenes fluidas */
.resident-conjunto img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* =========================================================
   2. HERO PRINCIPAL
   ========================================================= */

.resident-hero {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    isolation: isolate;
    overflow: hidden;
}

.resident-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    z-index: -3;
    transform: scale(1.06);
}

/* Fondo de respaldo si no existe banner */
.resident-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08), transparent 28%),
        linear-gradient(
            90deg,
            rgba(15, 23, 42, 0.92) 0%,
            rgba(15, 23, 42, 0.78) 42%,
            rgba(15, 23, 42, 0.48) 100%
        );
    z-index: -2;
}

.resident-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(2, 6, 23, 0.38) 0%,
            rgba(2, 6, 23, 0.16) 45%,
            rgba(2, 6, 23, 0.76) 100%
        );
    z-index: -1;
}

.resident-hero-inner {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 110px 0 96px;
    transform: translateY(24px);
}

.resident-hero-logo-wrap {
    width: 150px;
    height: 150px;
    border-radius: 32px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
}

.resident-hero-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.resident-hero-content {
    max-width: 780px;
    color: #ffffff;
}

.resident-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.resident-hero-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.6rem, 5.2vw, 5rem);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.055em;
    text-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.resident-hero-slogan {
    margin: 24px 0 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1.15rem, 2vw, 1.6rem);
    line-height: 1.5;
    font-weight: 600;
}

.resident-hero-description {
    margin: 18px 0 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.05rem;
    line-height: 1.7;
}

.resident-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}


/* =========================================================
   3. BOTONES
   ========================================================= */

.resident-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 22px;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.resident-btn:hover {
    transform: translateY(-2px);
}

.resident-btn-primary {
    background: var(--tenant-secondary, #f59e0b);
    color: #111827;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.resident-btn-primary:hover {
    color: #111827;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.resident-btn-secondary {
    background: rgba(255, 255, 255, 0.94);
    color: var(--tenant-primary, #0f172a);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.resident-btn-secondary:hover {
    color: var(--tenant-primary, #0f172a);
    background: #ffffff;
}


/* =========================================================
   4. MENÚ INTERNO DEL CONJUNTO
   ========================================================= */

.resident-tenant-menu {
    position: sticky;
    top: 0;
    z-index: 20;
    width: min(1180px, calc(100% - 48px));
    margin: 28px auto 0;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.90);
    border-radius: 999px;
    box-shadow: var(--resident-shadow-soft);
    backdrop-filter: blur(16px);
}

.resident-tenant-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--resident-dark);
    font-size: 0.94rem;
    font-weight: 800;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.resident-tenant-menu a:hover {
    background: var(--resident-soft-2);
    color: var(--tenant-primary, #0f172a);
    transform: translateY(-1px);
}

.resident-tenant-menu .resident-menu-access {
    background: var(--tenant-primary, #0f172a);
    color: #ffffff;
}

.resident-tenant-menu .resident-menu-access:hover {
    background: var(--tenant-secondary, #f59e0b);
    color: #111827;
}


/* =========================================================
   5. INFORMACIÓN RÁPIDA
   ========================================================= */

.resident-quick-info {
    width: min(1180px, calc(100% - 48px));
    margin: 32px auto 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.resident-quick-card {
    min-height: 132px;
    padding: 24px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    background: #ffffff;
    border: 1px solid var(--resident-border);
    border-radius: var(--resident-radius-lg);
    box-shadow: var(--resident-shadow-soft);
}

.resident-quick-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: color-mix(in srgb, var(--tenant-primary, #0f172a) 12%, white);
    color: var(--tenant-primary, #0f172a);
    font-size: 1.25rem;
    font-weight: 900;
}

.resident-quick-card h2 {
    margin: 0 0 8px;
    color: var(--resident-dark);
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.resident-quick-card p,
.resident-quick-card a {
    margin: 0;
    color: var(--resident-muted);
    font-size: 0.98rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.resident-quick-card a:hover {
    color: var(--tenant-primary, #0f172a);
}


/* =========================================================
   6. SECCIONES GENERALES
   ========================================================= */

.resident-section {
    width: min(1180px, calc(100% - 48px));
    margin: 72px auto 0;
    padding: 64px;
    background: var(--resident-soft);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--resident-radius-xl);
}

.resident-section-header {
    max-width: 760px;
    margin-bottom: 38px;
}

.resident-section-kicker {
    margin: 0 0 10px;
    color: var(--tenant-primary, #0f172a);
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.resident-section-header h2 {
    margin: 0;
    color: var(--resident-dark);
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.resident-section-header p {
    margin: 16px 0 0;
    color: var(--resident-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}


/* =========================================================
   7. SERVICIOS
   ========================================================= */

.resident-services-section {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 32%),
        var(--resident-soft);
}

.resident-services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.resident-service-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--resident-border);
    border-radius: var(--resident-radius-lg);
    box-shadow: var(--resident-shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resident-service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--resident-shadow);
}

.resident-service-image-wrap {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--resident-soft-2);
}

.resident-service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.resident-service-card:hover .resident-service-image {
    transform: scale(1.05);
}

.resident-service-content {
    padding: 24px;
}

.resident-service-content h3 {
    margin: 0 0 10px;
    color: var(--tenant-primary, #0f172a);
    font-size: 1.45rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.resident-service-content p {
    margin: 0;
    color: var(--resident-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}


/* =========================================================
   8. NOSOTROS
   ========================================================= */

.resident-about-section {
    background: #ffffff;
}

.resident-about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 24px;
    align-items: stretch;
}

.resident-about-main,
.resident-about-card {
    background: var(--resident-soft);
    border: 1px solid var(--resident-border);
    border-radius: var(--resident-radius-lg);
    box-shadow: var(--resident-shadow-soft);
}

.resident-about-main {
    padding: 36px;
}

.resident-about-side {
    display: grid;
    gap: 24px;
}

.resident-about-card {
    padding: 32px;
}

.resident-about-main h3,
.resident-about-card h3 {
    margin: 0 0 16px;
    color: var(--tenant-primary, #0f172a);
    font-size: 1.7rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.resident-content {
    color: var(--resident-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.resident-content p {
    margin-top: 0;
    margin-bottom: 16px;
}

.resident-content p:last-child {
    margin-bottom: 0;
}

.resident-content img {
    margin: 18px 0;
    border-radius: 18px;
}


/* =========================================================
   9. GALERÍA
   ========================================================= */

.resident-gallery-section {
    background:
        linear-gradient(135deg, var(--resident-soft), #ffffff);
}

.resident-gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 170px;
    gap: 18px;
}

.resident-gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: var(--resident-radius-lg);
    box-shadow: var(--resident-shadow-soft);
    background: var(--resident-soft-2);
}

.resident-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.resident-gallery-item:hover img {
    transform: scale(1.06);
    filter: saturate(1.08);
}

.resident-gallery-item-1 {
    grid-column: span 6;
    grid-row: span 2;
}

.resident-gallery-item-2,
.resident-gallery-item-3,
.resident-gallery-item-4,
.resident-gallery-item-5 {
    grid-column: span 3;
}

.resident-gallery-item-6 {
    grid-column: span 6;
}


/* =========================================================
   10. NOTICIAS
   ========================================================= */

.resident-news-section {
    background: var(--resident-soft);
}

.resident-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.resident-news-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--resident-border);
    border-radius: var(--resident-radius-lg);
    box-shadow: var(--resident-shadow-soft);
}

.resident-news-image-wrap {
    display: block;
    height: 190px;
    overflow: hidden;
    background: var(--resident-soft-2);
}

.resident-news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resident-news-content {
    padding: 24px;
}

.resident-news-date {
    margin: 0 0 10px;
    color: var(--tenant-primary, #0f172a);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.resident-news-content h3 {
    margin: 0 0 12px;
    color: var(--resident-dark);
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.resident-news-content h3 a:hover {
    color: var(--tenant-primary, #0f172a);
}

.resident-news-content p {
    margin: 0 0 16px;
    color: var(--resident-muted);
    line-height: 1.65;
}

.resident-read-more {
    display: inline-flex;
    color: var(--tenant-primary, #0f172a);
    font-weight: 900;
}

.resident-read-more:hover {
    color: var(--tenant-secondary, #f59e0b);
}

.resident-empty-state {
    padding: 28px;
    background: #ffffff;
    border: 1px dashed var(--resident-border);
    border-radius: var(--resident-radius-lg);
    color: var(--resident-muted);
}


/* =========================================================
   11. RECURSOS
   ========================================================= */

.resident-resources-section {
    background: #ffffff;
}

.resident-resources-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.resident-resource-card {
    padding: 36px;
    background: var(--resident-soft);
    border: 1px solid var(--resident-border);
    border-radius: var(--resident-radius-lg);
    box-shadow: var(--resident-shadow-soft);
}

.resident-resource-card h3 {
    margin: 0 0 12px;
    color: var(--tenant-primary, #0f172a);
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.resident-resource-card p {
    margin: 0 0 22px;
    color: var(--resident-muted);
    line-height: 1.7;
}


/* =========================================================
   12. CONTACTO
   ========================================================= */

.resident-contact-section {
    margin-bottom: 72px;
    background:
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.95), transparent 34%),
        var(--resident-soft);
}

.resident-contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 24px;
}

.resident-contact-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.resident-contact-card,
.resident-social-card,
.resident-map-card {
    padding: 26px;
    background: #ffffff;
    border: 1px solid var(--resident-border);
    border-radius: var(--resident-radius-lg);
    box-shadow: var(--resident-shadow-soft);
}

.resident-contact-card h3,
.resident-social-card h3,
.resident-map-card h3 {
    margin: 0 0 10px;
    color: var(--tenant-primary, #0f172a);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.resident-contact-card p,
.resident-contact-card a,
.resident-map-card p {
    margin: 0;
    color: var(--resident-muted);
    font-size: 0.98rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.resident-contact-card a:hover {
    color: var(--tenant-primary, #0f172a);
}

.resident-contact-extra {
    display: grid;
    gap: 18px;
}

.resident-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.resident-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--resident-soft-2);
    color: var(--resident-dark);
    font-size: 0.9rem;
    font-weight: 900;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.resident-social-link:hover {
    background: var(--tenant-primary, #0f172a);
    color: #ffffff;
    transform: translateY(-2px);
}


/* =========================================================
   13. AJUSTES PARA ASTRA
   ========================================================= */

/* Reduce interferencias del contenedor de Astra en páginas single del CPT */
.single-conjunto .site-content .ast-container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.single-conjunto .entry-content {
    margin: 0;
}

.single-conjunto .site-main {
    padding: 0;
}

/* Oculta título automático si Astra lo imprime fuera de la plantilla */
.single-conjunto .entry-header {
    display: none;
}


/* =========================================================
   14. RESPONSIVE DESIGN
   ========================================================= */

@media (max-width: 1100px) {

    .resident-hero-inner {
        grid-template-columns: 130px minmax(0, 1fr);
        gap: 28px;
    }

    .resident-hero-logo-wrap {
        width: 130px;
        height: 130px;
        border-radius: 26px;
    }

    .resident-quick-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resident-section {
        padding: 48px;
    }

    .resident-services-grid,
    .resident-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resident-about-layout,
    .resident-contact-layout {
        grid-template-columns: 1fr;
    }

    .resident-gallery-grid {
        grid-auto-rows: 150px;
    }

    .resident-gallery-item-1 {
        grid-column: span 12;
    }

    .resident-gallery-item-2,
    .resident-gallery-item-3,
    .resident-gallery-item-4,
    .resident-gallery-item-5 {
        grid-column: span 6;
    }

    .resident-gallery-item-6 {
        grid-column: span 12;
    }
}


@media (max-width: 768px) {

    #inicio,
    #servicios,
    #nosotros,
    #galeria,
    #noticias,
    #recursos,
    #contacto {
        scroll-margin-top: 150px;
    }

    .resident-hero {
        min-height: auto;
    }

    .resident-hero-inner {
        width: min(100% - 32px, 1180px);
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 72px 0 88px;
    }

    .resident-hero-logo-wrap {
        width: 112px;
        height: 112px;
        border-radius: 24px;
    }

    .resident-hero-title {
        font-size: clamp(2.4rem, 13vw, 4rem);
    }

    .resident-hero-slogan {
        font-size: 1.08rem;
    }

    .resident-hero-description {
        font-size: 0.98rem;
    }

    .resident-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .resident-btn {
        width: 100%;
    }

    .resident-tenant-menu {
        width: calc(100% - 24px);
        margin-top: -40px;
        border-radius: 24px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 10px;
    }

    .resident-tenant-menu a {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .resident-quick-info {
        width: calc(100% - 32px);
        grid-template-columns: 1fr;
        margin-top: 36px;
    }

    .resident-section {
        width: calc(100% - 32px);
        margin-top: 54px;
        padding: 34px 24px;
        border-radius: 26px;
    }

    .resident-section-header {
        margin-bottom: 28px;
    }

    .resident-section-header h2 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .resident-services-grid,
    .resident-news-grid,
    .resident-resources-grid,
    .resident-contact-info {
        grid-template-columns: 1fr;
    }

    .resident-service-image-wrap,
    .resident-news-image-wrap {
        height: 210px;
    }

    .resident-about-main,
    .resident-about-card,
    .resident-resource-card,
    .resident-contact-card,
    .resident-social-card,
    .resident-map-card {
        padding: 24px;
    }

    .resident-gallery-grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 16px;
    }

    .resident-gallery-item,
    .resident-gallery-item-1,
    .resident-gallery-item-2,
    .resident-gallery-item-3,
    .resident-gallery-item-4,
    .resident-gallery-item-5,
    .resident-gallery-item-6 {
        grid-column: auto;
        grid-row: auto;
        height: 240px;
    }

    .resident-contact-section {
        margin-bottom: 54px;
    }
}


@media (max-width: 480px) {

    .resident-hero-inner {
        width: calc(100% - 24px);
    }

    .resident-hero-label {
        font-size: 0.76rem;
    }

    .resident-quick-card {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 20px;
    }

    .resident-quick-icon {
        width: 42px;
        height: 42px;
    }

    .resident-section {
        width: calc(100% - 24px);
        padding: 28px 20px;
    }

    .resident-service-content,
    .resident-news-content {
        padding: 22px;
    }

    .resident-gallery-item,
    .resident-gallery-item-1,
    .resident-gallery-item-2,
    .resident-gallery-item-3,
    .resident-gallery-item-4,
    .resident-gallery-item-5,
    .resident-gallery-item-6 {
        height: 220px;
    }
}



/* =========================================================
   Ocultar menú global de Astra en portales individuales
   ========================================================= */

.single-conjunto .main-header-menu,
.single-conjunto .ast-builder-menu,
.single-conjunto .site-header-primary-section-right {
    display: none !important;
}

/* Mantener el logo/nombre Resident visible */
.single-conjunto .site-header-primary-section-left {
    flex: 1;
}

/* Ajuste de cabecera en portales individuales */
.single-conjunto .site-header {
    border-bottom: 1px solid #e5e7eb;
}

.single-conjunto .ast-primary-header-bar {
    min-height: 82px;
}




/* =========================================================
   Barra superior propia de cada conjunto
   ========================================================= */

.resident-tenant-topbar {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 30;
}

.resident-tenant-topbar-inner {
    width: min(1180px, calc(100% - 48px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.resident-tenant-brand {
    color: #0f172a;
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.resident-tenant-current {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 700;
}

.resident-tenant-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.resident-tenant-topbar-actions a {
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 800;
}

.resident-tenant-access {
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--tenant-primary, #0f172a);
    color: #ffffff !important;
}

.resident-tenant-access:hover {
    background: var(--tenant-secondary, #f59e0b);
    color: #111827 !important;
}

@media (max-width: 768px) {
    .resident-tenant-topbar-inner {
        width: calc(100% - 32px);
        min-height: auto;
        padding: 18px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .resident-tenant-topbar-actions {
        flex-wrap: wrap;
    }
}

.single-conjunto #masthead {
    display: none !important;
}



/* =========================================================
   Shortcode automático de conjuntos en portal principal
   [resident_conjuntos]
   ========================================================= */

.resident-shortcode-conjuntos {
    margin-top: 32px;
}

.resident-home-conjunto-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f1f5f9;
}

.resident-home-conjunto-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.resident-home-conjunto-card:hover .resident-home-conjunto-image {
    transform: scale(1.06);
    filter: saturate(1.08);
}

.resident-home-conjunto-logo-wrap {
    position: absolute;
    left: 20px;
    bottom: 20px;
    width: 82px;
    height: 82px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
}

.resident-home-conjunto-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.resident-home-conjunto-placeholder {
    height: 220px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #ffffff;
    text-align: center;
}

.resident-home-conjunto-placeholder span {
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1.2;
}

.resident-home-conjunto-content h3 a {
    color: #0f172a;
    text-decoration: none;
}

.resident-home-conjunto-content h3 a:hover {
    color: #2563eb;
}

.resident-home-conjunto-btn {
    display: inline-flex;
    padding: 11px 18px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff !important;
    font-weight: 900;
    text-decoration: none !important;
    transition: transform 0.25s ease, background 0.25s ease;
}

.resident-home-conjunto-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.resident-home-empty {
    padding: 28px;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-weight: 700;
}


/* =========================================================
   Ajuste del banner principal del portal Resident
   Evita que se corten los avisos inferiores
   ========================================================= */

.resident-home-main-banner {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
    overflow: visible !important;
}

.resident-home-main-banner img,
.resident-home-main-banner-img {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block;
}

/* =========================================================
   Portal principal - Grid automático de conjuntos
   ========================================================= */

.resident-shortcode-conjuntos,
.resident-home-conjuntos-grid {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 28px !important;
    align-items: stretch;
    margin-top: 36px;
}

/* Tarjeta individual */
.resident-home-conjunto-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resident-home-conjunto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

/* Imagen superior de cada conjunto */
.resident-home-conjunto-image-link {
    position: relative;
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f1f5f9;
}

.resident-home-conjunto-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.resident-home-conjunto-card:hover .resident-home-conjunto-image {
    transform: scale(1.06);
    filter: saturate(1.08);
}

/* Logo sobre la imagen */
.resident-home-conjunto-logo-wrap {
    position: absolute;
    left: 18px;
    bottom: 18px;
    width: 76px;
    height: 76px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
}

.resident-home-conjunto-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Contenido de la tarjeta */
.resident-home-conjunto-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.resident-home-conjunto-content h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.resident-home-conjunto-content h3 a {
    color: #0f172a;
    text-decoration: none;
}

.resident-home-conjunto-content h3 a:hover {
    color: #2563eb;
}

.resident-home-conjunto-content p {
    margin: 0 0 22px;
    color: #64748b;
    font-size: 0.98rem;
    line-height: 1.6;
}

/* Botón siempre abajo de la tarjeta */
.resident-home-conjunto-btn {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff !important;
    font-size: 0.94rem;
    font-weight: 900;
    text-decoration: none !important;
    transition: transform 0.25s ease, background 0.25s ease;
}

.resident-home-conjunto-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* Placeholder por si algún conjunto no tiene banner */
.resident-home-conjunto-placeholder {
    height: 220px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    color: #ffffff;
    text-align: center;
}

.resident-home-conjunto-placeholder span {
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1.2;
}

/* Responsive */
@media (max-width: 1200px) {
    .resident-shortcode-conjuntos,
    .resident-home-conjuntos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .resident-shortcode-conjuntos,
    .resident-home-conjuntos-grid {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }

    .resident-home-conjunto-image-link {
        height: 210px;
    }
}


/* =========================================================
   Sección de conjuntos del portal principal
   ========================================================= */

.resident-home-conjuntos-section {
    width: min(1320px, calc(100% - 48px));
    margin: 88px auto;
    padding: 64px;
    border-radius: 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.resident-home-conjuntos-section h2 {
    margin-bottom: 8px;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.resident-home-conjuntos-section > p,
.resident-home-conjuntos-section .wp-block-paragraph {
    color: #64748b;
    font-size: 1.08rem;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .resident-home-conjuntos-section {
        width: calc(100% - 32px);
        padding: 36px 24px;
        margin: 64px auto;
    }
}


/* =========================================================
   Tarjetas de funcionalidades del portal principal
   ========================================================= */

.resident-home-card,
.wp-block-uagb-info-box.resident-home-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 28px !important;
    background: #ffffff !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resident-home-card:hover,
.wp-block-uagb-info-box.resident-home-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.13) !important;
}

.resident-home-card h3,
.wp-block-uagb-info-box.resident-home-card h3 {
    color: #0f172a !important;
    font-weight: 900 !important;
}


/* =========================================================
   Contacto portal principal
   ========================================================= */

.resident-home-contact-section {
    width: min(1180px, calc(100% - 48px));
    margin: 88px auto;
    padding: 64px;
    border-radius: 36px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 36%),
        #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.resident-home-contact-section h2 {
    margin-bottom: 10px;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.resident-home-contact-section p {
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.7;
}

.resident-home-contact-section input,
.resident-home-contact-section textarea,
.resident-home-contact-section select {
    width: 100%;
    min-height: 46px;
    border-radius: 14px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 12px 14px !important;
    font-size: 0.98rem;
}

.resident-home-contact-section textarea {
    min-height: 130px;
}

.resident-home-contact-section button,
.resident-home-contact-section input[type="submit"] {
    min-height: 48px;
    padding: 12px 24px !important;
    border-radius: 999px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 900 !important;
}

@media (max-width: 768px) {
    .resident-home-contact-section {
        width: calc(100% - 32px);
        padding: 36px 24px;
        margin: 64px auto;
    }
}

/* =========================================================
   FIX DEFINITIVO - Grid de conjuntos en portal principal
   ========================================================= */

.resident-conjuntos-home-wrap .resident-shortcode-conjuntos,
.resident-conjuntos-home-wrap .resident-home-conjuntos-grid,
.resident-conjuntos-home-wrap [class*="resident-shortcode-conjuntos"],
.resident-conjuntos-home-wrap [class*="resident-home-conjuntos-grid"] {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 28px !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: stretch !important;
}

/* Por si WordPress/Spectra envuelve el shortcode en otro bloque */
.resident-conjuntos-home-wrap .wp-block-shortcode {
    width: 100% !important;
    max-width: 100% !important;
}

/* Tarjeta de conjunto */
.resident-conjuntos-home-wrap .resident-home-conjunto-card {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: 28px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10) !important;
    margin: 0 !important;
}

/* Imagen de cada tarjeta */
.resident-conjuntos-home-wrap .resident-home-conjunto-image-link {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 220px !important;
    overflow: hidden !important;
    background: #f1f5f9 !important;
}

.resident-conjuntos-home-wrap .resident-home-conjunto-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
}

/* Logo */
.resident-conjuntos-home-wrap .resident-home-conjunto-logo-wrap {
    position: absolute !important;
    left: 18px !important;
    bottom: 18px !important;
    width: 76px !important;
    height: 76px !important;
    padding: 10px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.resident-conjuntos-home-wrap .resident-home-conjunto-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Contenido */
.resident-conjuntos-home-wrap .resident-home-conjunto-content {
    flex: 1 !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
}

.resident-conjuntos-home-wrap .resident-home-conjunto-content h3 {
    margin: 0 0 10px !important;
    color: #0f172a !important;
    font-size: 1.35rem !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
}

.resident-conjuntos-home-wrap .resident-home-conjunto-content p {
    margin: 0 0 22px !important;
    color: #64748b !important;
    font-size: 0.98rem !important;
    line-height: 1.6 !important;
}

/* Botón al final de la tarjeta */
.resident-conjuntos-home-wrap .resident-home-conjunto-btn {
    margin-top: auto !important;
    align-self: flex-start !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    padding: 12px 20px !important;
    border-radius: 999px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    font-size: 0.94rem !important;
    font-weight: 900 !important;
    text-decoration: none !important;
}

.resident-conjuntos-home-wrap .resident-home-conjunto-btn:hover {
    background: #2563eb !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .resident-conjuntos-home-wrap .resident-shortcode-conjuntos,
    .resident-conjuntos-home-wrap .resident-home-conjuntos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .resident-conjuntos-home-wrap .resident-shortcode-conjuntos,
    .resident-conjuntos-home-wrap .resident-home-conjuntos-grid {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   Sección ¿Cómo funciona Resident?
   ========================================================= */

.resident-how-section {
    width: min(1180px, calc(100% - 48px));
    margin: 88px auto;
    padding: 64px;
    border-radius: 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.resident-how-section h2 {
    margin: 0 0 34px;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.resident-how-section .wp-block-columns {
    gap: 24px;
}

.resident-how-card,
.resident-how-section .wp-block-column {
    padding: 30px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.resident-how-card h3,
.resident-how-section .wp-block-column h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 1.3rem;
    font-weight: 900;
}

.resident-how-card p,
.resident-how-section .wp-block-column p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .resident-how-section {
        width: calc(100% - 32px);
        padding: 36px 24px;
        margin: 64px auto;
    }
}


/* =========================================================
   FIX tarjetas superiores de plataforma
   ========================================================= */

.resident-home-card,
.resident-home-card *,
.wp-block-uagb-info-box.resident-home-card,
.wp-block-uagb-info-box.resident-home-card * {
    box-sizing: border-box;
}

.resident-home-card,
.wp-block-uagb-info-box.resident-home-card,
.uagb-infobox__outer-wrap.resident-home-card {
    border: 1px solid #e2e8f0 !important;
    outline: none !important;
    border-radius: 28px !important;
    background: #ffffff !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07) !important;
}

.resident-home-card .uagb-ifb-content,
.resident-home-card .uagb-infobox__content-wrap {
    border: none !important;
    outline: none !important;
}



/* =========================================================
   Página Acceso Residentes
   Shortcode: [resident_acceso_residentes]
   ========================================================= */

.resident-access-page {
    width: min(1180px, calc(100% - 48px));
    margin: 72px auto 96px;
}

.resident-access-hero {
    width: min(1180px, calc(100% - 48px));
    margin: 72px auto 48px;
    padding: 64px;
    border-radius: 36px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34%),
        linear-gradient(135deg, #0f172a, #1e3a8a);
    color: #ffffff;
}

.resident-access-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.resident-access-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.12rem;
    line-height: 1.75;
}

.resident-access-grid {
    width: min(1180px, calc(100% - 48px));
    margin: 48px auto 96px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.resident-access-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resident-access-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.resident-access-image-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: #f1f5f9;
}

.resident-access-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.resident-access-card:hover .resident-access-image {
    transform: scale(1.05);
    filter: saturate(1.08);
}

.resident-access-placeholder {
    width: 100%;
    height: 100%;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    color: #ffffff;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 900;
}

.resident-access-logo-wrap {
    position: absolute;
    left: 22px;
    bottom: 22px;
    width: 88px;
    height: 88px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
}

.resident-access-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.resident-access-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.resident-access-content h2 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 1.7rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.resident-access-content p {
    margin: 0 0 24px;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.7;
}

.resident-access-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.resident-access-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 0.94rem;
    font-weight: 900;
    text-decoration: none !important;
    transition: transform 0.25s ease, background 0.25s ease;
}

.resident-access-btn:hover {
    transform: translateY(-2px);
}

.resident-access-btn-primary {
    background: #0f172a;
    color: #ffffff !important;
}

.resident-access-btn-primary:hover {
    background: #2563eb;
}

.resident-access-btn-secondary {
    background: #f1f5f9;
    color: #0f172a !important;
}

.resident-access-btn-secondary:hover {
    background: #e2e8f0;
}

.resident-access-empty {
    width: min(1180px, calc(100% - 48px));
    margin: 48px auto;
    padding: 28px;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-weight: 700;
}

@media (max-width: 900px) {
    .resident-access-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .resident-access-hero,
    .resident-access-grid {
        width: calc(100% - 32px);
    }

    .resident-access-hero {
        padding: 38px 26px;
        margin-top: 48px;
    }

    .resident-access-image-wrap {
        height: 220px;
    }

    .resident-access-content {
        padding: 24px;
    }

    .resident-access-actions {
        flex-direction: column;
    }

    .resident-access-btn {
        width: 100%;
    }
}


/* =========================================================
   Sección Beneficios Portal Principal
   ========================================================= */

.resident-benefits-section {
    width: min(1180px, calc(100% - 48px));
    margin: 88px auto;
    padding: 64px;
    border-radius: 36px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 36%),
        #f8fafc;
    border: 1px solid #e2e8f0;
}

.resident-benefits-section h2 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.resident-benefits-section > p {
    max-width: 760px;
    margin: 0 0 36px;
    color: #64748b;
    font-size: 1.08rem;
    line-height: 1.7;
}

.resident-benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.resident-benefit-card {
    padding: 36px;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.resident-benefit-card h3 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.resident-benefit-card ul {
    margin: 0;
    padding-left: 20px;
    color: #64748b;
    line-height: 1.9;
}

@media (max-width: 768px) {
    .resident-benefits-section {
        width: calc(100% - 32px);
        padding: 36px 24px;
        margin: 64px auto;
    }

    .resident-benefits-grid {
        grid-template-columns: 1fr;
    }
}