/* =========================================
   1. VARIABLES Y RESET
   ========================================= */
:root { 
    --primary: #2c3e50; 
    --accent: #27ae60; 
    --light: #f4f7f6; 
    --white: #ffffff; 
    --text: #333;
    --gray: #7f8c8d;
    --shadow: 0 4px 15px rgba(0,0,0,0.1); 
    --sold: #e74c3c; /* Rojo para vendido */
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

body { 
    background-color: var(--light); 
    color: var(--text); 
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   2. NAVEGACIÓN (NAVBAR)
   ========================================= */
.navbar {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 1rem 5%; 
    background: var(--white); 
    box-shadow: var(--shadow);
    position: sticky; 
    top: 0; 
    z-index: 1000;
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    text-decoration: none; 
}

.logo-img { 
    height: 45px; 
    transition: transform 0.3s;
}

.logo-text { 
    font-size: 1.5rem; 
    font-weight: bold; 
    color: var(--primary); 
}

.logo-text span { 
    color: var(--accent); 
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 25px; 
    align-items: center; 
}

.nav-item { 
    text-decoration: none; 
    color: var(--primary); 
    font-weight: 500; 
    transition: 0.3s; 
}

.nav-item:hover { 
    color: var(--accent); 
}

/* Buscador en el Nav */
.search-container {
    display: flex;
    gap: 5px;
    background: #eee;
    padding: 5px 15px;
    border-radius: 30px;
    transition: 0.3s;
}

.search-container:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px var(--accent);
}

.search-bar {
    border: none;
    background: transparent;
    padding: 5px;
    outline: none;
    font-size: 0.9rem;
    width: 150px;
}

.search-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1rem;
}

/* Menú Móvil */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
}

@media (max-width: 900px) {
    .menu-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: white;
        width: 250px;
        height: calc(100vh - 70px);
        padding: 2rem;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: 0.4s;
    }
    .nav-links.nav-open { right: 0; }
    .search-container { order: -1; width: 100%; margin-bottom: 2rem; }
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-premium {
    height: 45vh; 
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
    url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1200');
    background-size: cover; 
    background-position: center;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    text-align: center;
}

.hero-title { font-size: 2.5rem; }
.hero-title span { color: var(--accent); }

/* =========================================
   4. CARDS DE PROPIEDADES
   ========================================= */
.container { 
    max-width: 1200px; 
    margin: 3rem auto; 
    padding: 0 20px; 
}

.section-title {
    margin-bottom: 2rem;
    color: var(--primary);
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 60px; height: 4px;
    background: var(--accent);
}

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 2.5rem; 
}

.property-card { 
    background: white; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: var(--shadow); 
    transition: 0.3s; 
}

.property-card:hover { 
    transform: translateY(-8px); 
}

.card-img-wrap { 
    height: 220px; 
    position: relative; 
    overflow: hidden;
}

.card-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 0.5s;
}

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

/* Badges (Etiquetas) */
.badge { 
    position: absolute; 
    top: 15px; left: 15px; 
    background: var(--accent); 
    color: white; 
    padding: 6px 15px; 
    border-radius: 5px; 
    font-weight: bold; 
    font-size: 0.75rem;
    z-index: 10;
}

.badge-sold {
    background: var(--sold) !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.sold-out .card-img {
    filter: grayscale(0.7);
}

.card-content { padding: 1.5rem; }
.card-price { 
    font-size: 1.5rem; 
    color: var(--accent); 
    font-weight: bold; 
    margin-bottom: 5px; 
}

.btn-card { 
    display: block; 
    background: var(--accent); 
    color: white; 
    text-align: center; 
    padding: 12px; 
    border-radius: 8px; 
    text-decoration: none; 
    margin-top: 15px; 
    font-weight: bold;
    transition: 0.3s;
}

.btn-card:hover { background: var(--primary); }

/* Animación de entrada de cards */
.animate-card {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    animation: fadeInCard 0.7s cubic-bezier(.23,1.01,.32,1) forwards;
}

@keyframes fadeInCard {
    to { opacity: 1; transform: none; }
}

/* =========================================
   5. DETALLE DE PROPIEDAD
   ========================================= */
.thumb-list img { 
    width: 80px; height: 60px; 
    object-fit: cover; 
    border-radius: 5px; 
    cursor: pointer; 
    border: 2px solid transparent; 
    transition: 0.3s;
}

.thumb-list img.active { border-color: var(--accent); opacity: 1; }

/* =========================================
   6. FOOTER
   ========================================= */
.footer-premium {
    background: var(--primary);
    color: #ecf0f1;
    padding: 4rem 0 1rem 0;
    margin-top: 5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-column h4 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column p, .footer-column ul li a {
    color: #bdc3c7;
    font-size: 0.95rem;
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
}

.social-links { display: flex; gap: 15px; margin-top: 20px; }

.social-links a {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: white; transition: 0.3s;
}

.social-links a:hover { background: var(--accent); transform: translateY(-3px); }

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #95a5a6;
    font-size: 0.85rem;
}

/* =========================================
   7. EXTRAS (BOTONES, MODALES)
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999;
    transition: 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover { transform: scale(1.1) rotate(10deg); }

/* Modal Admin Oculto */
#admin-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.btn-nav-admin {
    background: var(--primary); 
    color: white; 
    padding: 8px 18px;
    border-radius: 30px; 
    text-decoration: none; 
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

.btn-nav-admin:hover { 
    background: var(--accent); 
}

/* Responsivo para el footer */
@media (max-width: 768px) {
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
    .hero-title { font-size: 1.8rem; }
}
/*stilo de desarrollador*/
.link {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}
.link:hover {
    text-decoration: underline;
    color: var(--accent);
}
/* Fin estilo de desarrollador */