/* ===== RESET Y ESTILOS BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #ffffff;
    color: #1e293b;
    line-height: 1.5;
    scroll-behavior: smooth;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER SUPERIOR ===== */
.top-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    border-bottom: 1px solid #eef2f6;
}

.logo h2 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: -0.5px;
    color: #1e293b;
}

.logo strong {
    font-weight: 700;
    color: #2c5f2d;
}

.main-nav {
    display: flex;
    gap: 2.5rem;
    font-weight: 500;
}

.main-nav a {
    text-decoration: none;
    color: #334155;
    font-size: 1rem;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #2c5f2d;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: #4b5563;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.social-icons a:hover {
    color: #2c5f2d;
}

.header-email {
    font-size: 0.9rem;
    color: #4b5563;
}

.header-email i {
    margin-right: 0.3rem;
    color: #2c5f2d;
}

/* ===== HERO CON IMAGEN FIJA (PARALLAX) ===== */
.hero {
    height: 90vh;
    min-height: 600px;
    background-image: url('../images/portada.webp');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -1px;
}

/* Capa oscura para mejorar legibilidad del texto */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 20, 10, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    width: 100%;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Buscador dentro del hero */
.search-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.8rem 2rem;
    border-radius: 80px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    border: 1px solid rgba(255,255,255,0.3);
}

.search-select {
    padding: 1rem 1.8rem;
    border-radius: 50px;
    border: 1px solid #d1d5db;
    background-color: white;
    font-size: 1rem;
    min-width: 180px;
    flex: 1 1 auto;
    cursor: pointer;
    color: #1e293b;
}

.search-select:focus {
    outline: none;
    border-color: #2c5f2d;
}

.search-btn {
    background-color: #2c5f2d;
    color: white;
    border: none;
    padding: 1rem 2.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    border: 1px solid #1f4a20;
}

.search-btn:hover {
    background-color: #1f4a20;
}

/* ===== SECCIONES GENERALES ===== */
.section {
    padding: 5rem 2rem;
}

.section-alt {
    background-color: #f9fcff;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 400;
    color: #0f172a;
}

.section-title span {
    font-weight: 600;
    color: #2c5f2d;
    border-bottom: 3px solid #d0e6d0;
    padding-bottom: 0.3rem;
}

/* ===== GRID DE PROPIEDADES ===== */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.property-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    transition: all 0.25s;
    border: 1px solid #ecfdf3;
    cursor: pointer;
}

.property-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 35px -12px rgba(44,95,45,0.15);
    border-color: #c0dbc1;
}

.property-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #d2e0eb;
}

.image-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #2c5f2d;
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.image-badge i {
    font-size: 0.7rem;
}

.property-content {
    padding: 1.2rem 1.2rem 1.5rem;
}

.property-type {
    display: inline-block;
    background: #ecfdf3;
    color: #2c5f2d;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.property-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #0f172a;
}

.property-location {
    color: #5f6b7a;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.property-location i {
    color: #2c5f2d;
}

.property-features {
    display: flex;
    gap: 0.8rem;
    margin: 0.8rem 0;
    flex-wrap: wrap;
}

.feature-item {
    background: #f1f5f9;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #334155;
}

.feature-item i {
    color: #2c5f2d;
}

.price-tag {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.3rem 0 0.5rem;
}

.price-tag small {
    font-size: 0.85rem;
    font-weight: 400;
    color: #64748b;
}

.operation-badge {
    display: inline-block;
    background: #2c5f2d;
    color: white;
    padding: 0.3rem 1.2rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
}

.operation-badge.renta {
    background-color: #b45309;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.details-link {
    color: #2c5f2d;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.details-link:hover {
    text-decoration: underline;
}

/* ===== ESTADOS DE CARGA Y ERROR ===== */
.loading, .no-results, .error {
    text-align: center;
    padding: 3rem;
    color: #64748b;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.loading i, .no-results i, .error i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.error {
    color: #b45309;
    background: #fff5f0;
    border-radius: 8px;
}

/* ===== FOOTER ===== */
.footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 3rem;
    text-align: center;
    border-top: 3px solid #2c5f2d;
}

.footer p {
    margin: 0.5rem 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav {
        gap: 1.5rem;
        justify-content: center;
    }
    
    .header-right {
        align-items: center;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .search-box {
        border-radius: 30px;
        padding: 1.5rem;
    }
    
    .search-select, .search-btn {
        width: 100%;
    }
    
    .section {
        padding: 3rem 1rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 500px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .main-nav {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .property-features {
        justify-content: center;
    }
}