/* ============================================================
   GS Capital Brokers — Sitio Público
   ============================================================ */

@layer base, layout, components, utils;

/* ---- Tokens de marca ---- */
:root {
    --gold:          #d39b63;
    --gold-dark:     #b8833e;
    --gold-light:    #e8ba8a;
    --black:         #000000;
    --white:         #ffffff;
    --gray-50:       #f9f9f7;
    --gray-100:      #f2f0eb;
    --gray-200:      #e4e0d8;
    --gray-400:      #a09a8e;
    --gray-600:      #6b6560;
    --gray-800:      #2e2b28;

    --font-main:     'Montserrat', system-ui, sans-serif;
    --radius-sm:     4px;
    --radius:        8px;
    --radius-lg:     16px;

    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;

    --container: 1200px;
    --header-h: 72px;

    --shadow-sm: 0 1px 4px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow:    0 4px 20px rgba(0,0,0,.09);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.16);
    --shadow-gold: 0 4px 20px rgba(211,155,99,.32);

    --transition: .22s cubic-bezier(0.4,0,0.2,1);
    --radius-input: 8px;
    --ring-gold: 0 0 0 3px rgba(211,155,99,.22);
}

@layer base {
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

    body {
        font-family: var(--font-main);
        font-size: 1rem;
        line-height: 1.6;
        color: var(--gray-800);
        background: var(--white);
    }

    img { display: block; max-width: 100%; height: auto; }
    a   { color: inherit; text-decoration: none; }
    ul, ol { list-style: none; }
    button { cursor: pointer; border: none; background: none; font: inherit; }
    input, select, textarea {
        font: inherit;
        border: 1.5px solid var(--gray-200);
        border-radius: var(--radius-input);
        padding: .68rem 1rem;
        width: 100%;
        background: var(--gray-50);
        color: var(--gray-800);
        transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    }
    input::placeholder, textarea::placeholder { color: var(--gray-400); }
    select {
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a09a8e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right .9rem center;
        padding-right: 2.5rem;
    }
    input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: var(--gold);
        box-shadow: var(--ring-gold);
        background: var(--white);
    }
}

@layer layout {
    .container {
        max-width: var(--container);
        margin-inline: auto;
        padding-inline: var(--sp-6);
    }

    /* Header */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 100;
        height: var(--header-h);
        background: var(--black);
        display: flex;
        align-items: center;
    }
    .site-header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    .site-logo {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    .site-logo img {
        height: 48px;
        width: auto;
        display: block;
    }

    .site-nav {
        display: flex;
        align-items: center;
        gap: var(--sp-6);
    }
    .site-nav a {
        color: var(--gray-400);
        font-size: .875rem;
        font-weight: 500;
        letter-spacing: .04em;
        text-transform: uppercase;
        transition: color var(--transition);
        position: relative;
        padding-bottom: 2px;
    }
    .site-nav a:not(.site-nav__cta)::after {
        content: '';
        position: absolute;
        bottom: -3px; left: 0;
        width: 0; height: 2px;
        background: var(--gold);
        border-radius: 2px;
        transition: width var(--transition);
    }
    .site-nav a:not(.site-nav__cta):hover::after,
    .site-nav a.is-active:not(.site-nav__cta)::after { width: 100%; }
    .site-nav a:hover, .site-nav a.is-active { color: var(--gold); }

    .site-nav__cta {
        background: var(--gold) !important;
        color: var(--black) !important;
        padding: var(--sp-2) var(--sp-5) !important;
        border-radius: var(--radius) !important;
        font-weight: 700 !important;
        transition: background var(--transition), box-shadow var(--transition) !important;
    }
    .site-nav__cta:hover { background: var(--gold-dark) !important; box-shadow: var(--shadow-gold) !important; }

    /* Mobile menu toggle */
    .nav-toggle {
        display: none;
        flex-direction: column;
        gap: 5px;
        padding: var(--sp-2);
        color: var(--white);
    }
    .nav-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: currentColor;
        transition: .3s;
    }

    /* Footer */
    .site-footer {
        background: var(--black);
        color: var(--gray-400);
        padding: var(--sp-12) 0 var(--sp-8);
    }
    .footer-grid {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        gap: var(--sp-10);
        margin-bottom: var(--sp-10);
    }
    .footer-brand { color: var(--white); font-weight: 700; font-size: 1.05rem; margin-bottom: var(--sp-4); }
    .footer-brand .gold { color: var(--gold); }
    .footer-col h4 { color: var(--white); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--sp-4); }
    .footer-col ul { display: flex; flex-direction: column; gap: var(--sp-2); }
    .footer-col a { font-size: .875rem; transition: color .2s; }
    .footer-col a:hover { color: var(--gold); }
    .footer-bottom {
        border-top: 1px solid rgba(255,255,255,.08);
        padding-top: var(--sp-6);
        text-align: center;
        font-size: .8rem;
    }
}

@layer components {

    /* ---- Botones ---- */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: var(--sp-2);
        padding: .75rem 1.75rem;
        border-radius: var(--radius);
        font-weight: 600;
        font-size: .9rem;
        letter-spacing: .03em;
        transition: background var(--transition), color var(--transition), transform .12s, box-shadow var(--transition);
    }
    .btn:active { transform: scale(.97); }
    .btn--gold  { background: var(--gold); color: var(--black); }
    .btn--gold:hover { background: var(--gold-dark); box-shadow: var(--shadow-gold); }
    .btn--outline {
        background: transparent;
        color: var(--gold);
        border: 2px solid var(--gold);
    }
    .btn--outline:hover { background: var(--gold); color: var(--black); box-shadow: var(--shadow-gold); }
    .btn--dark  { background: var(--black); color: var(--white); }
    .btn--dark:hover { background: var(--gray-800); box-shadow: var(--shadow); }
    .btn--sm    { padding: .5rem 1.2rem; font-size: .85rem; }
    .btn--full  { width: 100%; }

    /* ---- Hero ---- */
    .hero {
        position: relative;
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        align-items: center;
        background: var(--black);
        overflow: hidden;
    }
    .hero__bg {
        position: absolute;
        inset: 0;
        background-size: cover;
        background-position: center;
        opacity: 0;
        transition: opacity 1.6s ease;
        will-change: opacity;
    }
    .hero__bg.is-active { opacity: .45; }
    .hero__content {
        position: relative;
        z-index: 1;
        max-width: 680px;
    }
    .hero__eyebrow {
        display: inline-block;
        color: var(--gold);
        font-size: .8rem;
        font-weight: 700;
        letter-spacing: .18em;
        text-transform: uppercase;
        margin-bottom: var(--sp-5);
    }
    .hero__title {
        color: var(--white);
        font-size: clamp(2.2rem, 5vw, 3.8rem);
        font-weight: 700;
        line-height: 1.12;
        margin-bottom: var(--sp-5);
    }
    .hero__title .gold { color: var(--gold); }
    .hero__subtitle {
        color: rgba(255,255,255,.7);
        font-size: 1.1rem;
        margin-bottom: var(--sp-10);
        max-width: 520px;
    }

    /* ---- Buscador del hero ---- */
    .hero-search {
        background: var(--white);
        border-radius: var(--radius-lg);
        padding: var(--sp-5);
        display: grid;
        grid-template-columns: 1fr 1fr 1fr auto;
        gap: var(--sp-3);
        align-items: end;
        box-shadow: 0 20px 60px rgba(0,0,0,.22);
    }
    .hero-search label {
        display: block;
        font-size: .75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--gray-600);
        margin-bottom: var(--sp-1);
    }
    .hero-search input,
    .hero-search select {
        background: var(--gray-50);
        border-color: var(--gray-200);
    }

    /* ---- Sección genérica ---- */
    .section { padding: var(--sp-20) 0; }
    .section--gray { background: var(--gray-50); }
    .section--dark { background: var(--black); color: var(--white); }
    .section__eyebrow {
        display: block;
        color: var(--gold);
        font-size: .75rem;
        font-weight: 700;
        letter-spacing: .18em;
        text-transform: uppercase;
        margin-bottom: var(--sp-3);
    }
    .section__title {
        font-size: clamp(1.6rem, 3vw, 2.4rem);
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: var(--sp-4);
    }
    .section__lead {
        color: var(--gray-600);
        font-size: 1.05rem;
        max-width: 560px;
        margin-bottom: var(--sp-10);
    }
    .section--dark .section__lead { color: var(--gray-400); }
    .section__header { margin-bottom: var(--sp-10); }
    .section__header--center { text-align: center; }
    .section__header--center .section__lead { margin-inline: auto; }

    /* ---- Grid de tarjetas ---- */
    .cards-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--sp-6);
    }

    /* ---- Tarjeta de propiedad ---- */
    .prop-card {
        background: var(--white);
        border-radius: var(--radius-lg);
        overflow: hidden;
        border: 1px solid var(--gray-100);
        box-shadow: var(--shadow-sm);
        transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
        display: flex;
        flex-direction: column;
        cursor: pointer;
    }
    .prop-card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-4px);
        border-color: var(--gray-200);
    }
    .prop-card__img {
        position: relative;
        aspect-ratio: 4/3;
        background: var(--gray-100);
        overflow: hidden;
    }
    .prop-card__img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .4s;
    }
    .prop-card:hover .prop-card__img img { transform: scale(1.04); }
    .prop-card__no-img {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--gray-400);
        font-size: 2.5rem;
    }
    .prop-card__badge {
        position: absolute;
        top: var(--sp-3);
        left: var(--sp-3);
        background: var(--gold);
        color: var(--black);
        font-size: .68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .08em;
        padding: 4px 12px;
        border-radius: 100px;
        backdrop-filter: blur(4px);
    }
    .prop-card__featured {
        position: absolute;
        top: var(--sp-3);
        right: var(--sp-3);
        background: rgba(0,0,0,.75);
        color: var(--gold);
        font-size: .65rem;
        font-weight: 700;
        letter-spacing: .1em;
        text-transform: uppercase;
        padding: 4px 10px;
        border-radius: 100px;
        backdrop-filter: blur(4px);
    }
    .prop-card__body {
        padding: var(--sp-4) var(--sp-5);
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .prop-card__price {
        font-size: 1.35rem;
        font-weight: 700;
        color: var(--black);
        margin-bottom: var(--sp-1);
    }
    .prop-card__currency {
        font-size: .8rem;
        font-weight: 500;
        color: var(--gray-600);
        margin-left: var(--sp-1);
    }
    .prop-card__title {
        font-size: .95rem;
        font-weight: 600;
        color: var(--gray-800);
        margin-bottom: var(--sp-2);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .prop-card__location {
        font-size: .82rem;
        color: var(--gray-600);
        margin-bottom: var(--sp-4);
        display: flex;
        align-items: center;
        gap: var(--sp-1);
    }
    .prop-card__specs {
        display: flex;
        gap: var(--sp-4);
        padding-top: var(--sp-4);
        border-top: 1px solid var(--gray-100);
        margin-top: auto;
    }
    .prop-card__spec {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: .8rem;
        color: var(--gray-600);
        font-weight: 500;
    }
    .prop-card__spec svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--gold); }

    /* ---- Header row con botón a la derecha ---- */
    .section__header-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: var(--sp-6);
        margin-bottom: var(--sp-10);
        flex-wrap: wrap;
    }
    .section__header-row .section__eyebrow { margin-bottom: var(--sp-2); display: block; }
    .section__header-row .btn { align-self: center; white-space: nowrap; }

    /* ---- Property Slider ---- */
    .prop-slider-outer { overflow: hidden; }
    .prop-slider__track {
        display: flex;
        gap: var(--sp-6);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .prop-slider__track::-webkit-scrollbar { display: none; }
    .prop-slider__item {
        flex: 0 0 calc((100% - 2 * var(--sp-6)) / 3);
        scroll-snap-align: start;
        min-width: 0;
    }
    @media (max-width: 900px) {
        .prop-slider__item { flex: 0 0 calc((100% - var(--sp-6)) / 2); }
    }
    @media (max-width: 600px) {
        .prop-slider__item { flex: 0 0 88%; }
    }
    .prop-slider__footer {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--sp-4);
        margin-top: var(--sp-8);
    }
    .prop-slider__dots {
        display: flex;
        gap: var(--sp-2);
        align-items: center;
    }
    .prop-slider__dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        border: none;
        background: var(--gray-300);
        padding: 0;
        cursor: pointer;
        transition: background .2s, transform .2s;
    }
    .prop-slider__dot.is-active {
        background: var(--gold);
        transform: scale(1.35);
    }
    .prop-slider__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1.5px solid var(--gray-300);
        background: var(--white);
        color: var(--gray-700);
        cursor: pointer;
        flex-shrink: 0;
        transition: border-color .2s, background .2s, color .2s;
    }
    .prop-slider__btn:hover:not(:disabled) {
        border-color: var(--gold);
        background: var(--gold);
        color: var(--black);
    }
    .prop-slider__btn:disabled { opacity: .35; cursor: default; }

    /* ---- Paged Property Grid ---- */
    .prop-paged-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sp-6);
    }
    @media (max-width: 900px) {
        .prop-paged-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 600px) {
        .prop-paged-grid { grid-template-columns: 1fr; }
    }

    /* ---- Sección alternativa ---- */
    .section--alt { background: var(--gray-50); }

    /* ---- Testimonios ---- */
    .testi-nav { display: flex; gap: var(--sp-3); align-items: center; }
    .testi-nav__btn {
        display: inline-flex; align-items: center; gap: var(--sp-2);
        padding: var(--sp-2) var(--sp-5);
        border-radius: 99px;
        border: 1.5px solid var(--gray-200);
        background: var(--white);
        color: var(--gray-800);
        font-size: .8125rem;
        font-weight: 600;
        font-family: var(--font-main);
        cursor: pointer;
        transition: border-color .2s, background .2s, color .2s;
    }
    .testi-nav__btn:hover:not(:disabled) { border-color: var(--gold); background: var(--gold); color: var(--black); }
    .testi-nav__btn:disabled { opacity: .4; cursor: default; }
    .testi-slider-outer { overflow: hidden; }
    .testi-slider__track {
        display: flex; gap: var(--sp-6); overflow-x: auto;
        scroll-snap-type: x mandatory; scroll-behavior: smooth;
        scrollbar-width: none; -ms-overflow-style: none;
    }
    .testi-slider__track::-webkit-scrollbar { display: none; }
    .testi-card {
        flex: 0 0 calc((100% - 2 * var(--sp-6)) / 3);
        scroll-snap-align: start; min-width: 0;
        padding: var(--sp-8);
        background: var(--white);
        border-radius: var(--radius-lg);
        border: 1.5px solid var(--gray-200);
    }
    @media (max-width: 900px) { .testi-card { flex: 0 0 calc((100% - var(--sp-6)) / 2); } }
    @media (max-width: 600px) { .testi-card { flex: 0 0 88%; } }
    .testi-card__avatar {
        width: 72px; height: 72px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 1.25rem; font-weight: 700;
        margin-bottom: var(--sp-5);
        flex-shrink: 0;
    }
    .testi-card__stars { color: var(--gold); font-size: 1.05rem; letter-spacing: 2px; margin-bottom: var(--sp-3); }
    .testi-card__name { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin-bottom: var(--sp-4); }
    .testi-card__quote { font-size: .9rem; line-height: 1.75; color: var(--gray-600); margin-bottom: var(--sp-4); font-style: italic; }
    .testi-card__role { font-size: .8125rem; color: var(--gray-400); font-weight: 500; }

    /* ---- Propiedades relacionadas ---- */
    .related-section {
        background: var(--gray-50);
        border-top: 1px solid var(--gray-200);
        padding: var(--sp-16) 0;
    }
    .related-section__header {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: var(--sp-4);
        margin-bottom: var(--sp-8);
        flex-wrap: wrap;
    }
    .related-section__title {
        font-size: 1.35rem;
        font-weight: 700;
        margin: var(--sp-1) 0 0;
        line-height: 1.2;
    }
    .related-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sp-6);
    }
    @media (max-width: 900px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 580px)  { .related-grid { grid-template-columns: 1fr; } }

    .related-card { cursor: pointer; }
    .related-card__match { margin-top: var(--sp-3); min-height: 20px; }
    .related-card__diff {
        display: inline-block;
        font-size: .72rem;
        font-weight: 600;
        padding: 2px 8px;
        border-radius: 100px;
        letter-spacing: .02em;
    }
    .related-card__diff.is-higher { background: #fff1e6; color: #b85e00; }
    .related-card__diff.is-lower  { background: #e6f4ea; color: #1a7a3a; }
    .related-card__diff.is-same   { background: var(--gray-100); color: var(--gray-600); }

    /* ---- KPI / Estadísticas ---- */
    .kpi-section {
        padding: var(--sp-20) 0;
        background: var(--black);
        position: relative;
        overflow: hidden;
    }
    .kpi-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: radial-gradient(circle, rgba(211,155,99,.08) 1px, transparent 1px);
        background-size: 28px 28px;
        pointer-events: none;
    }
    .kpi-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: relative;
        z-index: 1;
    }
    .kpi-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--sp-3);
        padding: 0 var(--sp-8);
        border-right: 1px solid rgba(255,255,255,.08);
    }
    .kpi-item:first-child { padding-left: 0; }
    .kpi-item:last-child { border-right: none; }
    .kpi-item__bar {
        width: 32px;
        height: 3px;
        background: var(--gold);
        border-radius: 2px;
        margin-bottom: var(--sp-1);
    }
    .kpi-number {
        font-size: clamp(2.25rem, 4vw, 3.25rem);
        font-weight: 700;
        color: var(--white);
        line-height: 1;
        letter-spacing: -1.5px;
    }
    .kpi-plus { color: var(--gold); font-size: .68em; margin-left: 1px; vertical-align: super; }
    .kpi-label {
        font-size: .75rem;
        color: rgba(255,255,255,.45);
        font-weight: 500;
        letter-spacing: .07em;
        text-transform: uppercase;
    }
    @media (max-width: 768px) {
        .kpi-grid { grid-template-columns: repeat(2, 1fr); }
        .kpi-item {
            padding: var(--sp-8) var(--sp-6);
            border-right: none;
            border-bottom: 1px solid rgba(255,255,255,.08);
        }
        .kpi-item:first-child { padding-left: var(--sp-6); }
        .kpi-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.08); }
        .kpi-item:nth-last-child(-n+2) { border-bottom: none; }
    }

    /* ---- Paginación pública ---- */
    .pub-pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--sp-1);
        margin-top: var(--sp-10);
    }
    .pub-pagination__btn {
        width: 38px; height: 38px;
        display: flex; align-items: center; justify-content: center;
        border-radius: var(--radius);
        font-size: .875rem;
        font-weight: 600;
        color: var(--gray-600);
        border: 1.5px solid var(--gray-200);
        background: var(--white);
        transition: border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
    }
    .pub-pagination__btn:hover:not(:disabled):not(.is-active) {
        border-color: var(--gold);
        color: var(--gold);
        box-shadow: 0 2px 8px rgba(211,155,99,.18);
    }
    .pub-pagination__btn.is-active {
        background: var(--gold);
        border-color: var(--gold);
        color: var(--black);
    }
    .pub-pagination__btn:disabled { opacity: .35; cursor: default; }

    /* ---- Filtros listado ---- */
    .filters-bar {
        background: var(--white);
        border: 1px solid var(--gray-100);
        border-radius: var(--radius-lg);
        padding: var(--sp-5) var(--sp-6);
        display: flex;
        flex-wrap: wrap;
        gap: var(--sp-4);
        align-items: flex-end;
        margin-bottom: var(--sp-8);
        box-shadow: var(--shadow);
    }
    .filter-group { flex: 1; min-width: 140px; }
    .filter-group label {
        display: block;
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .10em;
        color: var(--gray-600);
        margin-bottom: var(--sp-1);
    }

    /* ---- Sección Contacto ---- */
    .contact-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-16);
        align-items: start;
    }
    .contact-info__item {
        display: flex;
        gap: var(--sp-4);
        margin-bottom: var(--sp-6);
        align-items: flex-start;
    }
    .contact-info__icon {
        width: 48px; height: 48px;
        flex-shrink: 0;
        background: rgba(211,155,99,.12);
        border-radius: var(--radius);
        display: flex; align-items: center; justify-content: center;
        color: var(--gold);
        transition: background var(--transition);
    }
    .contact-info__item:hover .contact-info__icon { background: rgba(211,155,99,.22); }
    .contact-info__icon svg { width: 22px; height: 22px; }
    .contact-info__label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-400); margin-bottom: 2px; }
    .contact-info__value { font-weight: 500; color: var(--white); text-decoration: none; }
    .contact-info__value:hover { color: var(--gold); }
    .contact-info__social {
        display: flex;
        gap: var(--sp-4);
        margin-top: var(--sp-6);
        padding-top: var(--sp-6);
        border-top: 1px solid rgba(255,255,255,.08);
    }
    .contact-info__social-link {
        display: flex;
        align-items: center;
        gap: var(--sp-2);
        color: var(--gray-400);
        font-size: .85rem;
        font-weight: 500;
        text-decoration: none;
        padding: var(--sp-2) var(--sp-4);
        border: 1px solid rgba(255,255,255,.12);
        border-radius: var(--radius);
        transition: color var(--transition), border-color var(--transition), background var(--transition);
    }
    .contact-info__social-link svg { width: 16px; height: 16px; flex-shrink: 0; }
    .contact-info__social-link:hover { color: var(--gold); border-color: var(--gold); background: rgba(211,155,99,.08); }

    /* Compensar header sticky en anclas de sección */
    #contacto { scroll-margin-top: var(--header-h); }

    .contact-form {
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.1);
        border-radius: var(--radius-lg);
        padding: var(--sp-8);
    }
    .contact-form .form-group { margin-bottom: var(--sp-4); }
    .contact-form label {
        display: block;
        font-size: .8rem;
        font-weight: 600;
        color: rgba(255,255,255,.7);
        text-transform: uppercase;
        letter-spacing: .08em;
        margin-bottom: var(--sp-1);
    }
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        background-color: rgba(255,255,255,.08);
        border-color: rgba(255,255,255,.15);
        color: var(--white);
        border-radius: var(--radius-input);
    }
    .contact-form select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right .9rem center;
    }
    .contact-form select option {
        background-color: #1a2035;
        color: #fff;
    }
    .contact-form input::placeholder,
    .contact-form textarea::placeholder { color: rgba(255,255,255,.35); }
    .contact-form input:focus,
    .contact-form select:focus,
    .contact-form textarea:focus { border-color: var(--gold); background-color: rgba(255,255,255,.12); }
    .contact-form textarea { resize: vertical; min-height: 120px; }

    /* ---- Éxito formulario de contacto ---- */
    @keyframes cs-pop {
        from { transform: scale(.4); opacity: 0; }
        65%  { transform: scale(1.1); }
        to   { transform: scale(1);  opacity: 1; }
    }
    @keyframes cs-draw {
        to { stroke-dashoffset: 0; }
    }
    @keyframes cs-fadeslide {
        from { opacity: 0; transform: translateY(8px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .contact-success {
        text-align: center;
        padding: var(--sp-10) var(--sp-6);
    }
    .contact-success__icon {
        display: inline-flex;
        animation: cs-pop .55s cubic-bezier(.34,1.56,.64,1) both;
    }
    .cs-ring {
        stroke-dasharray: 252;
        stroke-dashoffset: 252;
        animation: cs-draw .7s ease forwards .05s;
    }
    .cs-env-body {
        stroke-dasharray: 175;
        stroke-dashoffset: 175;
        animation: cs-draw .45s ease forwards .55s;
    }
    .cs-env-flap {
        stroke-dasharray: 65;
        stroke-dashoffset: 65;
        animation: cs-draw .3s ease forwards .9s;
    }
    .cs-check {
        stroke-dasharray: 45;
        stroke-dashoffset: 45;
        animation: cs-draw .45s cubic-bezier(.34,1.56,.64,1) forwards 1.1s;
    }
    .contact-success__title {
        color: var(--white);
        font-weight: 600;
        font-size: 1.15rem;
        margin-top: var(--sp-5);
        opacity: 0;
        animation: cs-fadeslide .4s ease forwards 1.2s;
    }
    .contact-success__sub {
        color: rgba(255,255,255,.6);
        font-size: .9rem;
        margin-top: var(--sp-2);
        opacity: 0;
        animation: cs-fadeslide .4s ease forwards 1.35s;
    }
    .contact-success__btn {
        margin-top: var(--sp-6);
        opacity: 0;
        animation: cs-fadeslide .4s ease forwards 1.5s;
        animation-fill-mode: both;
    }

    /* ---- Toast notificación ---- */
    .pub-toast {
        position: fixed;
        bottom: var(--sp-6);
        left: 50%;
        transform: translateX(-50%) translateY(80px);
        background: var(--gray-800);
        color: var(--white);
        padding: var(--sp-3) var(--sp-6);
        border-radius: var(--radius);
        font-size: .9rem;
        font-weight: 500;
        box-shadow: var(--shadow-lg);
        transition: transform .3s ease;
        z-index: 9000;
        white-space: nowrap;
    }
    .pub-toast.is-visible { transform: translateX(-50%) translateY(0); }
    .pub-toast--ok   { border-left: 4px solid #4caf50; }
    .pub-toast--error { border-left: 4px solid #f44336; }

    /* ---- WhatsApp flotante ---- */
    .whatsapp-fab {
        position: fixed;
        bottom: var(--sp-8);
        right: var(--sp-8);
        z-index: 8000;
        width: 58px; height: 58px;
        background: #25d366;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 4px 20px rgba(37,211,102,.45);
        transition: transform .2s, box-shadow .2s;
        color: var(--white);
    }
    .whatsapp-fab:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 28px rgba(37,211,102,.6);
    }
    .whatsapp-fab svg { width: 30px; height: 30px; }

    /* ---- Spinner ---- */
    .pub-spinner {
        width: 40px; height: 40px;
        border: 3px solid var(--gray-200);
        border-top-color: var(--gold);
        border-radius: 50%;
        animation: spin .7s linear infinite;
        margin: var(--sp-12) auto;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ---- Estado vacío ---- */
    .empty-state {
        text-align: center;
        padding: var(--sp-16) var(--sp-6);
        color: var(--gray-400);
    }
    .empty-state__icon { font-size: 3rem; margin-bottom: var(--sp-4); }

    /* ---- Modal de detalle / contacto ---- */
    .modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.65);
        z-index: 5000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--sp-4);
    }
    .modal {
        background: var(--white);
        border-radius: var(--radius-lg);
        width: 100%;
        max-width: 520px;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }
    .modal__header {
        padding: var(--sp-6);
        border-bottom: 1px solid var(--gray-100);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .modal__title { font-size: 1.1rem; font-weight: 700; }
    .modal__close {
        width: 34px; height: 34px;
        border-radius: var(--radius);
        display: flex; align-items: center; justify-content: center;
        color: var(--gray-600);
        transition: background var(--transition), color var(--transition);
    }
    .modal__close:hover { background: var(--gray-100); color: var(--gray-800); }
    .modal__body { padding: var(--sp-6); }

    /* ---- Footer legal links ---- */
    .footer-legal {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--sp-3);
        margin-top: var(--sp-3);
        font-size: .78rem;
    }
    .footer-legal a { transition: color .2s; }
    .footer-legal a:hover { color: var(--gold); }
    .footer-legal span { opacity: .35; }

    /* ---- Nosotros — Historia ---- */
    .nos-historia {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: var(--sp-16);
        align-items: start;
    }
    .nos-historia__aside { position: sticky; top: calc(var(--header-h) + var(--sp-8)); }
    .nos-gold-line { width: 56px; height: 3px; background: var(--gold); margin-top: var(--sp-5); }
    .nos-lead {
        font-size: 1.15rem;
        font-weight: 600;
        color: var(--gray-800);
        line-height: 1.55;
        margin-bottom: var(--sp-5);
    }
    .nos-historia__body p { color: var(--gray-600); line-height: 1.85; margin-bottom: var(--sp-4); }
    .nos-historia__body p:last-child { margin-bottom: 0; }

    /* ---- Nosotros — Misión + Visión ---- */
    .nos-mv-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-8);
    }
    .nos-mv-card {
        background: var(--white);
        border-radius: var(--radius-lg);
        padding: var(--sp-10);
        box-shadow: var(--shadow);
        position: relative;
        overflow: hidden;
    }
    .nos-mv-card::before {
        content: '';
        position: absolute;
        top: 0; left: 0;
        width: 4px; height: 100%;
        background: var(--gold);
        border-radius: 4px 0 0 4px;
    }
    .nos-mv-card__icon {
        width: 52px; height: 52px;
        background: rgba(211,155,99,.1);
        border-radius: var(--radius);
        display: flex; align-items: center; justify-content: center;
        color: var(--gold);
        margin-bottom: var(--sp-5);
    }
    .nos-mv-card__icon svg { width: 26px; height: 26px; }
    .nos-mv-card p { color: var(--gray-600); line-height: 1.8; }

    /* ---- Nosotros — Plataformas ---- */
    .nos-platforms {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--sp-5);
    }
    .nos-platform-card {
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.1);
        border-radius: var(--radius-lg);
        padding: var(--sp-8) var(--sp-5);
        text-align: center;
        transition: background .25s, border-color .25s, transform .25s;
    }
    .nos-platform-card:hover {
        background: rgba(211,155,99,.1);
        border-color: rgba(211,155,99,.4);
        transform: translateY(-3px);
    }
    .nos-platform-icon {
        width: 48px; height: 48px;
        background: rgba(211,155,99,.15);
        border-radius: var(--radius);
        display: flex; align-items: center; justify-content: center;
        color: var(--gold);
        margin: 0 auto var(--sp-4);
    }
    .nos-platform-icon svg { width: 22px; height: 22px; }
    .nos-platform-name { display: block; color: var(--white); font-weight: 700; font-size: 1rem; margin-bottom: var(--sp-1); }
    .nos-platform-domain { display: block; color: var(--gray-400); font-size: .78rem; }

    /* ---- Páginas legales ---- */
    .legal-content {
        max-width: 760px;
        margin: 0 auto;
        padding: var(--sp-16) var(--sp-6);
    }
    .legal-content h2 {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--gray-800);
        margin: var(--sp-10) 0 var(--sp-4);
        padding-left: var(--sp-3);
        border-left: 3px solid var(--gold);
    }
    .legal-content h2:first-of-type { margin-top: var(--sp-8); }
    .legal-content p { color: var(--gray-600); line-height: 1.85; margin-bottom: var(--sp-4); }
    .legal-content ul {
        list-style: none;
        margin-bottom: var(--sp-4);
        display: flex;
        flex-direction: column;
        gap: var(--sp-2);
    }
    .legal-content ul li {
        color: var(--gray-600);
        line-height: 1.7;
        padding-left: var(--sp-5);
        position: relative;
    }
    .legal-content ul li::before {
        content: '—';
        position: absolute;
        left: 0;
        color: var(--gold);
        font-weight: 700;
    }

    /* ---- Barra de resultados ---- */
    .results-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: var(--sp-3);
        margin-bottom: var(--sp-6);
        padding: var(--sp-3) var(--sp-5);
        background: var(--white);
        border: 1px solid var(--gray-100);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
    }
    .results-bar__count { line-height: 1.2; }

    /* ---- Selector propiedades por página ---- */
    .perpage-selector {
        display: flex;
        align-items: center;
        gap: var(--sp-3);
    }
    .perpage-selector__label {
        font-size: .7rem;
        font-weight: 700;
        letter-spacing: .10em;
        text-transform: uppercase;
        color: var(--gray-600);
        white-space: nowrap;
    }
    .perpage-selector__track {
        display: flex;
        gap: 2px;
        background: var(--gray-100);
        border-radius: calc(var(--radius) + 3px);
        padding: 3px;
    }
    .perpage-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 42px;
        height: 32px;
        padding: 0 var(--sp-3);
        border-radius: var(--radius);
        border: none;
        background: transparent;
        cursor: pointer;
        font-size: .88rem;
        font-weight: 700;
        color: var(--gray-700);
        transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    }
    .perpage-btn:hover:not(.is-active) { background: rgba(255,255,255,.9); color: var(--gray-800); }
    .perpage-btn.is-active {
        background: var(--gold);
        color: var(--black);
        box-shadow: 0 2px 8px rgba(211,155,99,.35);
    }

    /* ---- Skeleton loading ---- */
    @keyframes shimmer {
        0%   { background-position: -800px 0; }
        100% { background-position: 800px 0; }
    }
    .skeleton-pulse {
        background: linear-gradient(90deg,
            var(--gray-100) 25%,
            var(--gray-200) 50%,
            var(--gray-100) 75%);
        background-size: 1600px 100%;
        animation: shimmer 1.6s infinite linear;
    }
    .prop-card-skeleton {
        background: var(--white);
        border-radius: var(--radius-lg);
        border: 1px solid var(--gray-100);
        overflow: hidden;
    }
    .prop-card-skeleton__img {
        aspect-ratio: 4/3;
    }
    .prop-card-skeleton__body {
        padding: var(--sp-4) var(--sp-5);
        display: flex;
        flex-direction: column;
        gap: var(--sp-3);
    }
    .prop-card-skeleton__line {
        height: 13px;
        border-radius: 6px;
    }
    .prop-card-skeleton__line--price { height: 22px; width: 55%; }
    .prop-card-skeleton__line--title { width: 90%; }
    .prop-card-skeleton__line--loc   { width: 60%; }

    /* ---- Chip badge tipo operación ---- */
    .badge-op {
        display: inline-block;
        font-size: .7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .08em;
        padding: 2px 10px;
        border-radius: 100px;
        background: var(--gold);
        color: var(--black);
    }
}

    /* ---- Blog — tarjetas de listado ---- */
    .blog-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--sp-6);
    }
    .blog-card {
        background: var(--white);
        border: 1px solid var(--gray-100);
        border-radius: var(--radius-lg);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: box-shadow .25s, transform .25s;
    }
    .blog-card:hover {
        box-shadow: var(--shadow);
        transform: translateY(-3px);
    }
    .blog-card__img-wrap {
        aspect-ratio: 16/9;
        overflow: hidden;
        display: block;
        background: var(--gray-100);
        flex-shrink: 0;
    }
    .blog-card__img {
        width: 100%; height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .35s;
    }
    .blog-card:hover .blog-card__img { transform: scale(1.04); }
    .blog-card__img-placeholder {
        width: 100%; height: 100%;
        display: flex; align-items: center; justify-content: center;
        color: var(--gray-200);
    }
    .blog-card__img-placeholder svg { width: 40px; height: 40px; }
    .blog-card__body {
        padding: var(--sp-5);
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    .blog-card__meta {
        display: flex;
        align-items: center;
        gap: var(--sp-3);
        margin-bottom: var(--sp-3);
        flex-wrap: wrap;
    }
    .blog-card__cat {
        display: inline-block;
        font-size: .68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .10em;
        color: var(--gold);
        background: rgba(211,155,99,.1);
        padding: 2px 10px;
        border-radius: 100px;
    }
    .blog-card__date {
        font-size: .78rem;
        color: var(--gray-400);
    }
    .blog-card__title {
        font-size: 1.05rem;
        font-weight: 700;
        line-height: 1.4;
        margin-bottom: var(--sp-3);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .blog-card__title a { color: var(--gray-800); transition: color var(--transition); }
    .blog-card__title a:hover { color: var(--gold); }
    .blog-card__excerpt {
        font-size: .875rem;
        color: var(--gray-600);
        line-height: 1.7;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: var(--sp-4);
        flex: 1;
    }
    .blog-card__link {
        display: inline-flex;
        align-items: center;
        gap: var(--sp-1);
        font-size: .82rem;
        font-weight: 700;
        color: var(--gold);
        letter-spacing: .04em;
        margin-top: auto;
        transition: gap var(--transition);
    }
    .blog-card__link:hover { gap: var(--sp-2); }

    /* ---- Blog — skeleton ---- */
    .blog-card-skeleton {
        background: var(--white);
        border: 1px solid var(--gray-100);
        border-radius: var(--radius-lg);
        overflow: hidden;
    }
    .blog-card-skeleton__img { aspect-ratio: 16/9; }
    .blog-card-skeleton__body {
        padding: var(--sp-5);
        display: flex; flex-direction: column; gap: var(--sp-3);
    }
    .blog-card-skeleton__cat   { height: 12px; width: 80px; border-radius: 100px; }
    .blog-card-skeleton__title { height: 18px; width: 100%; border-radius: 6px; }
    .blog-card-skeleton__line  { height: 13px; width: 85%; border-radius: 6px; }

    /* ---- Artículo individual ---- */
    .art-wrap { background: var(--white); }
    .art-hero { padding-bottom: 0; }
    .art-hero__content { max-width: 760px; padding-bottom: var(--sp-8); }
    .art-meta {
        display: flex;
        align-items: center;
        gap: var(--sp-3);
        margin-bottom: var(--sp-5);
        flex-wrap: wrap;
    }
    .art-meta__date, .art-meta__author {
        font-size: .82rem;
        color: var(--gray-400);
    }
    .art-meta__author::before { content: '·'; margin-right: var(--sp-3); }
    .art-title {
        font-size: clamp(1.6rem, 4vw, 2.4rem);
        font-weight: 700;
        line-height: 1.25;
        color: var(--white);
        margin-bottom: var(--sp-4);
        text-wrap: balance;
    }
    .art-extracto {
        font-size: 1.05rem;
        color: var(--gray-400);
        line-height: 1.7;
        max-width: 640px;
    }
    .art-portada {
        width: 100%;
        max-height: 520px;
        object-fit: cover;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        display: block;
        margin-top: var(--sp-6);
    }
    .art-body {
        max-width: 760px;
        margin: 0 auto;
        padding: var(--sp-10) 0;
        font-size: 1.05rem;
        line-height: 1.85;
        color: var(--gray-700);
    }
    .art-body h2 {
        font-size: 1.45rem; font-weight: 700;
        color: var(--gray-800);
        margin: var(--sp-10) 0 var(--sp-4);
        padding-left: var(--sp-4);
        border-left: 4px solid var(--gold);
    }
    .art-body h3 {
        font-size: 1.15rem; font-weight: 700;
        color: var(--gray-800);
        margin: var(--sp-8) 0 var(--sp-3);
    }
    .art-body p  { margin-bottom: var(--sp-5); }
    .art-body ul, .art-body ol { margin-bottom: var(--sp-5); padding-left: var(--sp-6); }
    .art-body li { margin-bottom: var(--sp-2); }
    .art-body a  { color: var(--gold); text-decoration: underline; }
    .art-body a:hover { color: var(--gold-dark); }
    .art-body img {
        max-width: 100%; border-radius: var(--radius);
        margin: var(--sp-6) 0; display: block;
    }
    .art-body strong { color: var(--gray-800); font-weight: 700; }
    .art-body blockquote {
        border-left: 4px solid var(--gold);
        padding: var(--sp-4) var(--sp-6);
        background: var(--gray-50);
        border-radius: 0 var(--radius) var(--radius) 0;
        margin: var(--sp-6) 0;
        font-style: italic;
        color: var(--gray-600);
    }
    .art-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: var(--sp-4);
        padding: var(--sp-8) 0;
        border-top: 1px solid var(--gray-100);
        max-width: 760px;
        margin: 0 auto;
    }

@layer utils {
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
    .text-gold  { color: var(--gold); }
    .text-muted { color: var(--gray-400); }
    .text-sm    { font-size: .875rem; }
    .text-xs    { font-size: .75rem; }
    .fw-700     { font-weight: 700; }
    .mt-auto    { margin-top: auto; }
    [x-cloak]   { display: none !important; }
}

/* ---- Responsivo ---- */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > :first-child { grid-column: 1 / -1; }
    .contact-grid { grid-template-columns: 1fr; gap: var(--sp-10); }
    .hero-search { grid-template-columns: 1fr 1fr; }
    .hero-search > :last-child { grid-column: 1 / -1; }
    .nos-historia { grid-template-columns: 1fr; gap: var(--sp-8); }
    .nos-historia__aside { position: static; }
    .nos-mv-grid { grid-template-columns: 1fr; }
    .nos-platforms { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    :root { --header-h: 60px; }
    .site-nav { display: none; flex-direction: column; position: fixed; inset: 0 0 0 40%; background: var(--black); padding: var(--sp-16) var(--sp-6); z-index: 200; gap: var(--sp-5); }
    .site-nav.is-open { display: flex; }
    .nav-toggle { display: flex; }
    .site-logo img { height: 38px; }
    .hero { min-height: 100vh; min-height: 100svh; }
    .hero-search { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
    .footer-legal { flex-direction: column; gap: var(--sp-2); }
    .footer-legal span { display: none; }
    .whatsapp-fab { bottom: var(--sp-5); right: var(--sp-5); }
    .cards-grid { grid-template-columns: 1fr; }
    .nos-mv-card { padding: var(--sp-6); }
    .nos-platforms { grid-template-columns: 1fr 1fr; }
    .legal-content { padding: var(--sp-10) var(--sp-4); }
    .results-bar { flex-direction: column; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4); }
    .perpage-selector { flex-direction: column; align-items: flex-start; gap: var(--sp-2); width: 100%; }
    .perpage-selector__label { font-size: .68rem; }
    .perpage-selector__track { width: 100%; justify-content: space-between; }
    .perpage-btn { flex: 1; }
}
