/* ============================================================
   ESTILOLEGAL.CSS
   Estilos compartidos para páginas legales:
   aviso-legal.html, condiciones-uso.html,
   politica-cookies.html, politica-privacidad.html
   ============================================================ */

:root {
    --color-primary:   #0C4569;
    --color-white:     #ffffff;
    --color-text:      #333333;
    --color-light-bg:  #f8f9fa;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: hidden;
    width: 100%;
}

/* ── HEADER ─────────────────────────────────────────── */
.header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #094060 100%);
    padding: 12px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.header-left {
    color: var(--color-white);
    font-size: 0.9rem;
    white-space: nowrap;
}

.header-title {
    color: var(--color-white);
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

.header-back {
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-weight: 500;
}

.header-back:hover { opacity: 0.8; }

/* ── CONTENEDOR ─────────────────────────────────────── */
.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ── CENEFA DECORATIVA ──────────────────────────────── */
.cenefa {
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, #667eea 50%, var(--color-primary) 100%);
    margin: 25px 0;
    border-radius: 2px;
}

.last-update {
    color: #718096;
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 25px;
}

/* ── SECCIONES ──────────────────────────────────────── */
.section {
    background-color: var(--color-light-bg);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

h2 {
    color: var(--color-primary);
    font-size: 1.2rem;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 3px solid #667eea;
}

p {
    margin-bottom: 12px;
    text-align: justify;
    font-size: 0.95rem;
}

ul {
    margin: 12px 0;
    padding-left: 25px;
}

li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

strong { color: var(--color-primary); }

a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: bold;
}

a:hover { text-decoration: underline; }

/* ── FOOTER ─────────────────────────────────────────── */
footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    text-align: center;
    padding: 15px;
    margin-top: 40px;
    font-size: 0.85rem;
}

footer a {
    color: var(--color-white);
    margin: 0 8px;
    font-weight: 500;
}

footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {
    .header             { padding: 10px 15px; }
    .header-content     { flex-wrap: wrap; gap: 8px; }
    .header-left        { font-size: 0.85rem; }
    .header-title       { font-size: 1.1rem; text-align: left; flex-basis: 100%; }
    .header-back        { font-size: 0.85rem; }
    .container          { margin: 20px auto; }
    .section            { padding: 15px; }
}

/* ── ACCESIBILIDAD ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration:  0.01ms !important;
    }
}

/* ── IMPRESIÓN ──────────────────────────────────────── */
@media print {
    .header             { background: none; color: black; box-shadow: none; }
    .header-back        { display: none; }
    footer              { display: none; }
    .section            { box-shadow: none; border-left-color: #ccc; }
    body                { color: black; }
}
