/* =========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    --bg: #FFFFFF;
    --dark: #0B1C30;
    --gold: #C5A059;
    --text: #333333;
    --light-grey: #F4F7F9;
    --serif: 'Playfair Display', serif;
    --sans: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--sans);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Contenedor General (Alineado a la izquierda) */
.container {
    max-width: 100%;
    margin-left: 0;
    margin-right: auto;
    padding-left: 5%;
    padding-right: 5%;
}

/* =========================================
   2. NAVEGACIÓN (NAVBAR)
   ========================================= */
.navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    z-index: 1001;
}

.brand-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

.logo-text span { color: var(--gold); font-weight: 400; }

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

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    margin-left: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-nav {
    border: 2px solid var(--dark);
    padding: 10px 20px;
    transition: 0.3s;
}

.btn-nav:hover {
    background: var(--dark);
    color: white !important;
}

/* Botón Menú Móvil (Oculto en Escritorio) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--dark);
    cursor: pointer;
    z-index: 1001;
}

/* =========================================
   3. HERO SECTION (BIENVENIDA)
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0.95) 40%, rgba(255,255,255,0.3) 100%), url('https://images.unsplash.com/photo-1505664194779-8beaceb93744?q=80&w=2070');
    background-size: cover;
    background-position: center right;
}

.hero h1 {
    font-family: var(--serif);
    font-size: 2.5rem;
    color: var(--dark);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero h1 span { color: var(--gold); }

.hero p {
    font-size: 1.25rem;
    color: #444;
    max-width: 520px;
    margin-bottom: 2.5rem;
}

.btn-text {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 4px;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
}

.btn-text:hover {
    color: var(--gold);
    transform: translateX(10px);
}

/* =========================================
   4. SECCIÓN DE SERVICIOS (TARJETAS)
   ========================================= */
.services-section {
    padding: 4rem 0;
    background: var(--light-grey);
}

.section-heading {
    font-family: var(--serif);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--dark);
}

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

.s-card {
    background: white;
    padding: 4rem 2.5rem;
    border: 1px solid #e1e1e1;
    transition: 0.4s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.s-card:hover {
    border-color: var(--gold);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.s-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.s-card h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.s-card p {
    font-size: 0.95rem;
    color: #666;
    margin-top: 10px;
}

/* =========================================
   5. PÁGINAS DE DETALLE (CABECERAS)
   ========================================= */
.service-detail-header {
    padding: 12rem 0 5rem 0;
    background-color: var(--light-grey);
    border-bottom: 1px solid #eee;
}

.service-detail-header h1 {
    font-family: var(--serif);
    font-size: 4rem;
    color: var(--dark);
    margin: 1rem 0;
}

.service-intro {
    max-width: 700px;
    font-size: 1.3rem;
    color: #666;
}

.service-content { padding: 5rem 0; }

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.main-text h2 {
    font-family: var(--serif);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.legal-list { list-style: none; margin-top: 2rem; }

.legal-list li {
    margin-bottom: 1.5rem;
    padding-left: 20px;
    border-left: 3px solid var(--gold);
}

.sidebar-box {
    background: var(--dark);
    color: white;
    padding: 3rem 2rem;
    position: sticky;
    top: 120px;
}

.sidebar-box h4 {
    font-family: var(--serif);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.sidebar-box p { font-size: 0.9rem; margin-bottom: 2rem; opacity: 0.8; }

.simple-footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #999;
}

/* =========================================
   6. CORRECCIÓN DE ENLACES (VITAL)
   ========================================= */
a, a:visited, a:active {
    text-decoration: none;
    color: inherit;
}

.nav-links a, .nav-links a:visited {
    color: var(--dark);
}

/* =========================================
   7. ESTILOS PÁGINA DERECHO CIVIL
   ========================================= */
.service-hero {
    padding: 6rem 0 2rem 0;
    background: linear-gradient(135deg, #112A46 0%, var(--dark) 100%);
    color: white;
    position: relative;
    border-bottom: 2px solid var(--gold);
}

.service-hero h1 {
  font-family: var(--serif);
    font-size: 4.5rem;
    line-height: 1.1;
    margin: 1.5rem 0;
}

.service-hero h1 span {
    font-weight: 300;
    font-style: italic;
    color: var(--gold);
}

.service-hero p {
    font-size: 1.3rem;
    max-width: 650px;
    opacity: 0.9;
}

.service-details {
    padding: 8rem 0;
    background: white;
}

.content-wrapper-flex {
    display: flex;
    gap: 5rem;
    align-items: flex-start;
}

.image-aside { flex: 1; position: sticky; top: 120px; }

.image-aside img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 20px 20px 0px var(--gold);
    margin-bottom: 2rem;
}

.legal-grid-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 4rem;
}

.legal-grid-items h3 {
    font-family: var(--serif);
    color: var(--dark);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gold);
    display: inline-block;
    padding-bottom: 5px;
}

.quote-box {
    padding: 2rem;
    background: var(--light-grey);
    border-left: 4px solid var(--gold);
    font-style: italic;
}

.cta-bottom {
    padding: 6rem 0;
    background: var(--light-grey);
    text-align: center;
}

.cta-bottom h2 {
    font-family: var(--serif);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* =========================================
   8. FOOTER PRINCIPAL (PIE DE PÁGINA)
   ========================================= */
.main-footer {
    background-color: var(--dark);
    color: white;
    padding-top: 5rem;
    border-top: 4px solid var(--gold);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.footer-col h4 span {
    color: white;
    font-weight: 300;
}

.footer-col p {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: white;
    opacity: 0.8;
    transition: 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--gold);
    opacity: 1;
    padding-left: 5px;
}

.footer-bottom {
    background-color: #07121f;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* =========================================
   9. CATÁLOGO INMOBILIARIO (BIENES RAÍCES)
   ========================================= */
.catalog-hero {
    padding: 9rem 0 3rem 0;
    background: var(--light-grey);
    text-align: center;
    border-bottom: 1px solid #eee;
}

.catalog-hero h1 {
    font-family: var(--serif);
    font-size: 3rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.catalog-hero h1 span {
    color: var(--gold);
    font-style: italic;
}

.catalog-section {
    padding: 4rem 0;
    background: white;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

.filters-sidebar {
    background: var(--light-grey);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
    position: sticky;
    top: 100px;
}

.filter-box {
    margin-bottom: 2rem;
}

.filter-box h3 {
    font-family: var(--sans);
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 5px;
    display: inline-block;
}

.filter-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--sans);
}

.checkbox-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: #555;
    cursor: pointer;
}

.price-inputs {
    display: flex;
    gap: 10px;
}

.btn-filter {
    width: 100%;
    padding: 12px;
    background: var(--dark);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-filter:hover {
    background: var(--gold);
}

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

.property-card {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--gold);
}

.card-image {
    position: relative;
    height: 200px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
}

.badge.rent { background: #28a745; }
.badge.sale { background: var(--dark); }

.card-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-info h4 {
    font-family: var(--serif);
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.location {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 1rem;
}

.features {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: auto;
    font-size: 0.85rem;
    color: #555;
}

/* =========================================
   10. ESTILOS PARA PÁGINAS DE DETALLES DE SERVICIOS
   ========================================= */
.service-detail-section {
    padding: 5rem 0;
    background-color: white;
}

.text-content {
    max-width: 800px;
    margin: 0 auto;
    color: #444;
    line-height: 1.8;
}

.text-content h2 {
    font-family: var(--serif);
    font-size: 2.2rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.text-content h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--gold);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.text-content p {
    margin-bottom: 1.5rem;
}

.service-list {
    list-style-type: none;
    padding-left: 0;
}

.service-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
}

.service-list li::before {
    content: "■";
    color: var(--gold);
    position: absolute;
    left: 0;
    font-size: 0.8rem;
    top: 5px;
}
/* =========================================
   ESTILOS DEL BOTÓN FLOTANTE DE WHATSAPP
   ========================================= */
.whatsapp-float {
    position: fixed; /* Lo despega del documento y lo ancla a la pantalla */
    bottom: 30px; /* Distancia desde abajo */
    right: 30px; /* Distancia desde la derecha */
    background-color: #25D366; /* Verde oficial de WhatsApp */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%; /* Lo hace un círculo perfecto */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); /* Sombra difuminada */
    z-index: 1000; /* Asegura que flote por encima de TODO */
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05); /* Lo hace saltar un poquito al pasar el ratón */
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* Ajuste para pantallas de celulares */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}
/* =========================================
   11. DISEÑO RESPONSIVE (MÓVILES Y TABLETS)
   ========================================= */

/* Tablets y pantallas medianas (< 992px) */
@media (max-width: 992px) {
    .menu-toggle {
        display: block; 
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 75%;
        background: white;
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0; 
    }

    .nav-links a {
        margin: 1.5rem 0;
        font-size: 1.2rem;
    }

    .content-wrapper-flex, .content-grid { 
        flex-direction: column; 
        grid-template-columns: 1fr;
    }

    .legal-grid-items { 
        grid-template-columns: 1fr; 
    }

    .service-hero h1 { 
        font-size: 3.5rem; 
    }

    .image-aside {
        position: relative;
        top: 0;
        width: 100%;
    }

    .catalog-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: relative;
        top: 0;
    }
}

/* Teléfonos móviles (< 768px) */
@media (max-width: 768px) {
    .hero {
        text-align: center;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        margin: 0 auto 2.5rem auto;
    }

    .service-detail-header h1 { 
        font-size: 2.5rem; 
    }

    .service-hero h1 {
        font-size: 2.5rem;
    }

    .section-heading {
        font-size: 2rem;
    }

    .grid-services {
        grid-template-columns: 1fr;
    }
}