/* =====================================================
   Inmobiliaria Regueira — Estilos principales
   Diseño: Profesional, moderno, premium
   Paleta: #CC0000 (rojo acento) / #1a1a1a (negro)
   ===================================================== */

/* ─── Reset y base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Utilidades ─── */
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }


/* ═══════════════════════════════════════════════════
   1. HERO / BUSCADOR
   ═══════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════
   1. HERO / BUSCADOR — Banner como fondo
   ═══════════════════════════════════════════════════ */
   .hero-search {
    position: relative;
    background-image: url('/assets/img/banner.jpeg');
    background-size: cover;
    background-position: center center;
    padding: 130px 0 80px;
    overflow: hidden;
}

/* Overlay oscuro para legibilidad */
.hero-search::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 10, 0.82) 0%,
        rgba(20, 20, 20, 0.70) 60%,
        rgba(30, 10, 10, 0.60) 100%
    );
    z-index: 0;
}

.hero-search__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.hero-search__text h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 14px;
}

.hero-search__text h1 span {
    color: #ff4444;
}

.hero-search__text p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.80);
    max-width: 560px;
}

/* ─── Tarjeta de búsqueda ─── */
.search-card {
    background: #fff;
    border-radius: 14px;
    padding: 32px 36px 28px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.search-card .search-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1fr 1.6fr auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 0;
}

.search-card .search-item label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 7px;
}

.search-card select,
.search-card input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-size: 0.88rem;
    color: #1a1a1a;
    background: #fafafa;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.search-card select:focus,
.search-card input[type="number"]:focus {
    outline: none;
    border-color: #CC0000;
    background: #fff;
}

.search-card .search-price .price-inputs {
    display: flex;
    gap: 6px;
    align-items: center;
}

.search-card .price-currency select {
    width: 72px;
}

.search-card .btn-search {
    width: 100%;
    background: #CC0000;
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 7px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.search-card .btn-search:hover {
    background: #a80000;
    transform: translateY(-1px);
}

.search-card .advanced-search-toggle {
    margin-top: 16px;
    font-size: 0.82rem;
}

.search-card .advanced-search-toggle a {
    color: #888;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.search-card .advanced-search-toggle a:hover { color: #CC0000; }

.advanced-search {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.advanced-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.search-item-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    color: #444;
}

.search-item-check input[type="checkbox"] {
    accent-color: #CC0000;
    width: 15px;
    height: 15px;
}


/* ═══════════════════════════════════════════════════
   2. BANDA DE ESTADÍSTICAS
   ═══════════════════════════════════════════════════ */
.stats-strip {
    background: #1a1a1a;
    padding: 28px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-block {
    display: flex;
    align-items: center;
    gap: 18px;
}

.stat-icon {
    font-size: 2rem;
    color: #CC0000;
    line-height: 1;
}

.stat-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.stat-lbl {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: rgba(255, 255, 255, 0.5);
}




/* ═══════════════════════════════════════════════════
   4. PROPIEDADES DESTACADAS
   ═══════════════════════════════════════════════════ */
.featured-properties {
    padding: 80px 0 90px;
    background: #f7f7f8;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: #1a1a1a;
}

.section-title::after {
    content: '';
    display: block;
    width: 44px;
    height: 3px;
    background: #CC0000;
    margin-top: 10px;
    border-radius: 2px;
}

.btn-all {
    font-size: 0.88rem;
    font-weight: 700;
    color: #CC0000;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1.5px solid transparent;
    transition: border-color 0.2s;
    white-space: nowrap;
}

.btn-all:hover { border-color: #CC0000; }


/* ─── Grid de tarjetas ─── */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.property-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    border: 1px solid #ececec;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.property-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.13);
}

.property-image {
    position: relative;
    overflow: hidden;
    height: 210px;
    background: #e0e0e0;
}

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

.property-card:hover .property-image img {
    transform: scale(1.06);
}

/* Badges de tipo de operación */
.property-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    color: #fff;
}

.property-badge-venta        { background: #CC0000; }
.property-badge-alquiler     { background: #1a1a1a; }
.property-badge-alquiler_temporal { background: #6c40b5; }
.property-badge-reservado    { background: #d97706; }
.property-badge-venta_pozo   { background: #0d6efd; }
.property-badge-venta_construccion { background: #0891b2; }
.property-badge-venta_inmediata { background: #059669; }
.property-badge-venta_renta  { background: #7c3aed; }

/* Contenido de la tarjeta */
.property-details {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.97rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-location {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-location i { color: #CC0000; font-size: 0.75rem; }

.property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 14px;
    font-size: 0.8rem;
    color: #555;
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-features i { color: #CC0000; font-size: 0.72rem; }

.property-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-top: auto;
    margin-bottom: 14px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.btn-view-property {
    display: block;
    text-align: center;
    background: #CC0000;
    color: #fff;
    padding: 11px;
    border-radius: 7px;
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: background 0.2s, transform 0.15s;
}

.btn-view-property:hover {
    background: #a80000;
    transform: translateY(-1px);
}

.view-all {
    text-align: center;
    margin-top: 50px;
}

.btn-view-all {
    display: inline-block;
    border: 2px solid #CC0000;
    color: #CC0000;
    padding: 13px 36px;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.2s;
}

.btn-view-all:hover {
    background: #CC0000;
    color: #fff;
}


/* ═══════════════════════════════════════════════════
   LEGACY — clases del hero anterior (mantenidas para
   compatibilidad con otras páginas que las usen)
   ═══════════════════════════════════════════════════ */
.hero {
    position: relative;
    background: #1a1a1a;
    color: #fff;
    overflow: hidden;
    padding: 110px 0 64px;
}

.hero .container { max-width: 1200px; margin-top: 0; }

.counter-stats {
    display: flex;
    justify-content: center;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 28px 36px;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

.counter-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    text-align: left;
}

.counter-icon { font-size: 1.8rem; color: #CC0000; }
.counter-number { font-family: 'Montserrat', sans-serif; font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1; }
.counter-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.5); }

.banner-placeholder { display: none; }


/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .search-card .search-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .search-card .search-item.search-button {
        grid-column: 1 / -1;
    }

    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-search { padding: 90px 0 48px; }

    .hero-search__text h1 { font-size: 1.7rem; }

    .search-card { padding: 22px 18px 20px; }

    .search-card .search-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .search-card .search-item.search-price {
        grid-column: 1 / -1;
    }

    .search-card .search-item.search-button {
        grid-column: 1 / -1;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 32px;
    }

    .properties-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .featured-properties { padding: 52px 0 60px; }

    .stats-strip { padding: 22px 16px; }
    .stat-num { font-size: 2.2rem; }
}

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

    .hero-search__text h1 { font-size: 1.5rem; }

    .section-title { font-size: 1.5rem; }
}
