/* Somos Justicia — Estilos de la seccion Actualidad Juridica
   Usados por actualidad.html y por cada articulo generado. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1a2744; --navy-dark: #0f1a30; --navy-soft: #243454;
  --gold: #b89a6a; --gold-light: #d4b896; --gold-soft: rgba(184,154,106,0.12);
  --white: #ffffff; --gray-light: #f5f4f2; --gray-mid: #e8e6e0;
  --text-dark: #1a1a1a; --text-mid: #4a4a4a; --text-on-navy: #e8e6e1;
  --gold-border: rgba(184,154,106,0.35);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body { font-family: 'Montserrat', sans-serif; color: var(--text-dark); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Navegacion (igual que el resto del sitio) ─────────────────────── */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(15,26,48,0.6);
  backdrop-filter: blur(14px); border-bottom: 1px solid transparent; display: flex; align-items: center;
  justify-content: space-between; padding: 0 2rem; height: 76px; transition: background 0.35s, border-color 0.35s; }
nav.scrolled { background: rgba(15,26,48,0.96); border-bottom-color: var(--gold-border); }
.nav-logo a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img.emblem { height: 58px; width: auto; }
.nav-logo img.wordmark { height: 38px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-links a { font-size: 0.74rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-on-navy); text-decoration: none; position: relative; transition: color 0.2s; padding: 4px 0; }
.nav-links a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1px;
  background: var(--gold); transition: width 0.3s; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a.active { color: var(--gold-light); }
.nav-links a:hover::after, .nav-links a:focus-visible::after, .nav-links a.active::after { width: 100%; }
.nav-login, .nav-links a.nav-login { display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; background: transparent; color: var(--text-on-navy) !important; font-size: 0.66rem;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  border: 1px solid rgba(232,230,225,0.35); border-radius: 999px; transition: all 0.25s; }
.nav-login::after { display: none !important; }
.nav-login:hover { border-color: var(--gold); color: var(--gold-light) !important; background: rgba(184,154,106,0.08); }
.nav-cta, .nav-links a.nav-cta { display: inline-block; padding: 0.9rem 2.2rem; background: var(--gold);
  color: var(--navy-dark) !important; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; border: 1px solid var(--gold); border-radius: 999px;
  box-shadow: 0 4px 14px rgba(184,154,106,0.35); transition: all 0.25s; }
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--gold-light); border-color: var(--gold-light); }
.sj-idioma { background: transparent; border: 1px solid rgba(184,154,106,0.45); color: var(--gold-light);
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.5rem 0.9rem; cursor: pointer; line-height: 1; transition: all 0.25s; }
.sj-idioma:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-dark); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-on-navy); margin: 5px 0; transition: 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-links { position: fixed; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--navy-dark); border-bottom: 1px solid var(--gold-border); max-height: 0;
    overflow: hidden; transition: max-height 0.4s ease; }
  .nav-links.open { max-height: 700px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 1rem 0; }
  .nav-links .nav-login { margin: 0.8rem auto 0.4rem; display: inline-flex; }
  .nav-links .nav-cta { margin: 0.4rem auto 1.3rem; display: inline-block; }
}

.btn-primary { display: inline-flex; align-items: center; gap: 0.6rem; padding: 1.05rem 2.5rem;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; background: var(--gold); color: var(--navy-dark); border: none;
  border-radius: 999px; box-shadow: 0 6px 20px rgba(184,154,106,0.3); transition: all 0.3s; }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); }

.breadcrumb { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--gold-light); text-decoration: none; }

.etiqueta { display: inline-block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-border);
  padding: 0.35rem 0.9rem; border-radius: 999px; }

/* ── Portada del listado ───────────────────────────────────────────── */
.listado-hero { background: linear-gradient(135deg, #0f1a30 0%, #1a2744 55%, #243454 100%);
  padding: 160px 0 80px; position: relative; overflow: hidden; }
.listado-hero::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 78% 40%, rgba(184,154,106,0.16) 0%, transparent 60%); }
.listado-hero .container { position: relative; z-index: 2; }
.listado-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 300; color: var(--white); line-height: 1.05; }
.listado-hero h1 em { font-style: italic; color: var(--gold-light); }
.listado-hero .lead { margin-top: 1.3rem; max-width: 620px; color: rgba(255,255,255,0.78);
  font-weight: 300; line-height: 1.7; }

/* ── Rejilla de publicaciones ──────────────────────────────────────── */
.listado { padding: 5rem 0 6rem; background: var(--gray-light); }
.listado-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.6rem; }
.tarjeta-articulo { background: var(--white); border: 1px solid var(--gray-mid); transition: all 0.3s; }
.tarjeta-articulo:hover { border-color: var(--gold); box-shadow: 0 14px 40px rgba(26,39,68,0.1); transform: translateY(-4px); }
.tarjeta-enlace { display: block; padding: 2rem 1.9rem; text-decoration: none; height: 100%; }
.tarjeta-fecha { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-mid); margin-bottom: 0.9rem; }
.tarjeta-articulo h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.55rem; font-weight: 600;
  color: var(--navy); line-height: 1.25; margin-top: 0.9rem; }
.tarjeta-resumen { font-size: 0.88rem; font-weight: 300; color: var(--text-mid);
  line-height: 1.65; margin-top: 0.7rem; }
.tarjeta-mas { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.3rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.sin-articulos { grid-column: 1 / -1; text-align: center; padding: 4rem 1rem;
  font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: var(--text-mid); }

/* ── Articulo ──────────────────────────────────────────────────────── */
.articulo-hero { background: linear-gradient(135deg, #0f1a30 0%, #1a2744 60%, #243454 100%);
  padding: 150px 0 70px; position: relative; overflow: hidden; }
.articulo-hero::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 30%, rgba(184,154,106,0.15) 0%, transparent 60%); }
.articulo-hero .container { position: relative; z-index: 2; max-width: 820px; }
.articulo-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 400; color: var(--white); line-height: 1.14; margin-top: 1rem; }
.articulo-meta { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-top: 1.2rem; }

.articulo-cuerpo { max-width: 760px; padding-top: 3.5rem; padding-bottom: 5rem; }
.bajada { font-family: 'Cormorant Garamond', serif; font-size: 1.45rem; font-weight: 400;
  font-style: italic; color: var(--navy); line-height: 1.5; padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-mid); margin-bottom: 2.4rem; }

.texto p { font-size: 1.02rem; font-weight: 300; color: var(--text-dark);
  line-height: 1.85; margin-bottom: 1.5rem; }
.texto h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.85rem; font-weight: 600;
  color: var(--navy); margin: 2.8rem 0 1rem; }
.texto h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.45rem; font-weight: 600;
  color: var(--navy); margin: 2.2rem 0 0.8rem; }
.texto ul, .texto ol { margin: 0 0 1.6rem 1.3rem; }
.texto li { font-size: 1.02rem; font-weight: 300; color: var(--text-dark);
  line-height: 1.8; margin-bottom: 0.6rem; }
.texto a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold);
  text-underline-offset: 3px; }
.texto a:hover { color: var(--gold); }
.texto strong { font-weight: 600; }
.texto blockquote { border-left: 2px solid var(--gold); padding: 0.4rem 0 0.4rem 1.6rem;
  margin: 2rem 0; font-family: 'Cormorant Garamond', serif; font-size: 1.3rem;
  font-style: italic; color: var(--navy); line-height: 1.6; }

.articulo-fuente { margin-top: 3rem; padding: 1.4rem 1.6rem; background: var(--gray-light);
  border-left: 2px solid var(--gold); }
.fuente-label { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-mid); margin-bottom: 0.4rem; }
.articulo-fuente a { font-size: 0.9rem; color: var(--navy); text-decoration: underline;
  text-decoration-color: var(--gold); text-underline-offset: 3px; word-break: break-word; }

.articulo-cierre { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--gray-mid);
  text-align: center; }
.articulo-cierre p { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem;
  color: var(--navy); margin-bottom: 1.4rem; }

/* ── Pie ───────────────────────────────────────────────────────────── */
footer { background: var(--navy-dark); padding: 3rem 0 2rem; }
.footer-inner { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; display: flex;
  flex-direction: column; align-items: center; gap: 1.4rem; text-align: center; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo img.emblem { height: 78px; }
.footer-logo img.wordmark { height: 50px; }
.footer-links { display: flex; gap: 1.8rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; transition: color 0.25s; }
.footer-links a:hover { color: var(--gold-light); }
.footer-copy { color: rgba(255,255,255,0.4); font-size: 0.75rem; font-weight: 300; }

/* Desplegable de areas de practica */
.nav-desplegable { position: relative; }
.nav-desplegable > button { display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: none; padding: 4px 0; cursor: pointer;
  font-family: 'Montserrat', sans-serif; font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-on-navy);
  position: relative; transition: color 0.2s; }
.nav-desplegable > button::after { content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: var(--gold); transition: width 0.3s; }
.nav-desplegable > button:hover, .nav-desplegable > button:focus-visible,
.nav-desplegable.activo > button { color: var(--gold-light); }
.nav-desplegable > button:hover::after, .nav-desplegable > button:focus-visible::after,
.nav-desplegable.activo > button::after { width: 100%; }
.nav-desplegable > button svg { transition: transform 0.25s; }
.nav-desplegable:hover > button svg,
.nav-desplegable > button[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav-submenu { position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(-6px);
  min-width: 190px; background: var(--navy-dark); border: 1px solid var(--gold-border);
  list-style: none; padding: 0.5rem 0; opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.nav-desplegable:hover .nav-submenu,
.nav-desplegable:focus-within .nav-submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-submenu::before { content: ''; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav-submenu li { width: 100%; }
.nav-links .nav-submenu a { display: block; padding: 0.7rem 1.4rem; white-space: nowrap; }
.nav-links .nav-submenu a::after { display: none; }
.nav-links .nav-submenu a:hover { background: rgba(184,154,106,0.1); }

@media (max-width: 980px) {
  .nav-desplegable > button { width: 100%; justify-content: center; padding: 1rem 0; }
  .nav-submenu { position: static; transform: none; opacity: 1; visibility: visible;
    min-width: 0; border: none; border-top: 1px solid rgba(184,154,106,0.18);
    background: rgba(0,0,0,0.22); box-shadow: none; padding: 0; }
  .nav-links .nav-submenu a { padding: 0.85rem 0; font-size: 0.68rem; }
  .nav-submenu::before { display: none; }
}
