/* El Correo de Valdivia — páginas institucionales con diseño de diario
   (cabecera, menú y pie idénticos al tema de /leer) */

:root {
  --bg:          #ffffff;
  --surface2:    #f4f2f0;
  --ink:         #111111;
  --text2:       #3d3d3d;
  --muted:       #6b6b6b;
  --accent:      #7a1426;
  --accent-h:    #5a0e1c;
  --border:      #dcdcdc;
  --max:         1200px;
  --gap:         1.5rem;

  --serif-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --serif:         'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:          'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }

html { height: 100%; }

body {
  background:             var(--bg);
  color:                  var(--ink);
  font-family:            var(--sans);
  font-size:              16px;
  line-height:            1.55;
  -webkit-font-smoothing: antialiased;
  min-height:             100vh;
  display:                flex;
  flex-direction:         column;
}

/* ─── Barra superior ─────────────────────────────── */
.topbar { background: var(--ink); color: #e6e6e6; }

.topbar-inner {
  max-width:       var(--max);
  margin:          0 auto;
  padding:         .4rem var(--gap);
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  gap:             1rem;
  font-size:       .72rem;
}

.topbar-city {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight:    600;
  font-size:      .65rem;
}

/* ─── Mancheta ───────────────────────────────────── */
.site-header { background: var(--bg); border-bottom: 1px solid var(--border); }

.header-inner {
  max-width:  var(--max);
  margin:     0 auto;
  padding:    1.6rem var(--gap) 1.3rem;
  text-align: center;
}

.site-logo {
  display:        inline-flex;
  flex-direction: column;
  align-items:    center;
  gap:            .35rem;
}

.logo-name {
  font-family:    var(--serif-display);
  font-size:      clamp(2rem, 5.5vw, 3.6rem);
  font-weight:    900;
  line-height:    1;
  letter-spacing: -.5px;
  color:          var(--ink);
}

.logo-sub {
  font-size:      .68rem;
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: .22em;
  color:          var(--accent);
}

/* ─── Barra de secciones ─────────────────────────── */
.category-bar {
  background:    var(--bg);
  border-bottom: 3px solid var(--accent);
  position:      sticky;
  top:           0;
  z-index:       100;
}

.category-bar-inner {
  max-width:       var(--max);
  margin:          0 auto;
  padding:         0 var(--gap);
  display:         flex;
  justify-content: center;
  overflow-x:      auto;
  scrollbar-width: none;
}
.category-bar-inner::-webkit-scrollbar { display: none; }

.category-bar a {
  font-size:      .78rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color:          var(--ink);
  padding:        .8rem 1rem;
  white-space:    nowrap;
  transition:     color .15s, background .15s;
}

.category-bar a:hover { color: #fff; background: var(--accent); }

/* ─── Contenido ──────────────────────────────────── */
body.doc .page, body.doc .content {
  flex:      1;
  width:     100%;
  max-width: 760px;
  margin:    0 auto;
  padding:   2.5rem var(--gap) 4.5rem;
}

body.doc .badge, body.doc .content .badge {
  display:        inline-block;
  font-size:      .72rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color:          var(--accent);
  margin-bottom:  .5rem;
}

body.doc h1, body.doc .content h1 {
  font-family:    var(--serif-display);
  font-size:      clamp(2.1rem, 5vw, 3.1rem);
  font-weight:    800;
  line-height:    1.1;
  letter-spacing: -.4px;
  color:          var(--ink);
  margin-bottom:  1.1rem;
  padding-bottom: 1rem;
  border-bottom:  3px solid var(--ink);
}

body.doc .content .subtitle {
  font-family:   var(--serif);
  font-style:    italic;
  font-size:     .95rem;
  color:         var(--muted);
  margin:        -.4rem 0 2rem;
}

body.doc h2 {
  font-family:  var(--serif-display);
  font-size:    1.5rem;
  font-weight:  800;
  line-height:  1.2;
  color:        var(--ink);
  margin:       2.4rem 0 .7rem;
}

body.doc p {
  font-family:   var(--serif);
  font-size:     1.12rem;
  line-height:   1.7;
  color:         var(--ink);
  margin-bottom: 1.1rem;
}

body.doc p.intro { font-size: 1.22rem; color: var(--text2); }

body.doc p strong { color: var(--ink) !important; }

body.doc ul { list-style: none; margin: 0 0 1.5rem; }

body.doc ul li {
  font-family: var(--serif);
  font-size:   1.08rem;
  line-height: 1.6;
  color:       var(--ink);
  padding:     .55rem 0 .55rem 1.4rem;
  position:    relative;
  border-bottom: 1px solid var(--border);
}

body.doc ul li::before {
  content:    '';
  position:   absolute;
  left:       0;
  top:        1.05rem;
  width:      7px;
  height:     7px;
  background: var(--accent);
}

body.doc .divider { height: 1px; background: var(--border); margin: 2rem 0; }

body.doc .quote, body.doc .highlight {
  border-left: 4px solid var(--accent);
  padding:     .2rem 0 .2rem 1.4rem;
  margin:      2rem 0;
  font-family: var(--serif-display);
  font-style:  italic;
  font-size:   1.35rem;
  line-height: 1.4;
  color:       var(--ink);
}

body.doc .highlight {
  font-family: var(--serif);
  font-style:  normal;
  font-size:   1rem;
  background:  var(--surface2);
  padding:     1rem 1.2rem;
}

/* Bloques: sin cajas oscuras, separados por filetes */
body.doc .card, body.doc .info-block, body.doc .principle, body.doc .section {
  border-top: 1px solid var(--border);
  padding:    1.4rem 0 .4rem;
  margin:     .5rem 0 1.2rem;
}

body.doc .card h2, body.doc .principle h2, body.doc .section h2 { margin: 0 0 .6rem !important; font-size: 1.35rem; }

body.doc .section p, body.doc .card p { font-size: 1.05rem; }

body.doc .principle p, body.doc .section p:last-child, body.doc .card p:last-child { margin-bottom: 0; }

body.doc .num {
  font-family: var(--serif-display);
  font-size:   2rem;
  font-weight: 900;
  line-height: 1;
  color:       var(--accent);
  margin-bottom: .3rem;
}

/* Filas de datos (Quiénes somos) */
body.doc .info-row {
  display:     flex;
  gap:         1rem;
  padding:     .6rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  flex-wrap:   wrap;
}
body.doc .info-row:last-child { border-bottom: none; }

body.doc .info-label {
  font-size:      .7rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color:          var(--muted);
  min-width:      160px;
}

body.doc .info-value { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
body.doc .info-value a, body.doc p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
body.doc .info-value a:hover, body.doc p a:hover { color: var(--accent-h); }

/* Llamado a la acción */
body.doc .cta-box {
  text-align: center;
  padding:    2.2rem 1.5rem 2.4rem;
  background: var(--surface2);
  border-top: 4px solid var(--accent);
  margin:     3rem 0 0;
}

body.doc .cta-box h3 {
  font-family:   var(--serif-display);
  font-size:     1.7rem;
  font-weight:   800;
  color:         var(--ink);
  margin-bottom: .5rem;
}

body.doc .cta-box p { color: var(--text2); margin-bottom: 1.4rem; }

body.doc .cta-box a.btn {
  display:        inline-block;
  padding:        .85rem 2rem;
  background:     var(--accent);
  color:          #fff;
  font-size:      .85rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius:  2px;
  transition:     background .2s;
}
body.doc .cta-box a.btn:hover { background: var(--accent-h); }

/* ─── Pie ────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color:      #cfcfcf;
  border-top: 5px solid var(--accent);
  padding:    2.75rem var(--gap) 2.25rem;
  text-align: center;
}

.footer-top {
  max-width: var(--max);
  margin:    0 auto 1.4rem;
  display:   flex;
  justify-content: center;
}

.footer-top-links { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: center; }
.footer-top-links a { font-family: var(--serif-display); font-size: 1.15rem; font-weight: 700; color: #fff; }
.footer-top-links a:hover { color: #e4a3ae; }
.footer-top-sep { color: #555; }

.footer-divider { max-width: var(--max); margin: 0 auto 1.4rem; height: 1px; background: #333; }

.footer-tagline {
  font-family:   var(--serif-display);
  font-size:     1.6rem;
  font-weight:   900;
  color:         #fff;
  margin-bottom: 1rem;
}

.footer-links { display: flex; justify-content: center; gap: .3rem 1.2rem; flex-wrap: wrap; }
.footer-links a {
  font-size:      .72rem;
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color:          #a8a8a8;
}
.footer-links a:hover { color: #fff; }

.footer-legal {
  font-family: var(--sans);
  font-size:   .72rem;
  color:       #8a8a8a;
  margin:      1.2rem 0 0;
}

@media (max-width: 640px) {
  :root { --gap: 1rem; }
  .topbar-city { display: none; }
  .header-inner { padding: 1.1rem var(--gap) 1rem; }
  .logo-sub { font-size: .58rem; letter-spacing: .16em; }
  .category-bar-inner { justify-content: flex-start; }
  .category-bar a { padding: .7rem .75rem; font-size: .72rem; }
  body.doc .page, body.doc .content { padding: 1.75rem var(--gap) 3.5rem; }
  body.doc p { font-size: 1.05rem; }
  body.doc .info-label { min-width: 120px; }
}

/* Evitar doble filete tras un separador */
body.doc .divider + .card,
body.doc .divider + .principle,
body.doc .divider + .section,
body.doc .divider + .info-block { border-top: none; padding-top: 0; }
