/* =========================================
   LEGALES - HOJA DE ESTILOS
   ========================================= */

/* --- HERO SECTION --- */
.legales-hero {
    position: relative;
    height: 50vh; /* Altura fija como los otros heroes */
    min-height: 400px; /* Altura mínima para evitar que se aplaste */
    /* Imagen de fondo placeholder (cámbiala cuando quieras) */
    background-image: url('../images/blog/placeholder-1.jpg'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center; /* Centra el texto verticalmente */
    text-align: center;
    color: #ffffff;
}

/* Capa oscura superpuesta para que el texto se lea bien */
.legales-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Gradiente azul oscuro similar a las otras secciones */
    background: linear-gradient(180deg, rgba(21,35,58,70) 100%, rgba(21,35,58,0.9) 100%);
    z-index: 1;
}

/* Aseguramos que el contenido quede por encima de la capa oscura */
.legales-hero .contenedor {
    position: relative;
    z-index: 2;
}

.hero-text-center h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem; /* Un poco más grande en escritorio */
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-text-center p {
    font-size: 1.25rem;
    color: #e2e8f0; /* Color claro para mejor contraste */
    font-weight: 400;
    max-width: 600px; /* Evita que la línea se haga muy larga */
    margin: 0 auto;
}

/* --- NAVEGACIÓN DE PESTAÑAS (TABS) --- */
.tabs-navigation {
    background-color: #f1f5f9; /* Gris muy claro */
    border-bottom: 1px solid #e2e8f0;
    position: sticky; /* Opcional: Se pega al subir */
    top: 0; 
    z-index: 100;
}

.tabs-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
    flex-wrap: wrap; /* Para móviles */
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.8rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #187495;
    background-color: rgba(24, 116, 149, 0.05);
    border-radius: 8px 8px 0 0;
}

/* Estado Activo de la Pestaña */
.tab-btn.active {
    color: #15233A;
    border-bottom: 3px solid #187495;
}

/* --- CONTENIDO LEGAL --- */
.legales-content {
    padding: 4rem 0;
    background-color: #ffffff;
    min-height: 50vh;
}

/* Ocultar contenido por defecto */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

/* Mostrar solo el activo */
.tab-content.active {
    display: block;
}

/* Estilos del Documento de Texto */
.legal-document {
    max-width: 900px;
    margin: 0 auto;
    color: #334155;
}

.legal-document h2 {
    font-size: 2rem;
    color: #15233A;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1rem;
}

.last-update {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-style: italic;
}

.legal-document h3 {
    font-size: 1.3rem;
    color: #187495;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.legal-document p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.legal-document ul, 
.legal-document ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.legal-document li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.legal-divider {
    border: 0;
    height: 1px;
    background: #cbd5e1;
    margin: 3rem 0;
}

/* Animación de entrada suave */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .tabs-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .tab-btn.active {
        border-bottom: 3px solid #187495;
    }
}

/* --- RESPONSIVE DEL HERO --- */

/* Tablet (< 900px) */
@media (max-width: 900px) {
    .hero-text-center h1 {
        font-size: 2.5rem; /* Reducimos título */
    }
}

/* Móvil (< 480px) */
@media (max-width: 480px) {
    .legales-hero {
        height: 40vh; /* Un poco más bajo en celular */
        min-height: 350px;
    }
    
    .hero-text-center h1 {
        font-size: 1.8rem; /* Mucho más pequeño en celular */
    }

    .hero-text-center p {
        font-size: 1rem; /* Texto base más pequeño */
        padding: 0 1rem; /* Margen lateral de seguridad */
    }
}