/* =========================================
   1. ESTILOS GLOBALES Y COMPONENTES
   ========================================= */

/* Comportamiento de scroll suave para toda la web */
html {
    scroll-behavior: smooth;
}

/* Ocultar elementos visualmente pero dejarlos para SEO/Lectores */
.visually-hidden {
    position: absolute; 
    width: 1px; height: 1px; 
    margin: -1px; padding: 0; 
    overflow: hidden; 
    clip: rect(0, 0, 0, 0); border: 0;
}

/* --- LOGO TIPO MEDALLÓN (Home) --- */
.logo-medallon {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    padding: 25px;
    margin-bottom: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.logo-medallon:hover {
    transform: scale(1.05);
}

.logo-medallon img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: none;
}

/* Responsive del Medallón */
@media screen and (max-width: 980px) {
    .logo-medallon {
        width: 150px;
        height: 150px;
        padding: 20px;
        margin: 0 auto 2rem auto; 
    }
    .banner .content {
        text-align: center; 
    }
}

/* --- ALIADOS ESTRATÉGICOS --- */
.partners-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 2rem;
}

.partner-logo {
    max-width: 180px;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* --- WHATSAPP FLOTANTE --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF !important;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0,0,0,0.3);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    text-decoration: none;
    border-bottom: none;
}

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

@media screen and (max-width: 736px) {
    .logo-banner { max-width: 250px; }
    .whatsapp-float { bottom: 20px; right: 20px; width: 50px; height: 50px; font-size: 24px; }
}

/* --- MODALES (Popups) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: 5% auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border: 2px solid #fff;
    border-radius: 5px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}


/* =========================================
   2. ESTILOS ESPECÍFICOS DE LA HOME (Index)
   ========================================= */

/* Colores para Íconos de Propuesta */
.items.style1 .icon.style2 {
    filter: drop-shadow(0 0 5px currentColor); 
}

/* Viví tu Casa (Naranja) */
.items.style1 section:nth-child(1) .icon { color: #ff9f43 !important; }
/* Viví Tranquilo (Azul) */
.items.style1 section:nth-child(2) .icon { color: #2e86de !important; }
/* Viví tu Trabajo (Cyan) */
.items.style1 section:nth-child(3) .icon { color: #0abde3 !important; }
/* Viví Libre (Verde) */
.items.style1 section:nth-child(4) .icon { color: #1dd1a1 !important; }

/* Corrección de Logos de Barrios (Superposición) */
.spotlight .image {
    position: relative !important;
    display: block !important;
    overflow: hidden;
}

/* Foto de Fondo (Oscurecida) */
.spotlight .image img:not(.barrio-logo) {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    filter: brightness(0.6); 
    transition: filter 0.3s ease;
}

/* Logos Flotantes de Barrio */
img.barrio-logo {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 70% !important;      
    max-width: 350px !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 !important;
    z-index: 20;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}


/* =========================================
   3. ESTILOS ESPECÍFICOS DE LEGALES
   ========================================= */

/* Contenedor Principal Legales */
.legal-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem 0 2rem;
    background-color: #ffffff;
    color: #444444;
}

/* Cabecera Legal */
.legal-header {
    display: flex;
    justify-content: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}
.legal-header img { height: 60px; width: auto; }

/* Navegación Interna (Botones) */
.legal-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-anchor {
    background-color: #f5f5f5;
    color: #333;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.btn-anchor:hover {
    background-color: #fff;
    border-color: #25d366;
    color: #25d366;
}

/* Títulos Legales */
.section-title {
    font-size: 1.8rem;
    color: #000;
    margin-top: 0;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 3px solid #25d366;
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* Estilos de texto ESPECÍFICOS para dentro de .legal-wrapper 
   (Usamos el selector padre para no afectar la home) */
.legal-wrapper h3 {
    font-size: 1.1rem;
    margin-top: 2.5rem;
    color: #222;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legal-wrapper p {
    text-align: justify;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.legal-wrapper ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: #555;
    list-style: disc;
}

/* Botonera inferior */
.nav-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px dashed #ddd;
}

/* Separador */
hr.divider {
    border: 0;
    border-top: 4px solid #f0f0f0;
    margin: 5rem 0;
}