/* ========================================
   ESTILOS PÁGINA SEO - CASAS EN VENTA
   Colores Viive: #667eea (principal), #764ba2 (secundario), #ffd700 (destacado)
   ======================================== */

/* RESET Y CONFIGURACIÓN BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* ========================================
   HEADER
   ======================================== */
.encabezado-seo {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.contenedor-header {
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-img {
    width: 117px;
    height: 56px;
    display: block;
}

.logo-seo a {
    text-decoration: none;
    color: #667eea;
}

.menu-seo {
    display: flex;
    gap: 30px;
    align-items: center;
}

.enlace-nav {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 25px;
}

.enlace-nav:hover {
    background-color: #f0f0f0;
    color: #667eea;
}

/* DROPDOWN HERRAMIENTAS */
.dropdown-herramientas {
    position: relative;
}

.btn-herramientas {
    background: transparent;
    border: none;
    font: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.menu-desplegable-herramientas {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 10px 0;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-herramientas:hover .menu-desplegable-herramientas {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.item-herramienta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.item-herramienta:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.menu-hamburguesa {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.linea-hamburguesa {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ========================================
   HERO SECTION (titulo atractivo, breve)
   ======================================== */
.hero-seo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 20px;
    text-align: center;
}

.contenedor-hero {
    max-width: 900px;
    margin: 0 auto;
}

.titulo-hero {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.subtitulo-hero {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 520px;
    margin: 0 auto;
}

/* ========================================
   CONTENIDO SEO (compacto, colapsable)
   ======================================== */
.contenido-seo {
    padding: 2rem 20px;
    background: #f0f4f8;
}

.contenido-seo-compacto .contenedor-contenido {
    max-width: 900px;
    margin: 0 auto;
}

.btn-desplegar-seo {
    width: 100%;
    padding: 1rem 1.25rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-desplegar-seo:hover {
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.articulo-seo-colapsado {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.articulo-seo-colapsado.articulo-seo-visible {
    max-height: 2000px;
}

.articulo-seo {
    line-height: 1.8;
    padding-top: 1rem;
}

.contenido-articulo h2 {
    font-size: 1.35rem;
    color: #667eea;
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
}

.contenido-articulo h3 {
    font-size: 1.15rem;
    color: #333;
    margin: 1rem 0 0.5rem;
    font-weight: 600;
}

.contenido-articulo p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.contenido-articulo ul,
.contenido-articulo ol {
    margin: 15px 0 15px 30px;
    color: #666;
}

.contenido-articulo li {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.contenido-articulo strong {
    color: #667eea;
    font-weight: 600;
}

/* ========================================
   PROPIEDADES PREVIEW (protagonista)
   ======================================== */
.propiedades-preview {
    padding: 2.5rem 20px 3rem;
    background: white;
}

.contenedor-propiedades {
    max-width: 1200px;
    margin: 0 auto;
}

.titulo-seccion {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #1a202c;
    text-align: center;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.subtitulo-seccion {
    font-size: 1rem;
    color: #718096;
    text-align: center;
    margin-bottom: 1.75rem;
}

.grid-propiedades {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    min-height: 320px;
}

.tarjeta-propiedad {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta-propiedad:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.imagen-propiedad {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: relative;
    overflow: hidden;
}

.imagen-propiedad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-nuevo {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ffd700;
    color: #333;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.id-inmueble-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.id-inmueble-ref {
    display: block;
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 4px;
}

.info-propiedad {
    padding: 20px;
}

.titulo-propiedad {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.precio-propiedad {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: 700;
    margin-bottom: 15px;
}

.detalles-propiedad {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.detalle-item {
    color: #666;
    font-size: 0.95rem;
}

.ubicacion-propiedad {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.boton-ver-detalle {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.boton-ver-detalle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cargando-propiedades {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #667eea;
}

.cargando-propiedades i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.boton-ver-todos {
    text-align: center;
    margin-top: 40px;
}

.btn-ver-todos {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-ver-todos:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ========================================
   CALL TO ACTION
   ======================================== */
.cta-seo {
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-align: center;
}

.contenedor-cta {
    max-width: 800px;
    margin: 0 auto;
}

.titulo-cta {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.texto-cta {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.btn-cta-principal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: #ffd700;
    color: #333;
    text-decoration: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cta-principal:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* ========================================
   FOOTER
   ======================================== */
.pie-pagina-seo {
    background: #1a202c;
    color: white;
    padding: 50px 20px 20px;
}

.contenedor-footer {
    max-width: 1200px;
    margin: 0 auto;
}

.info-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.logo-footer-img {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
}

.logo-footer p {
    color: #999;
    font-size: 0.95rem;
}

.contacto-footer h4,
.servicios-footer h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.contacto-footer p,
.servicios-footer p {
    color: #ccc;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.derechos-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #999;
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN
   Móvil: 0 - 440px  |  Tablet: 440px - 918px  |  Desktop: 918px en adelante
   ======================================== */

/* MÓVIL: 0 - 440px → menú hamburguesa */
@media screen and (max-width: 440px) {
    .contenedor-header {
        padding: 0 15px;
        height: 70px;
        position: relative;
    }

    .logo-img {
        width: 100px;
        height: 40px;
    }

    .menu-seo {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        gap: 15px;
        z-index: 200;
    }

    .menu-seo.activo {
        display: flex;
    }

    .menu-hamburguesa {
        display: flex !important;
    }

    .enlace-nav {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .hero-seo {
        padding: 2rem 15px;
    }

    .titulo-hero {
        font-size: 1.65rem;
    }

    .subtitulo-hero {
        font-size: 0.95rem;
    }

    .contenido-seo {
        padding: 1.5rem 15px;
    }

    .contenido-articulo h2 {
        font-size: 1.5rem;
    }

    .contenido-articulo h3 {
        font-size: 1.2rem;
    }

    .contenido-articulo p {
        font-size: 1rem;
    }

    .propiedades-preview {
        padding: 40px 15px;
    }

    .titulo-seccion {
        font-size: 1.8rem;
    }

    .subtitulo-seccion {
        font-size: 1rem;
    }

    .grid-propiedades {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cta-seo {
        padding: 40px 15px;
    }

    .titulo-cta {
        font-size: 1.8rem;
    }

    .texto-cta {
        font-size: 1rem;
    }

    .info-footer {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* TABLET: 440px - 918px → menú hamburguesa, grid 2 columnas */
@media screen and (min-width: 441px) and (max-width: 918px) {
    .contenedor-header {
        padding: 0 20px;
        height: 70px;
        position: relative;
    }

    .logo-img {
        width: 110px;
        height: 45px;
    }

    .menu-seo {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        gap: 15px;
        z-index: 200;
    }

    .menu-seo.activo {
        display: flex;
    }

    .menu-hamburguesa {
        display: flex !important;
    }

    .enlace-nav {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .hero-seo {
        padding: 2.5rem 20px;
    }

    .titulo-hero {
        font-size: 2rem;
    }

    .subtitulo-hero {
        font-size: 1rem;
    }

    .contenido-seo {
        padding: 2rem 20px;
    }

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

    .info-footer {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* DESKTOP: 918px en adelante → menú horizontal, sin hamburguesa */
@media screen and (min-width: 919px) {
    .menu-hamburguesa {
        display: none !important;
    }

    .menu-seo {
        display: flex;
    }
}


