/**
 * Estilos de páginas legales (RGPD) — Club Deportivo Las Tinajas.
 * Se encola SOLO en: politica-de-privacidad, compromiso-con-la-proteccion-de-datos,
 * politica-de-cookies (ver functions.php → tinajas_legal_styles).
 * Alcance acotado a body.ct-pagina-legal para no afectar a otras páginas.
 *
 * Marca: títulos 'Playfair Display', cuerpo 'DM Sans'.
 * Colores: --tierra #1c1a14, --verde #2c3d2e, --dorado #c9a84c, --crema #f5f0e8.
 */

/* Ancho de lectura cómodo. max-width directo (plantilla clásica page-legal.php).
   La var FSE se mantiene como apoyo si la página aún se renderiza vía FSE
   (transición antes de asignar la plantilla "Legal / RGPD"). */
body.ct-pagina-legal {
    --wp--style--global--content-size: 760px;
}

/* ---- Cuerpo de texto ---- */
body.ct-pagina-legal .entry-content {
    max-width: 760px;
    margin: 0 auto;
    font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    color: #2a2620;
    font-size: 1.0625rem;
    line-height: 1.72;
    padding: 40px 24px 72px;
}
body.ct-pagina-legal .entry-content p {
    margin: 0 0 1.15em;
}

/* ---- Títulos ---- */
body.ct-pagina-legal .wp-block-post-title,
body.ct-pagina-legal .entry-content h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: #1c1a14;
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1.15;
    margin: 0 0 .7em;
    padding-bottom: .35em;
    border-bottom: 2px solid #c9a84c;
}
body.ct-pagina-legal .entry-content h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: #2c3d2e;
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
    line-height: 1.25;
    margin: 2.2em 0 .6em;
}
body.ct-pagina-legal .entry-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: #1c1a14;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    margin: 1.8em 0 .5em;
}
body.ct-pagina-legal .entry-content h4 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    color: #2c3d2e;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 1.6em 0 .5em;
}

/* ---- Enlaces en el texto (dorado oscurecido para contraste AA sobre blanco) ---- */
body.ct-pagina-legal .entry-content a {
    color: #8c6f24;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .2s;
}
body.ct-pagina-legal .entry-content a:hover,
body.ct-pagina-legal .entry-content a:focus {
    color: #c9a84c;
}

/* ---- Listas ---- */
body.ct-pagina-legal .entry-content ul,
body.ct-pagina-legal .entry-content ol {
    margin: 0 0 1.15em;
    padding-left: 1.5em;
}
body.ct-pagina-legal .entry-content li {
    margin: 0 0 .5em;
    line-height: 1.65;
}
body.ct-pagina-legal .entry-content ul {
    list-style: none;
    padding-left: 1.4em;
}
body.ct-pagina-legal .entry-content ul > li {
    position: relative;
}
body.ct-pagina-legal .entry-content ul > li::before {
    content: "";
    position: absolute;
    left: -1.1em;
    top: .62em;
    width: .42em;
    height: .42em;
    border-radius: 50%;
    background: #c9a84c;
}

/* ---- Tablas (info básica, casillas, cookies) ----
   Las celdas suelen traer estilos inline (border:1px solid #ccc), por eso
   algunas reglas usan !important: es la única forma de ganar a un style inline. */
body.ct-pagina-legal .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: .98rem;
    border: 1px solid rgba(28, 26, 20, .14) !important;
    border-radius: 8px;
    overflow: hidden;
}
body.ct-pagina-legal .entry-content thead th,
body.ct-pagina-legal .entry-content table th {
    background: rgba(201, 168, 76, .16);
    color: #1c1a14;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    text-align: left;
    padding: 12px 14px !important;
    border: 1px solid rgba(28, 26, 20, .14) !important;
    border-bottom: 2px solid #c9a84c !important;
}
body.ct-pagina-legal .entry-content table td {
    padding: 11px 14px !important;
    border: 1px solid rgba(28, 26, 20, .12) !important;
    vertical-align: top;
}
body.ct-pagina-legal .entry-content table tr:nth-child(even) td {
    background: rgba(245, 240, 232, .55);
}

/* Responsive: scroll horizontal en móvil sin romper el layout */
@media (max-width: 600px) {
    body.ct-pagina-legal .entry-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
