/* ============================================
   LEGAL PAGES - Condiciones Generales
   ============================================ */

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #2d3748;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contenedor principal */
.legal-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* Tarjeta de contenido */
.legal-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 32px 28px;
    overflow: hidden;
}

/* ============================================
   HEADER
   ============================================ */
.legal-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 24px;
    margin-bottom: 32px;
}

.legal-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.last-update {
    color: #718096;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}

/* ============================================
   SECCIONES
   ============================================ */
.legal-section {
    margin-bottom: 36px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

/* Títulos principales (h2) */
.legal-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid #e2e8f0;
}

/* Subtítulos (h3) */
.legal-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-top: 24px;
    margin-bottom: 12px;
}

/* Sub-subtítulos (h4) */
.legal-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-top: 18px;
    margin-bottom: 10px;
}

/* Párrafos */
.legal-section p {
    font-size: 15px;
    color: #4a5568;
    margin-bottom: 14px;
}

/* Listas */
.legal-section ul {
    list-style: none;
    padding-left: 0;
    margin: 12px 0 16px;
}

.legal-section ul li {
    font-size: 15px;
    color: #4a5568;
    padding: 6px 0 6px 28px;
    position: relative;
    line-height: 1.6;
}

.legal-section ul li::before {
    content: "•";
    position: absolute;
    left: 6px;
    color: #2b6cb0;
    font-weight: 700;
    font-size: 18px;
}

/* Listas anidadas con estilo diferente */
.legal-section ul li ul {
    margin-top: 4px;
    margin-bottom: 4px;
}

.legal-section ul li ul li::before {
    content: "◦";
    color: #718096;
}

/* Texto en negrita dentro de listas */
.legal-section ul li strong {
    color: #2d3748;
    font-weight: 600;
}

/* Nota final */
.footer-note {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    font-size: 14px;
    color: #a0aec0;
    text-align: center;
}

/* ============================================
   RESPONSIVE - MÓVIL
   ============================================ */
@media (max-width: 640px) {
    .legal-container {
        padding: 12px 10px 30px;
    }

    .legal-content {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .legal-header h1 {
        font-size: 22px;
    }

    .legal-section h2 {
        font-size: 19px;
    }

    .legal-section h3 {
        font-size: 16px;
    }

    .legal-section h4 {
        font-size: 15px;
    }

    .legal-section p,
    .legal-section ul li {
        font-size: 14px;
    }

    .legal-section ul li {
        padding: 5px 0 5px 24px;
    }

    .last-update {
        font-size: 13px;
    }
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (min-width: 641px) and (max-width: 1024px) {
    .legal-container {
        padding: 30px 24px 50px;
    }

    .legal-content {
        padding: 36px 32px;
    }
}

/* ============================================
   RESPONSIVE - ESCRITORIO
   ============================================ */
@media (min-width: 1025px) {
    .legal-container {
        padding: 40px 20px 60px;
    }

    .legal-content {
        padding: 48px 44px;
    }

    .legal-header h1 {
        font-size: 32px;
    }

    .legal-section h2 {
        font-size: 24px;
    }

    .legal-section p,
    .legal-section ul li {
        font-size: 16px;
    }
}

/* ============================================
   MODO OSCURO (opcional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a202c;
        color: #e2e8f0;
    }

    .legal-content {
        background: #2d3748;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .legal-header {
        border-bottom-color: #4a5568;
    }

    .legal-header h1 {
        color: #f7fafc;
    }

    .last-update {
        color: #a0aec0;
    }

    .legal-section h2 {
        color: #f7fafc;
        border-bottom-color: #4a5568;
    }

    .legal-section h3,
    .legal-section h4 {
        color: #edf2f7;
    }

    .legal-section p,
    .legal-section ul li {
        color: #cbd5e0;
    }

    .legal-section ul li::before {
        color: #63b3ed;
    }

    .legal-section ul li strong {
        color: #edf2f7;
    }

    .footer-note {
        border-top-color: #4a5568;
        color: #718096;
    }
}

/* ============================================
   TABLA DE COOKIES
   ============================================ */
.table-responsive {
    overflow-x: auto;
    margin: 16px 0 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.cookie-table thead {
    background-color: #f7fafc;
}

.cookie-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
}

.cookie-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.cookie-table tbody tr:hover {
    background-color: #f7fafc;
}

.cookie-table tbody tr:last-child td {
    border-bottom: none;
}

/* Estilos para enlaces */
.legal-section a {
    color: #2b6cb0;
    text-decoration: none;
    word-break: break-all;
}

.legal-section a:hover {
    text-decoration: underline;
}

/* Modo oscuro para la tabla */
@media (prefers-color-scheme: dark) {
    .table-responsive {
        border-color: #4a5568;
    }

    .cookie-table thead {
        background-color: #1a202c;
    }

    .cookie-table th {
        color: #edf2f7;
        border-bottom-color: #4a5568;
    }

    .cookie-table td {
        color: #cbd5e0;
        border-bottom-color: #4a5568;
    }

    .cookie-table tbody tr:hover {
        background-color: #1a202c;
    }

    .legal-section a {
        color: #63b3ed;
    }
}
