/* ============================================================
   Justicia de Paz · Catamarca — estilos compartidos del sitio
   Paleta azul marino + dorado, titulos en serif (Source Serif 4)
   y textos en Inter. Cada pagina suma solo lo propio.
   ============================================================ */

:root {
  --navy-950: #061226;
  --navy-900: #0a1b34;
  --navy-850: #0c2142;
  --navy-800: #102a4f;
  --navy-700: #16365f;
  --navy-600: #1f4a80;
  --gold: #d8b35e;
  --gold-light: #f2d592;
  --gold-dark: #b8913b;
  --ink: #10284a;
  --ink-soft: #4a5b73;
  --light-bg: #f3f6fa;
  --line-light: #e1e7ef;
  --text: #e6ecf5;
  --text-soft: #c3cfdf;
  --text-muted: #8fa2bd;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  /* Mismo tono con el que termina .page-main, para que en paginas cortas no quede una franja. */
  background: var(--navy-950);
  color: var(--text);
}

/* ── Header ───────────────────────────────────────── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 2000;
  background: linear-gradient(180deg, #081730 0%, var(--navy-900) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}

.top-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 28px;
}

.top-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  color: #ffffff;
}

.top-nav-logo {
  width: 62px;
  height: 62px;
  object-fit: contain;
  flex-shrink: 0;
}

.top-nav-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.top-nav-brand-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.top-nav-brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.top-nav-menu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.top-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: #d6e0ee;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.top-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, .06);
}

.top-nav-link.active {
  color: #ffffff;
  background: rgba(37, 99, 235, .22);
  border-color: rgba(96, 165, 250, .6);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .12);
}

.top-nav-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-nav-search {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .28);
  transition: background .18s ease, border-color .18s ease;
}

.top-nav-search:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .5);
}

.top-nav-internal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  color: #ffffff;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}

.top-nav-internal:hover,
.top-nav-internal.active {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(242, 213, 146, .6);
}

.top-nav-internal span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.top-nav-internal strong {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
}

.top-nav-internal small {
  font-size: 10.5px;
  color: #b7c5d9;
}

.top-nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

/* ── Antetitulo con linea dorada ──────────────────── */
.page-eyebrow,
.section-eyebrow,
.eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #dbe4f0;
}

.page-eyebrow::before,
.section-eyebrow::before,
.eyebrow-line::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

/* ── Encabezado de pagina ─────────────────────────── */
.page-hero {
  position: relative;
  padding: 46px 28px 40px;
  background:
    radial-gradient(900px 380px at 0% 0%, rgba(59, 110, 190, .22), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-850) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.page-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-hero-text {
  max-width: 780px;
}

.page-title {
  margin: 12px 0 12px;
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 600;
  line-height: 1.08;
  color: #ffffff;
}

.page-title em {
  font-style: normal;
  color: var(--gold-light);
}

.page-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-soft);
}

.page-hero-aside {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Contenido ────────────────────────────────────── */
.page-main {
  min-height: 45vh;
  padding: 40px 28px 72px;
  background:
    radial-gradient(900px 400px at 85% 0%, rgba(59, 110, 190, .12), transparent 55%),
    linear-gradient(180deg, var(--navy-850) 0%, var(--navy-950) 100%);
}

.page-container {
  max-width: 1240px;
  margin: 0 auto;
}

.page-section + .page-section {
  margin-top: 52px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.section-title {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  color: #ffffff;
}

/* ── Tarjetas (fondo oscuro) ──────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.cards-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 22px 24px 24px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 18px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 213, 146, .4);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .32);
}

.info-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.card-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.card-text--lead {
  color: var(--text-soft);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #93c5fd;
  background: rgba(59, 130, 246, .16);
  border: 1px solid rgba(96, 165, 250, .28);
  padding: 4px 10px;
  border-radius: 999px;
}

.tag--gold {
  color: var(--gold-light);
  background: rgba(216, 179, 94, .14);
  border-color: rgba(216, 179, 94, .38);
}

.card-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.card-block {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.card-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}

/* ── Botones ──────────────────────────────────────── */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-pill:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .55);
  transform: translateY(-1px);
}

.btn-pill--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2f63b8 0%, var(--navy-600) 100%);
}

.btn-pill--primary:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #3a73cc 0%, #2858a0 100%);
}

.btn-pill--gold {
  color: var(--ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-light) 0%, #e3bd69 100%);
}

.btn-pill--gold:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #f7dfa8 0%, #ecc979 100%);
}

.btn-pill svg {
  flex-shrink: 0;
}

/* ── Buscador y contadores ────────────────────────── */
.search-field {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .14);
  background-color: rgba(6, 18, 38, .55);
  color: var(--text);
  padding: 13px 14px 13px 42px;
  border-radius: 12px;
  outline: none;
  font: inherit;
  font-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='5' stroke='%238fa2bd' stroke-width='1.8'/%3E%3Cpath d='M11 11l3.5 3.5' stroke='%238fa2bd' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 15px center;
}

.search-field:focus {
  border-color: rgba(242, 213, 146, .6);
}

.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.count-pill {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  padding: 8px 13px;
}

.count-pill strong {
  color: #ffffff;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .03);
  border: 1px dashed rgba(255, 255, 255, .14);
  border-radius: 18px;
}

.page-footer-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 44px;
}

/* ── Tarjetas de noticia (blancas, como en la portada) ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  color: var(--ink);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .36);
}

.news-card-img {
  display: block;
  position: relative;
  aspect-ratio: 16 / 7.5;
  overflow: hidden;
  background: var(--navy-800);
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Cabecera ilustrada cuando la noticia no tiene foto */
.news-card-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  background:
    radial-gradient(260px 140px at 80% 10%, rgba(242, 213, 146, .22), transparent 70%),
    radial-gradient(300px 160px at 0% 100%, rgba(59, 110, 190, .45), transparent 70%),
    linear-gradient(135deg, var(--navy-850) 0%, var(--navy-700) 100%);
}

.news-card-ph svg {
  width: 64px;
  height: 64px;
  opacity: .9;
}

.news-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 18px 20px 20px;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ntag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  color: #1d4b8f;
  background: #e2ecfa;
}

.ntag--normativa {
  color: #146c43;
  background: #dcf3e6;
}

.ntag--eventos {
  color: #5b3aa8;
  background: #ece6fb;
}

.news-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}

.news-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.28;
  color: var(--ink);
}

.news-card h3 a {
  color: inherit;
  text-decoration: none;
}

.news-card p {
  margin: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.news-more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #c9d4e3;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.news-more:hover {
  background: #eef3fa;
  border-color: #9fb3cf;
  transform: translateX(2px);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1280px) {
  .top-nav-link {
    padding: 8px 10px;
    font-size: 14px;
  }

  .top-nav-internal small {
    display: none;
  }
}

@media (max-width: 1100px) {
  .top-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .top-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 20px 20px;
    background: var(--navy-900);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
  }

  .top-nav-menu.is-open {
    display: flex;
  }

  .top-nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .top-nav-link {
    padding: 11px 14px;
    font-size: 16px;
  }

  .top-nav-internal small {
    display: block;
  }

  .cards-grid,
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .page-title {
    font-size: 34px;
  }
}

@media (max-width: 700px) {
  .top-nav-inner {
    padding: 10px 16px;
    min-height: 72px;
  }

  .top-nav-logo {
    width: 50px;
    height: 50px;
  }

  .top-nav-brand-name {
    font-size: 15px;
  }

  .cards-grid,
  .cards-grid--2,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 30px 16px 26px;
  }

  .page-title {
    font-size: 30px;
  }

  .page-main {
    padding: 26px 16px 52px;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .count-pill {
    align-self: flex-start;
  }
}
