/* ============================================================
   bento.css — Bento Grid Home, Glassmorphism Nav, Cards
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   1. GLASSMORPHISM NAV
   ════════════════════════════════════════════════════════════ */

.mh-top-header.mh-top-header--default {
    background: rgba(26, 26, 26, 0.92) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    height: var(--topbar-height);
    display: flex;
    align-items: center;
}

.mh-top-header .mh-layout {
        /* display: flex; */
    align-items: center;
    gap: var(--space-5);
    flex-wrap: wrap;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.mh-top-header__element a,
.mh-top-header__element span,
.mh-top-header__element address {
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: var(--font-size-xs) !important;
    font-weight: 400 !important;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.mh-top-header__element a:hover span {
    color: #fff !important;
}

.mh-top-header__element .fa,
.mh-top-header__element .flaticon-phone,
.mh-top-header__element .flaticon-pin,
.mh-top-header__element .flaticon-mail-2 {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 14px !important;
    margin-right: 4px;
}

/* Nav principal — glass scroll-aware */
nav.navbar.navbar-inverse {
    background: rgba(15, 15, 15, 0.70) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: none !important;
    border-bottom: 1px solid var(--glass-border) !important;
    min-height: var(--nav-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

nav.navbar.navbar-inverse.nav-scrolled {
    background: rgba(10, 10, 10, 0.92) !important;
    box-shadow: var(--shadow-lg);
}

nav.navbar.navbar-inverse .navbar-nav > li > a {
    color: rgba(255, 255, 255, 0.80) !important;
    font-size: var(--font-size-sm) !important;
    font-weight: 500 !important;
    letter-spacing: 0.03em;
    padding: 24px 16px !important;
    transition: color var(--transition-fast) !important;
    border-bottom: 2px solid transparent;
}

nav.navbar.navbar-inverse .navbar-nav > li > a:hover,
nav.navbar.navbar-inverse .navbar-nav > li.active > a {
    color: #fff !important;
    background: transparent !important;
    border-bottom-color: var(--color-primary) !important;
}

.logo_link img {
    height: 50px !important;
    width: auto !important;
    max-width: 160px !important;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: filter var(--transition-base), opacity var(--transition-base);
}

.logo_link:hover img {
    opacity: 0.85;
}

/* ════════════════════════════════════════════════════════════
   2. BENTO HERO — Home page
   ════════════════════════════════════════════════════════════ */

.bento-hero {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: var(--gap-bento);
    padding: var(--space-8) var(--space-6);
    max-width: 1400px;
    margin: 0 auto;
    min-height: 80vh;
    align-items: stretch;
}

/* — Celda Headline (col 1-7, row 1-2) — */
.bento-cell--headline {
    grid-column: 1 / 8;
    grid-row: 1 / 3;
    background: transparent;
    border-radius: var(--radius-bento);
    padding: var(--space-12) var(--space-10);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    min-height: 420px;
    box-shadow: var(--shadow-xl);
}

.bento-cell--headline::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        rgba(26, 26, 26, 0.80) 60%
    );
    opacity: 1;
    z-index: 0;
}

.bento-cell--headline > * {
    position: relative;
    z-index: 1;
}

.bento-headline__tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: var(--space-1) var(--space-4);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: rgba(255,255,255,0.70);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-5);
    width: fit-content;
}

.bento-headline__title {
    font-size: clamp(2rem, 3.5vw, var(--font-size-5xl));
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-5);
}

.bento-headline__subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
    line-height: 1.5;
    max-width: 420px;
    margin-bottom: var(--space-8);
}

.bento-headline__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background: #fff;
    color: var(--text-primary) !important;
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-btn);
    text-decoration: none !important;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: var(--shadow-md);
    width: fit-content;
}

.bento-headline__cta:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--color-primary) !important;
}

.bento-headline__cta .fa {
    color: var(--color-primary) !important;
    font-size: 14px;
    transition: transform var(--transition-fast);
}

.bento-headline__cta:hover .fa {
    transform: translateX(4px);
}

/* — Celdas de propiedad (col 8-12) — */
.bento-cell--property {
    grid-column: span 5;
    border-radius: var(--radius-bento);
    overflow: hidden;
    position: relative;
    background: var(--bg-surface);
    box-shadow: var(--shadow-md);
    min-height: 200px;
    cursor: pointer;
    display: block;
    text-decoration: none !important;
}

.bento-cell--property:nth-child(2) { grid-column: 8 / 13; grid-row: 1; }
.bento-cell--property:nth-child(3) { grid-column: 8 / 10; grid-row: 2; }
.bento-cell--property:nth-child(4) { grid-column: 10 / 13; grid-row: 2; }
.bento-cell--property:nth-child(5) { grid-column: 1 / 5;  grid-row: 3; }
.bento-cell--property:nth-child(6) { grid-column: 5 / 9;  grid-row: 3; }
.bento-cell--property:nth-child(7) { grid-column: 9 / 13; grid-row: 3; }

.bento-cell--property img.bento-prop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms ease;
}

.bento-cell--property:hover img.bento-prop-img {
    transform: scale(1.06);
}

/* Overlay de gradiente */
.bento-prop-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.80) 0%,
        rgba(0, 0, 0, 0.15) 55%,
        transparent 100%
    );
    z-index: 1;
    transition: background var(--transition-base);
}

.bento-cell--property:hover .bento-prop-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.25) 55%,
        rgba(0, 0, 0, 0.05) 100%
    );
}

/* Info sobre la imagen */
.bento-prop-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-5) var(--space-5) var(--space-4);
    z-index: 2;
}

.bento-prop-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: var(--space-2);
}

.bento-prop-badge--venta   { background: var(--color-primary); color: #fff; }
.bento-prop-badge--alquiler { background: #1a7a4a; color: #fff; }
.bento-prop-badge--reservado { background: #e08c00; color: #fff; }

.bento-prop-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #fff !important;
    line-height: 1.3;
    margin-bottom: var(--space-1);
    display: block;
}

.bento-prop-price {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.bento-prop-location {
    font-size: var(--font-size-xs);
    color: rgba(255,255,255,0.70);
    font-weight: 400;
}

.bento-prop-features {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-2);
    flex-wrap: wrap;
}

.bento-prop-features span {
    font-size: 14px;
    color: rgba(255,255,255,0.80);
    display: flex;
    align-items: center;
    gap: 3px;
}

/* — Sin resultados — */
.bento-hero--empty {
    text-align: center;
    padding: var(--space-20) var(--space-6);
    color: var(--text-secondary);
}

/* ════════════════════════════════════════════════════════════
   3. SECCIÓN DESTACADOS — reemplaza owl-carousel
   ════════════════════════════════════════════════════════════ */

.section-destacados {
    /* background: var(--bg-muted); */
    padding: var(--space-16) var(--space-6);
}

.section-destacados .section-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.section-destacados .section-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: var(--space-3);
}

.section-destacados .section-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

/* Grid de tarjetas (CSS Grid nativo — sin owl) */
.bento-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-6);
    max-width: 1400px;
    margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════
   4. PROPERTY-CARD (usada en destacados y similares)
   ════════════════════════════════════════════════════════════ */

.property-card {
    background: var(--bg-surface);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.property-card .card-carousel {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.property-card .carousel-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 600ms ease;
}

.property-card:hover .carousel-slide {
    transform: scale(1.05);
}

.property-card .card-badges {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 2;
    display: flex;
    gap: var(--space-2);
}

.property-card .badge {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
}

.badge--venta     { background: var(--color-primary) !important; color: #fff !important; }
.badge--alquiler  { background: #1a7a4a !important; color: #fff !important; }
.badge--reservado { background: #e08c00 !important; color: #fff !important; }

.property-card .card-content {
    padding: var(--space-5) var(--space-5) var(--space-4);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--space-3);
}

.property-card .card-location {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.property-card .card-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0;
}

.property-card .card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.property-card .card-title a:hover {
    color: var(--color-primary);
}

.property-card .card-features {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.property-card .feature {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

.property-card .feature svg {
    color: var(--text-muted);
}

.property-card .card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-light);
    margin-top: auto;
    gap: var(--space-3);
}

.property-card .card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    flex-wrap: wrap;
}

.property-card .card-meta .dot {
    color: var(--border-medium);
}

.property-card .card-ref {
    font-size: 14px;
}

.property-card .card-price {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════
   5. BUSCADOR INLINE EN HOME — wrapper
   ════════════════════════════════════════════════════════════ */

.bento-search-wrapper {
    background: var(--bg-surface);
    border-radius: var(--radius-bento);
    padding: var(--space-10) var(--space-8);
    box-shadow: var(--shadow-md);
    margin: 0 var(--space-6) var(--space-8);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* ════════════════════════════════════════════════════════════
   6. RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .bento-hero {
        grid-template-columns: repeat(6, 1fr);
        min-height: auto;
    }

    .bento-cell--headline {
        grid-column: 1 / 7;
        grid-row: 1;
        min-height: 340px;
    }

    .bento-cell--property:nth-child(2) { grid-column: 1 / 4; grid-row: 2; }
    .bento-cell--property:nth-child(3) { grid-column: 4 / 7; grid-row: 2; }
    .bento-cell--property:nth-child(4) { grid-column: 1 / 3; grid-row: 3; }
    .bento-cell--property:nth-child(5) { grid-column: 3 / 5; grid-row: 3; }
    .bento-cell--property:nth-child(6) { grid-column: 5 / 7; grid-row: 3; }
    .bento-cell--property:nth-child(7) { display: none; }
}

@media (max-width: 768px) {
    .bento-hero {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: var(--space-5) var(--space-4);
    }

    .bento-cell--headline {
        grid-column: 1 / 3;
        grid-row: 1;
        min-height: 280px;
        padding: var(--space-8) var(--space-6);
    }

    .bento-headline__title {
        font-size: 1.75rem;
    }

    .bento-cell--property:nth-child(2) { grid-column: 1 / 2; grid-row: 2; min-height: 180px; }
    .bento-cell--property:nth-child(3) { grid-column: 2 / 3; grid-row: 2; min-height: 180px; }
    .bento-cell--property:nth-child(4) { grid-column: 1 / 2; grid-row: 3; min-height: 180px; }
    .bento-cell--property:nth-child(5) { grid-column: 2 / 3; grid-row: 3; min-height: 180px; }
    .bento-cell--property:nth-child(6),
    .bento-cell--property:nth-child(7) { display: none; }

    .bento-cards-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    nav.navbar.navbar-inverse {
        position: relative;
    }
}

@media (max-width: 480px) {
    .bento-hero {
        grid-template-columns: 1fr;
    }

    .bento-cell--headline { grid-column: 1; grid-row: 1; }
    .bento-cell--property:nth-child(2) { grid-column: 1; grid-row: 2; }
    .bento-cell--property:nth-child(3) { grid-column: 1; grid-row: 3; }
    .bento-cell--property:nth-child(4),
    .bento-cell--property:nth-child(5),
    .bento-cell--property:nth-child(6),
    .bento-cell--property:nth-child(7) { display: none; }
}

/* ════════════════════════════════════════════════════════════
   7. UTILIDADES
   ════════════════════════════════════════════════════════════ */

.bento-section-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.bento-section-link {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    transition: gap var(--transition-fast);
}

.bento-section-link:hover {
    gap: var(--space-3);
    color: var(--color-primary);
}
