/**
 * ==========================================================================
 * POLÍTICA DE PRIVACIDAD - ESTILOS ESPECÍFICOS (politica-privacidad.css)
 * ==========================================================================
 * Contiene los estilos de la sección de textos legales de privacidad.
 * Los estilos de Header, Footer y variables se importan de global.css.
 * INTEGRACIÓN DE ACCESIBILIDAD WCAG 2.2 AA (Navegación Teclado)
 * ==========================================================================
 */

/* ==========================================================================
 * MEJORAS DE ACCESIBILIDAD (WCAG 2.2 AA)
 * ========================================================================== */
:focus-visible {
    outline: 3px solid var(--color-verde-acento, #28CC43) !important;
    outline-offset: 4px !important;
    border-radius: inherit;
}

[data-theme="light"] :focus-visible {
    outline: 3px solid #000957 !important;
}

/* ==========================================================================
 * 1. ESTILOS BASE (Escritorio y compartidos)
 * ========================================================================== */

.legal-section {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
    min-height: 55vh;
}

.legal-box {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 60px;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    border-left: 4px solid var(--color-verde-acento, #28CC43);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

[data-theme="light"] .legal-box {
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

/* Títulos Principales y Subtítulos Centrales */
.main-legal-title {
    color: var(--color-verde-acento, #28CC43);
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-align: center;
}

/* Texto introductorio */
.legal-intro-text {
    font-size: 0.95rem;
    color: #ffffff;
    font-style: italic;
    margin: 0 auto 40px auto;
    max-width: 650px;
    line-height: 1.6;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
}

[data-theme="light"] .legal-intro-text {
    color: #000957;
    border-bottom: 1px solid rgba(0, 9, 87, 0.1);
}

/* Imagen superior - Ajustada para verse completa */
.legal-hero-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    border-radius: 8px;
    margin: 20px auto 40px auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

[data-theme="light"] .legal-hero-img {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.general-terms-subtitle {
    color: var(--color-verde-acento, #28CC43);
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    display: block;
}

[data-theme="light"] .general-terms-subtitle {
    color: #000957;
}

/* Párrafos y Secciones Numeradas */
.legal-clause {
    margin-bottom: 35px;
}

.legal-clause h3 {
    color: var(--color-verde-acento, #28CC43);
    font-size: 1.25rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.legal-clause p {
    color: var(--color-texto-claro, #ffffff);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

[data-theme="light"] .legal-clause p {
    color: #000957;
}

/* ==========================================================================
 * LISTAS Y VIÑETAS ALFABÉTICAS (FORZADAS PARA EVITAR CONFLICTOS CON GLOBAL)
 * ========================================================================== */
.legal-clause ol {
    list-style-type: lower-alpha !important; /* Fuerza las viñetas a, b, c... */
    padding-left: 35px !important; /* Espacio suficiente para que la letra no se esconda */
    margin-bottom: 20px;
}

.legal-clause ol li {
    display: list-item !important; /* Evita que global.css lo convierta en bloque sin viñeta */
    list-style-type: lower-alpha !important;
    color: var(--color-texto-claro, #ffffff);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 5px;
}

[data-theme="light"] .legal-clause ol li {
    color: #000957;
}

.legal-clause strong {
    color: #ffffff;
    font-weight: 700;
}

[data-theme="light"] .legal-clause strong {
    color: #000957;
}

/* Botón de volver al inicio */
.btn-return {
    display: inline-block;
    margin-top: 40px;
    border: 2px solid var(--color-verde-acento, #28CC43);
    padding: 12px 35px;
    font-weight: 700;
    color: var(--color-verde-acento, #28CC43);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-return:hover {
    background-color: var(--color-verde-acento, #28CC43);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(40, 204, 67, 0.4);
}

/* ==========================================================================
 * 2. DISEÑO RESPONSIVO (Móviles y Tablets)
 * ========================================================================== */
@media (max-width: 768px) {
    .legal-section {
        padding: 40px 15px;
    }

    .legal-box {
        padding: 30px 20px;
    }

    .main-legal-title {
        font-size: 2rem;
    }

    /* MODIFICACIÓN: Texto introductorio ahora justificado y con guiones */
    .legal-intro-text {
        font-size: 0.9rem;
        text-align: justify;
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
        word-break: break-word;
    }

    .general-terms-subtitle {
        font-size: 1.1rem;
    }

    .legal-clause h3 {
        font-size: 1.15rem;
    }

    /* MODIFICACIÓN: Cláusulas, párrafos y viñetas justificadas con guiones en móvil */
    .legal-clause p, .legal-clause ol li {
        font-size: 0.95rem;
        text-align: justify;
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
        word-break: break-word;
    }
}
