/*
Theme Name: Podio
Theme URI: https://sociedad-estado.com.ar/
Description: Portada de deportes con tarjetas, al estilo de los agregadores modernos: fondo oscuro, tarjetas redondeadas, destacado grande y riel de titulares.
Version: 1.0
Author: Podio
Text Domain: sociedad
Tags: news, magazine, dark, sports
*/

:root {
  /* Fondo oscuro con un matiz frío, como el del agregador que tomamos de referencia. */
  --ground:    #1b1b1b;
  --surface:   #2b2b2b;
  --surface-2: #343434;
  --line:      rgba(255, 255, 255, .08);
  --line-2:    rgba(255, 255, 255, .16);

  --ink:       #f4f4f4;
  --ink-2:     #d0d0d0;
  --muted:     #9a9a9a;

  --accent:    #4cc2ff;
  --accent-2:  #2b9fdc;
  --live:      #e8484c;

  --radius:    8px;
  --radius-lg: 12px;

  --f-ui: "Segoe UI", "Segoe UI Midlevel", "Segoe WP", system-ui, -apple-system, Arial, sans-serif;

  --wrap: 1360px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: dark; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* En una sección con pocas notas el pie quedaba flotando a media pantalla. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
.site-foot { flex-shrink: 0; }

a { color: inherit; text-decoration: none; }
/* height:auto es imprescindible: WordPress escribe width y height en el <img>, y sin esto
   el atributo gana por encima de aspect-ratio y la foto sale estirada. */
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ===================== Cabecera ===================== */

.topbar { background: var(--ground); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 56px; }

/* Centrado, no por línea base: la línea base de una imagen es su borde inferior,
   así que con el logotipo cargado la bajada se caía al pie de la marca. */
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.mark {
  font-weight: 700; font-size: 20px; letter-spacing: -.4px; color: var(--ink);
  display: inline-flex; align-items: center; gap: 7px;
}
.mark i {
  font-style: normal; width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex; align-items: center; justify-content: center;
  color: #06212f; font-size: 13px; font-weight: 800;
}
.brand small { color: var(--muted); font-size: 12px; letter-spacing: .3px; line-height: 1; }
.brand .custom-logo { max-height: 30px; width: auto; }

.topsearch { flex: 1; max-width: 520px; margin: 0 auto; position: relative; }
.topsearch input {
  width: 100%; background: var(--surface); border: 1px solid transparent; color: var(--ink);
  border-radius: 999px; padding: 8px 16px 8px 38px; font-size: 14px;
}
.topsearch input::placeholder { color: var(--muted); }
.topsearch input:focus { border-color: var(--line-2); background: var(--surface-2); outline: none; }
.topsearch svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; fill: var(--muted); }

.topmeta { color: var(--muted); font-size: 13px; white-space: nowrap; flex-shrink: 0; }

/* ===================== Navegación de secciones ===================== */

.catnav { background: var(--ground); border-bottom: 1px solid var(--line); position: sticky; top: 56px; z-index: 55; }
.catnav .wrap { display: flex; align-items: center; gap: 6px; height: 46px; overflow-x: auto; scrollbar-width: none; }
.catnav .wrap::-webkit-scrollbar { display: none; }
.catnav ul { display: flex; align-items: center; gap: 6px; list-style: none; }
.catnav a {
  display: block; padding: 6px 14px; border-radius: 999px; font-size: 14px;
  color: var(--ink-2); white-space: nowrap; transition: background .12s, color .12s;
}
.catnav a:hover { background: var(--surface); color: var(--ink); }
.catnav .current a,
.catnav .current-menu-item > a,
.catnav .current-cat > a { background: var(--surface-2); color: var(--ink); font-weight: 600; }

/* ===================== Cinta de últimas ===================== */

.ticker { background: var(--surface); border-bottom: 1px solid var(--line); }
.ticker .wrap { display: flex; align-items: center; gap: 16px; height: 42px; overflow: hidden; }
.ticker .flag {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  background: var(--live); color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase; padding: 3px 9px; border-radius: 4px;
}
.ticker .flag b { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: se-pulse 1.6s ease-in-out infinite; }
@keyframes se-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.ticker .strip { flex: 1; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.ticker .track { display: flex; width: max-content; animation: se-marquee 90s linear infinite; }
.ticker .track a { margin-right: 44px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.ticker .track a:hover { color: var(--accent); }
.ticker .strip:hover .track { animation-play-state: paused; }
@keyframes se-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===================== Rejilla principal ===================== */

main { padding: 22px 0 40px; }


.lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 16px;
  margin-bottom: 34px;
}

/* Destacado grande */
.hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); min-height: 420px; display: block; }
.hero .txt .foot { padding-top: 10px; }
.hero .shot { position: absolute; inset: 0; }
.hero .shot img { width: 100%; height: 100%; object-fit: cover; }
.hero .veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.62) 34%, rgba(0,0,0,.05) 68%);
}
.hero .txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 28px; }
.hero h2 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.4px; margin: 10px 0 8px; text-wrap: balance; }
.hero p { color: #d8d8d8; font-size: 15px; max-width: 62ch; }
.hero:hover h2 { text-decoration: underline; text-underline-offset: 3px; }

/* Riel de titulares a la derecha.
   Las filas se reparten en partes iguales y el riel estira hasta la altura del destacado:
   con altura natural las tarjetas terminaban antes y quedaba un escalón en la rejilla. */
.rail { display: grid; grid-auto-rows: 1fr; gap: 12px; align-content: stretch; }
.rail .item {
  display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 12px;
  align-items: center;
  background: var(--surface); border-radius: var(--radius); padding: 13px 16px;
  transition: background .12s;
  min-height: 0;
}
.rail .item:hover { background: var(--surface-2); }
.rail .item h3 { font-size: 15px; line-height: 1.32; font-weight: 600; }
.rail .item .shot { width: 104px; height: 72px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.rail .item .shot img { width: 100%; height: 100%; object-fit: cover; }

/* Sello de sección */
.chip {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .7px;
  text-transform: uppercase; color: var(--accent);
}
.chip.solid { background: rgba(76,194,255,.14); padding: 3px 9px; border-radius: 4px; }

.byline { color: var(--muted); font-size: 12.5px; margin-top: 7px; }
.byline b { color: var(--ink-2); font-weight: 600; }

/* ===================== Encabezado de bloque ===================== */

.block-head { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.block-head h2 { font-size: 21px; font-weight: 700; letter-spacing: -.2px; }
.block-head .more { margin-left: auto; font-size: 13.5px; color: var(--accent); font-weight: 600; }
.block-head .more:hover { text-decoration: underline; }

/* ===================== Tarjetas ===================== */

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: background .12s, transform .12s;
  position: relative;
}
.card:hover { background: var(--surface-2); }
.card:hover h3 { text-decoration: underline; text-underline-offset: 2px; }

/* El enlace vive en el titular y se estira sobre toda la tarjeta: así la pieza entera
   sigue siendo pulsable sin envolver los botones de reacción dentro de un <a>. */
.cover { color: inherit; text-decoration: inherit; }
.cover::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* La firma y las reacciones comparten la última línea. */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.foot .byline { margin-top: 0; }
.card .react { margin-right: -6px; }
.card .shot { aspect-ratio: 16 / 9; background: var(--surface-2); position: relative; }
.card .shot img { width: 100%; height: 100%; object-fit: cover; }
.card .pad { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card h3 { font-size: 15.5px; line-height: 1.33; font-weight: 600; }
.card p { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* Marcador de imagen ausente */
.ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.14); font-size: 40px; }

.block { margin-bottom: 34px; }

/* ===================== Nota ===================== */

.article { max-width: 760px; margin: 0 auto; }
.article .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.article .crumbs a { color: var(--accent); }
.article h1 { font-size: 34px; line-height: 1.18; font-weight: 700; letter-spacing: -.5px; margin: 10px 0 12px; text-wrap: balance; }
.article .dek { font-size: 17.5px; color: var(--ink-2); line-height: 1.5; margin-bottom: 16px; }
.article .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.article .meta b { color: var(--ink-2); }
.article .meta .rt { background: var(--surface); border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.article .lead-shot { margin: 18px 0 8px; border-radius: var(--radius); overflow: hidden; }
/* Recorte fijo: si la foto original es más chica que el tamaño recortado, WordPress
   entrega la original y una vertical rompía toda la lectura. */
.article .lead-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article .credit { font-size: 12px; color: var(--muted); text-align: right; margin-bottom: 20px; }
.article .credit a { color: var(--muted); text-decoration: underline; }

.body { font-size: 17px; line-height: 1.68; color: var(--ink-2); }
.body p { margin-bottom: 17px; }
.body h2 { font-size: 22px; color: var(--ink); margin: 28px 0 11px; font-weight: 700; }
.body h3 { font-size: 18.5px; color: var(--ink); margin: 22px 0 9px; font-weight: 700; }
.body ul, .body ol { margin: 0 0 17px 22px; }
.body li { margin-bottom: 7px; }
.body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.body blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; margin: 0 0 17px; color: var(--ink); font-size: 18px; }
.body img, .body figure { border-radius: var(--radius); margin-bottom: 17px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.tags a { background: var(--surface); border-radius: 999px; padding: 5px 13px; font-size: 13px; color: var(--ink-2); }
.tags a:hover { background: var(--surface-2); color: var(--ink); }

.authorbox { display: flex; gap: 15px; background: var(--surface); border-radius: var(--radius); padding: 17px 19px; margin: 26px 0; }
.authorbox .av { width: 46px; height: 46px; border-radius: 50%; background: var(--surface-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px; color: var(--accent); }
.authorbox .kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.authorbox h4 { font-size: 16px; margin: 2px 0 5px; }
.authorbox p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.related { margin-top: 34px; }

/* ===================== Archivo ===================== */

.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.3px; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 70ch; font-size: 14.5px; }

.empty { background: var(--surface); border-radius: var(--radius); padding: 34px; color: var(--muted); }
.empty h2 { color: var(--ink); font-size: 19px; margin-bottom: 7px; }

.pager { display: flex; justify-content: center; margin: 30px 0 10px; }
.pager .nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.pager .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px;
  padding: 0 12px; border-radius: var(--radius); background: var(--surface); font-size: 14px; font-weight: 600;
}
.pager .page-numbers:hover { background: var(--surface-2); }
.pager .page-numbers.current { background: var(--accent); color: #06212f; }
.pager .page-numbers.dots { background: none; min-width: 20px; }

/* ===================== Pie ===================== */

.site-foot { border-top: 1px solid var(--line); background: #161616; margin-top: 20px; }
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding: 36px 0 28px; }
.site-foot .mark { font-size: 18px; }
.site-foot h5 { font-size: 13px; text-transform: uppercase; letter-spacing: .7px; color: var(--ink); margin-bottom: 12px; }
.site-foot ul { list-style: none; }
.site-foot li { padding: 4px 0; }
.site-foot a { color: var(--muted); font-size: 14px; }
.site-foot a:hover { color: var(--ink); }
.site-foot .about { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 46ch; margin-top: 11px; }
.site-foot .legal { border-top: 1px solid var(--line); padding: 16px 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.site-foot .copy { border-top: 1px solid var(--line); padding: 14px 0 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12.5px; }

/* ===================== Comentarios ===================== */

.comments { max-width: 760px; margin: 34px auto 0; border-top: 1px solid var(--line); padding-top: 20px; }
.comments h3 { font-size: 19px; margin-bottom: 14px; }
.comments ol { list-style: none; }
.comments .comment-body { border-bottom: 1px solid var(--line); padding: 13px 0; color: var(--ink-2); }
.comments input[type=text], .comments input[type=email], .comments input[type=url], .comments textarea {
  width: 100%; max-width: 540px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); border-radius: var(--radius); padding: 9px 12px;
}
.comments .submit { background: var(--accent); color: #06212f; border: 0; border-radius: var(--radius); padding: 10px 22px; font-weight: 700; cursor: pointer; }

/* ===================== Adaptación ===================== */

@media (max-width: 1180px) {
  .lead { grid-template-columns: 1fr; }
  .rail { grid-auto-rows: auto; grid-template-columns: repeat(3, 1fr); }
  .rail .item { grid-template-columns: minmax(0, 1fr) 88px; }
  .rail .item .shot { width: 88px; height: 62px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .grid, .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail { grid-auto-rows: auto; grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: 340px; }
  .hero h2 { font-size: 25px; }
  .article h1 { font-size: 28px; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .topbar .wrap { gap: 12px; }
  .topsearch, .topmeta { display: none; }
  .rail { grid-auto-rows: auto; grid-template-columns: 1fr; }
  .grid, .grid.three { grid-template-columns: 1fr; }
  .hero { min-height: 280px; }
  .hero .txt { padding: 18px 18px 20px; }
  .hero h2 { font-size: 21px; }
  .hero p { display: none; }
  .article h1 { font-size: 24px; }
  .body { font-size: 16.5px; }
  .site-foot .cols { grid-template-columns: 1fr; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker .flag b { animation: none; }
}
