/* ==========================================================================
   ACTAROO - Paginas publicas con cabecera y pie (noticias, articulos, legales...)
   Mismo sistema que la portada: crema #FEF8E9, marron #1A1109, verde azulado #42757E,
   DM Sans alojada, botones en pildora, tarjetas de 24px, sin lineas finas ni sombras.
   ========================================================================== */

@font-face { font-family: "DM Sans"; font-weight: 400; font-style: normal; font-display: swap;
    src: url("../fonts/dm-sans-latin-400.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-style: normal; font-display: swap;
    src: url("../fonts/dm-sans-latin-500.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-style: normal; font-display: swap;
    src: url("../fonts/dm-sans-latin-700.woff2") format("woff2"); }

:root {
    --cream: #fef8e9;
    --sand: #f5edd6;
    --sand-2: #ebe0c2;
    --ink: #1a1109;
    --ink-soft: #3a2f24;
    --teal: #42757e;
    --teal-dark: #2f5960;
    --teal-deep: #274a50;
    --teal-tint: #e3eeef;
    --white: #ffffff;
    --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --r: 24px;
    --frame: 32px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--cream); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.6;
    -webkit-font-smoothing: antialiased; min-height: 100svh; display: flex; flex-direction: column; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--frame); }
main { flex: 1; }

/* ---------- Botones ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px; border: 0; border-radius: 999px;
    background: var(--teal); color: var(--white); font: inherit; font-size: 1.1rem; font-weight: 700; text-decoration: none;
    text-align: center; cursor: pointer; transition: background .18s, transform .18s; }
.btn:hover { background: var(--teal-dark); transform: translateY(-2px); }
.btn-small { padding: 10px 22px; font-size: 1.02rem; white-space: nowrap; }
.btn-soft { background: var(--sand); color: var(--ink); }
.btn-soft:hover { background: var(--sand-2); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: var(--white); }

/* ---------- Cabecera ---------- */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 88px; }
.nav-logo img { height: 56px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { font-size: 1.05rem; font-weight: 500; text-decoration: none; padding: 6px 0; }
.nav-links a:not(.btn):hover { color: var(--teal-dark); }
.nav-links a[aria-current="page"] { font-weight: 700; color: var(--teal-dark); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }

/* ---------- Cabecera de pagina ---------- */

.page-head { padding: 40px 0 36px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; }
.page-head .lead { margin-top: 14px; max-width: 40rem; font-size: 1.25rem; line-height: 1.5; color: var(--ink-soft); }

/* ---------- Listado de noticias ---------- */

.noticias-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding-bottom: 80px; }
.noticia-card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--r); overflow: hidden;
    text-decoration: none; color: inherit; transition: transform .2s; }
.noticia-card:hover { transform: translateY(-4px); }
.noticia-img { aspect-ratio: 1200 / 630; background-color: var(--teal-tint); background-size: cover; background-position: center; }
.noticia-img-placeholder { background-image: none; }
.noticia-body { display: flex; flex: 1; flex-direction: column; padding: 24px 26px 28px; }
.noticia-fecha { align-self: flex-start; padding: 4px 14px; border-radius: 999px; background: var(--teal-tint); color: var(--teal-dark); font-size: .9rem; font-weight: 700; }
.noticia-titulo { margin-top: 14px; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.noticia-extracto { margin-top: 10px; font-size: 1rem; line-height: 1.55; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.noticia-leer { align-self: flex-start; margin-top: auto; padding-top: 18px; font-weight: 700; color: var(--teal-dark); }
.noticia-leer::after { content: " \2192"; }
.noticia-card:hover .noticia-leer { text-decoration: underline; text-underline-offset: 4px; }
.noticias-vacio { padding: 40px 0 100px; font-size: 1.2rem; color: var(--ink-soft); }

/* ---------- Articulo ---------- */

.articulo { max-width: 780px; margin: 0 auto; padding: 8px var(--frame) 80px; }
.volver { display: inline-flex; padding: 9px 20px; border-radius: 999px; background: var(--sand); color: var(--ink); font-weight: 700; font-size: 1rem; text-decoration: none; transition: background .18s; }
.volver:hover { background: var(--sand-2); }
.articulo .fecha { display: inline-block; margin-top: 30px; padding: 4px 14px; border-radius: 999px; background: var(--teal-tint); color: var(--teal-dark); font-size: .92rem; font-weight: 700; }
.articulo h1 { margin-top: 16px; font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
.articulo .extracto { margin-top: 18px; font-size: 1.3rem; line-height: 1.5; color: var(--ink-soft); }
.articulo .portada { margin-top: 32px; border-radius: var(--r); overflow: hidden; }
.articulo .portada img { width: 100%; }

.noticia-contenido { margin-top: 36px; font-size: 1.12rem; line-height: 1.8; color: var(--ink); }
.noticia-contenido > * + * { margin-top: 1.1em; }
.noticia-contenido h2, .noticia-contenido h3 { margin-top: 1.8em; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.noticia-contenido h4 { margin-top: 1.5em; font-size: 1.15rem; font-weight: 700; }
.noticia-contenido ul, .noticia-contenido ol { padding-left: 1.4em; }
.noticia-contenido li + li { margin-top: .4em; }
.noticia-contenido a { color: var(--teal-dark); font-weight: 700; text-underline-offset: 3px; }
.noticia-contenido a:hover { color: var(--ink); }
.noticia-contenido blockquote { padding: 18px 24px; border-radius: 18px; background: var(--sand); }
.noticia-contenido img { border-radius: 18px; }

.autor { display: flex; align-items: center; gap: 18px; margin-top: 48px; padding: 22px 26px; border-radius: var(--r); background: var(--sand); }
.autor .iniciales { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--teal); color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; }
.autor strong { display: block; font-size: 1.05rem; }
.autor span { display: block; font-size: .95rem; line-height: 1.45; color: var(--ink-soft); }

.articulo-cta { margin-top: 28px; padding: 40px 32px; border-radius: var(--r); background: var(--teal-deep); color: var(--cream); text-align: center; }
.articulo-cta h2 { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.articulo-cta p { margin: 10px 0 24px; font-size: 1.1rem; opacity: .9; }

.no-encontrada { padding: 40px 0 100px; }
.no-encontrada h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; }
.no-encontrada p { margin: 12px 0 26px; font-size: 1.15rem; color: var(--ink-soft); }

/* ---------- Pie ---------- */

.site-footer { background: var(--teal-deep); color: var(--cream); padding: 44px 0 34px; font-size: 1rem; }
.pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px; }
.pie img { width: 170px; height: auto; }
.pie-enlaces { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.pie-enlaces a { text-decoration: none; font-weight: 500; }
.pie-enlaces a:hover { text-decoration: underline; text-underline-offset: 4px; }
.pie-nota { margin-top: 26px; font-size: .95rem; color: #cfe0e2; }
.pie-nota a { color: var(--white); font-weight: 700; text-underline-offset: 3px; }

/* ---------- Pantallas pequenas ---------- */

@media (max-width: 960px) {
    .noticias-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-links a:not(.btn):not(.nav-inicio) { display: none; }
}
@media (max-width: 600px) {
    :root { --frame: 18px; }
    body { font-size: 17px; }
    .nav { height: 72px; }
    .nav-logo img { height: 44px; }
    .nav-links { gap: 14px; }
    .noticias-grid { grid-template-columns: 1fr; gap: 22px; padding-bottom: 56px; }
    .page-head { padding: 24px 0 24px; }
    .page-head .lead { font-size: 1.12rem; }
    .articulo { padding-bottom: 56px; }
    .articulo .extracto { font-size: 1.15rem; }
    .noticia-contenido { font-size: 1.05rem; }
    .autor { flex-direction: column; align-items: flex-start; }
    .articulo-cta { padding: 32px 22px; }
    .pie { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) { .nav-extra { display: none; } }
.articulo .portada { aspect-ratio: 1200 / 630; background: var(--teal-tint); }
.articulo .portada img { height: 100%; object-fit: cover; }
.noticia-contenido img { height: auto; }
.nav-extra { white-space: pre; }
/* Botones que los articulos antiguos llevan con estilo en linea: se adaptan a la marca */
.noticia-contenido a[style*="inline-block"] { background: var(--teal) !important; color: var(--white) !important; border-radius: 999px !important; padding: 14px 30px !important; font-weight: 700; text-decoration: none; }
.noticia-contenido a[style*="inline-block"]:hover { background: var(--teal-dark) !important; }

/* ---------- Paginas legales (aviso legal, terminos, privacidad) ---------- */

.legal { max-width: 860px; margin: 0 auto; padding: 24px var(--frame) 80px; }
.legal .page-title { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; }
.legal .page-subtitle { margin: 12px 0 32px; font-size: 1.25rem; line-height: 1.5; color: var(--ink-soft); }
.legal .content-section { margin-bottom: 20px; padding: 32px 36px; border-radius: var(--r); background: var(--white); }
.legal h2 { margin-bottom: 14px; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.legal h3 { margin: 22px 0 8px; font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.legal p { font-size: 1.05rem; line-height: 1.75; }
.legal p + p, .legal p + ul, .legal ul + p, .legal p + ol, .legal ol + p { margin-top: 12px; }
.legal ul, .legal ol { padding-left: 1.4em; font-size: 1.05rem; line-height: 1.75; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--teal-dark); font-weight: 700; text-underline-offset: 3px; }
.legal a:hover { color: var(--ink); }
.legal .contact-info { padding: 22px 26px; border-radius: 18px; background: var(--teal-tint); }
.legal .contact-info p + p { margin-top: 6px; }
.legal .highlight { margin-top: 8px; padding: 26px 30px; border-radius: var(--r); background: var(--sand); }
.legal .highlight p + p { margin-top: 8px; }
.tabla-scroll { overflow-x: auto; border-radius: 18px; background: var(--cream); }
.privacy-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.privacy-table th { padding: 14px 18px; background: var(--teal-deep); color: var(--cream); text-align: left; font-weight: 700; white-space: nowrap; }
.privacy-table td { padding: 14px 18px; vertical-align: top; line-height: 1.5; }
.privacy-table tbody tr:nth-child(even) td { background: var(--sand); }

@media (max-width: 600px) {
    .legal { padding-bottom: 56px; }
    .legal .content-section { padding: 24px 20px; }
    .legal .page-subtitle { font-size: 1.12rem; }
    .privacy-table th, .privacy-table td { padding: 12px 14px; font-size: .95rem; }
}
