/**
 * Instituto Francis - Estilos CSS Unificados
 * Archivo CSS compartido para las páginas legales y demo de cookies
 * 
 * Páginas que usan este archivo:
 * - informacion-legal.html
 * - politica-cookies.html
 * - cookie-banner-demo.html
 */

/* ========================================
   ESTILOS BASE
   ======================================== */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Body para páginas legales (informacion-legal.html, politica-cookies.html) */
body.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
}

/* Body para página demo (cookie-banner-demo.html) */
body.demo-page {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    min-height: 100vh;
}

/* ========================================
   CONTENEDORES
   ======================================== */

.container {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.demo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ========================================
   TIPOGRAFÍA - ENCABEZADOS
   ======================================== */

h1 {
    color: #8B0000;
    border-bottom: 3px solid #8B0000;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

h2 {
    color: #8B0000;
    margin-top: 30px;
    margin-bottom: 15px;
}

h3 {
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
}

h4 {
    margin: 0 0 12px 0;
    color: #2c2c2c;
    font-size: 18px;
}

/* ========================================
   TIPOGRAFÍA - TEXTO
   ======================================== */

p {
    margin-bottom: 15px;
}

/* Párrafos en páginas legales con texto justificado */
.container p {
    text-align: justify;
}

/* Párrafos en demo con alineación normal */
.demo-content p {
    line-height: 1.8;
    color: #555;
}

/* ========================================
   LISTAS
   ======================================== */

ul {
    margin-bottom: 15px;
    padding-left: 30px;
}

.demo-content ul {
    line-height: 1.8;
    color: #555;
}

li {
    margin-bottom: 8px;
}

.demo-content li {
    margin-bottom: 10px;
}

ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

/* ========================================
   TABLAS (para politica-cookies.html)
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

th {
    background-color: #8B0000;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background-color: #f5f5f5;
}

/* ========================================
   CAJAS DE INFORMACIÓN
   ======================================== */

/* Caja de resaltado amarilla */
.highlight,
.highlight-box {
    background-color: #fff3cd;
    padding: 15px;
    border-left: 4px solid #8B0000;
    margin: 20px 0;
}

.highlight-box {
    padding: 20px;
    border-radius: 4px;
}

.highlight-box strong {
    color: #8B0000;
}

/* Caja de información azul */
.info-box {
    background-color: #e7f3ff;
    padding: 15px;
    border-left: 4px solid #2196F3;
    margin: 20px 0;
}

.info-box {
    padding: 20px;
    border-radius: 4px;
}

/* ========================================
   ETIQUETAS DE TIPO DE COOKIE
   ======================================== */

.cookie-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 5px;
}

.cookie-necessary {
    background-color: #4CAF50;
    color: white;
}

.cookie-analytics {
    background-color: #2196F3;
    color: white;
}

.cookie-marketing {
    background-color: #FF9800;
    color: white;
}

/* ========================================
   FOOTER
   ======================================== */

.footer-note {
    font-size: 0.9em;
    color: #666;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.footer {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 14px;
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA DEMO
   ======================================== */

/* Header de la demo */
.demo-header {
    background: linear-gradient(135deg, #8B0000 0%, #a00000 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.3);
}

.demo-header h1 {
    margin: 0 0 16px 0;
    font-size: 42px;
    font-weight: 700;
    color: white;
    border-bottom: none;
    padding-bottom: 0;
}

.demo-header p {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
}

/* Contenido de la demo */
.demo-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.demo-content h2 {
    color: #8B0000;
    margin-top: 0;
    border-bottom: 3px solid #8B0000;
    padding-bottom: 12px;
}

.demo-content h3 {
    color: #555;
    margin-top: 30px;
}

/* ========================================
   BLOQUES DE CÓDIGO
   ======================================== */

code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.code-block {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-block code {
    color: #a6e22e;
    background: transparent;
    padding: 0;
}

/* ========================================
   BOTONES
   ======================================== */

.demo-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.demo-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.demo-btn-primary {
    background: linear-gradient(135deg, #8B0000 0%, #a00000 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.3);
}

.demo-btn-primary:hover {
    background: linear-gradient(135deg, #a00000 0%, #b00000 100%);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
    transform: translateY(-2px);
}

.demo-btn-secondary {
    background: white;
    color: #8B0000;
    border: 2px solid #8B0000;
}

.demo-btn-secondary:hover {
    background: #8B0000;
    color: white;
}

/* ========================================
   GRIDS Y TARJETAS
   ======================================== */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: #f9f9f9;
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid #8B0000;
}

.feature-card h4 {
    margin: 0 0 12px 0;
    color: #2c2c2c;
    font-size: 18px;
}

.feature-card p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* ========================================
   ENLACES
   ======================================== */

a {
    color: #8B0000;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #a00000;
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    body.legal-page {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    .demo-container {
        padding: 20px 10px;
    }

    .demo-header {
        padding: 40px 20px;
    }

    .demo-header h1 {
        font-size: 32px;
    }

    .demo-content {
        padding: 20px;
    }

    .demo-buttons {
        flex-direction: column;
    }

    .demo-btn {
        width: 100%;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .demo-header h1 {
        font-size: 28px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }
}

/* ========================================
   UTILIDADES
   ======================================== */

.text-center {
    text-align: center;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */

/* Mejora el contraste para lectores de pantalla */
strong {
    font-weight: 600;
}

/* Asegura que los enlaces sean claramente identificables */
a:focus {
    outline: 2px solid #8B0000;
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid #8B0000;
    outline-offset: 2px;
}
