/* ============================================
   PLUMA LIBRE v3 — Clean Modern Design
   Inspired by Apple's design language
   ============================================ */

:root {
  --white: #FFFFFF;
  --bg: #F5F5F7;
  --bg-card: #FFFFFF;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --border: #E8E8ED;
  --border-hover: #D2D2D7;
  --brand: #081A41;
  --brand-light: #13315C;
  --accent: #0071E3;
  --accent-hover: #0077ED;
  --red: #FF3B30;
  --red-bg: #FFF5F5;
  --green-wa: #25D366;
  --fb-blue: #1877F2;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --max-w: 1080px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg);
  overflow-wrap: break-word;
  word-wrap: break-word;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ============================================
   HEADER — Frosted glass sticky
   ============================================ */
.top-bar {
  background: var(--brand);
  color: rgba(255,255,255,0.85);
  font-size: 0.68rem;
  padding: 6px 0;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.top-bar .wrap { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: rgba(255,255,255,0.7); transition: color 0.2s; display: inline-flex; }
.top-bar a:hover { color: #fff; }

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.header .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 48px;
  transition: height 0.22s ease;
}
.header.scrolled {
  background: var(--brand);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: rgba(255,255,255,0.08);
}
.header.scrolled .wrap { height: 38px; }
.header.scrolled .logo-simbolo,
.header.scrolled .logo-text { display: none; }
.header.scrolled .logo::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  background: url("assets/icon-512.png") center/contain no-repeat;
}
.header.scrolled .menu-btn span { background: #fff; }
.logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
}
.logo-text h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand);
  line-height: 0.85;
  letter-spacing: -0.02em;
}
.logo-text .tagline {
  font-size: 0.55rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  display: block;
  margin-top: 2px;
  line-height: 1.15;
}
.logo img.logo-wordmark {
  height: 18px;
  width: auto;
  border-radius: 0;
}

/* Menu button */
.menu-btn {
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  padding: 0;
}
.menu-btn:active { background: var(--bg); }
.menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
  transform-origin: center;
}
.menu-btn.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* Nav — dropdown plegable, azul oscuro con letras claras (mobile + desktop) */
.nav {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 8px;
  background: var(--brand);
  border-radius: 10px;
  padding: 6px 0;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.10);
  animation: navSlide 0.18s var(--ease);
  overflow: hidden;
}
@keyframes navSlide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav.open { display: block; }
.nav ul { display: flex; flex-direction: column; gap: 0; list-style: none; padding: 0; margin: 0; }
.nav a {
  display: block;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav a.on { color: #fff; font-weight: 600; background: rgba(255,255,255,0.06); }

/* ============================================
   HERO / FEATURED
   ============================================ */
.hero {
  padding: 24px 0 0;
}
/* Si hay al menos una nota publicada en cualquier news-grid, el hero de bienvenida se oculta.
   Con cero notas, vuelve a aparecer como estado vacio. */
body:has(.news-grid > article) .hero {
  display: none;
}
.hero-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease);
}
.hero-card:hover { box-shadow: var(--shadow-md); }
.hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.hero-card:hover .hero-img img { transform: scale(1.03); }
.hero-body { padding: 20px; }
.badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 100px;
}
.badge-red { background: var(--red); color: white; }
.badge-brand { background: var(--brand); color: white; }
.badge-outline { background: rgba(0,113,227,0.08); color: var(--accent); }
.hero-body h2 {
  font-family: var(--font-body);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-top: 10px;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}
.hero-body h2 a { transition: color 0.2s; }
.hero-body h2 a:hover { color: var(--accent); }
.hero-body .excerpt {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.55;
}
.hero-body .meta {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 12px;
  font-weight: 500;
}

/* ============================================
   HOME HERO — layout estilo Infobae
   1 principal grande + 4 secundarias en sidebar.
   Mobile: stack vertical con secundarias compactas.
   Desktop: grilla asimetrica 1.6fr / 1fr.
   ============================================ */
.home-hero { padding: 8px 0 4px; }
.home-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.home-hero-principal {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease);
  cursor: pointer;
  animation: fadeIn 0.5s var(--ease) both;
}
.home-hero-principal:hover { box-shadow: var(--shadow-md); }
.home-hero-principal .img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}
.home-hero-principal .img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.home-hero-principal:hover .img img { transform: scale(1.03); }
.home-hero-principal .body { padding: 10px 14px 12px; }
.home-hero-principal .kicker,
.home-hero-secondary .kicker {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 4px;
}
.home-hero-principal h2 {
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.12;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}
.home-hero-principal h2 a:hover { color: var(--accent); }
.home-hero-principal .excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}
.home-hero-principal .meta {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 6px;
  font-weight: 500;
}

.home-hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-hero-secondary {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
  animation: fadeIn 0.4s var(--ease) both;
}
.home-hero-secondary:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
  transform: translateY(-1px);
}
.home-hero-secondary .thumb {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.home-hero-secondary .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.home-hero-secondary .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home-hero-secondary .kicker { font-size: 0.6rem; margin-bottom: 4px; }
.home-hero-secondary h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}
.home-hero-secondary h3 a:hover { color: var(--accent); }
.home-hero-secondary:nth-child(1) { animation-delay: 60ms; }
.home-hero-secondary:nth-child(2) { animation-delay: 100ms; }
.home-hero-secondary:nth-child(3) { animation-delay: 140ms; }
.home-hero-secondary:nth-child(4) { animation-delay: 180ms; }

/* Stretched link en cards del hero */
.home-hero-principal h2 a::after,
.home-hero-secondary h3 a::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
}
.home-hero-principal:has(h2 a:focus-visible),
.home-hero-secondary:has(h3 a:focus-visible) {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: inherit;
}
.home-hero-principal h2 a:focus-visible,
.home-hero-secondary h3 a:focus-visible { outline: none; }

@media (min-width: 900px) {
  .home-hero-grid {
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    align-items: start;
  }
  .home-hero-principal .img { aspect-ratio: 16/10; }
  .home-hero-principal .body { padding: 14px 20px 16px; }
  .home-hero-principal h2 { font-size: 2.1rem; }
  .home-hero-principal .excerpt { font-size: 1.02rem; }
  .home-hero-sidebar { gap: 6px; }
  .home-hero-secondary { padding: 8px; }
  .home-hero-secondary .thumb { width: 76px; height: 76px; }
  .home-hero-secondary h3 { font-size: 1rem; }
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 10px;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 6px;
}
.section-head h2 {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.section-head .see-all {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.2s;
}
.section-head .see-all:hover { opacity: 0.7; }

/* ============================================
   NEWS CARDS — Clean card style
   ============================================ */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding-bottom: 6px;
}
.card {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  transform: translateY(-1px);
}
.card .thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.card .badge-sm {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand);
  letter-spacing: 0.08em;
}
.card h3 {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1px;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}
.card h3 a:hover { color: var(--accent); }
.card .meta {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: 2px;
  font-weight: 500;
}

/* Big card for section pages */
.card-lg {
  display: block;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  margin-bottom: 12px;
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
}
.card-lg:hover { box-shadow: var(--shadow-md); border-color: var(--border); transform: translateY(-1px); }
.card-lg .img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg);
  margin-bottom: 14px;
}
.card-lg .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card-lg:hover .img-wrap img { transform: scale(1.03); }
.card-lg h3 {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.card-lg h3 a:hover { color: var(--accent); }
.card-lg .excerpt { font-size: 0.95rem; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }
.card-lg .meta { font-size: 0.7rem; color: var(--text-tertiary); margin-top: 10px; font-weight: 500; }

/* ============================================
   NOTA DESTACADA EN PORTADA
   Ocupa todo el ancho del .news-grid y tiene
   un badge "Destacada". Solo una a la vez — el
   editor degrada la anterior al marcar una nueva.
   ============================================ */
.news-grid > .hero-article {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease);
  animation: fadeIn 0.5s var(--ease) both;
}
.news-grid > .hero-article:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.news-grid > .hero-article::before {
  content: "📌 Destacada";
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--brand);
  color: #fff;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}
.news-grid > .hero-article .thumb {
  width: 100%;
  height: 240px;
  border-radius: 0;
  flex: none;
  overflow: hidden;
}
.news-grid > .hero-article .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s var(--ease);
}
.news-grid > .hero-article:hover .thumb img { transform: scale(1.03); }
.news-grid > .hero-article .info {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-grid > .hero-article .badge-sm { font-size: 0.72rem; }
.news-grid > .hero-article h3 {
  font-family: var(--font-body);
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.news-grid > .hero-article h3 a { transition: color 0.2s; }
.news-grid > .hero-article h3 a:hover { color: var(--accent); }
.news-grid > .hero-article .meta {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  font-weight: 500;
}
@media (min-width: 700px) {
  .news-grid > .hero-article .thumb { height: 360px; }
  .news-grid > .hero-article h3 { font-size: 2.4rem; }
  .news-grid > .hero-article .info { padding: 26px 28px 28px; }
}

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-page { background: var(--white); }
.article-header { padding: 32px 0 24px; }
.article-header h1 {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 14px;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  max-width: 720px;
}
.article-header .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-top: 14px;
  line-height: 1.45;
  font-weight: 400;
  max-width: 700px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-weight: 500;
}
.article-meta strong { color: var(--text-primary); }

.article-img {
  width: 100%;
  overflow: hidden;
  margin: 24px 0;
  border-radius: var(--radius-lg);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.article-img img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.article-img figcaption {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 8px;
  font-style: italic;
}

/* Imagenes inline en el cuerpo de la nota (marcador [IMAGEN:xxx.jpg]) */
.article-img-body {
  margin: 24px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  display: flex;
  justify-content: center;
  max-height: 70vh;
}
.article-img-body img {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.article-body {
  padding: 20px 0 48px;
  max-width: 700px;
}
.article-body p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 22px;
  color: var(--text-primary);
  text-align: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: anywhere;
}
.article-body h2 {
  font-family: var(--font-body);
  font-size: 1.5rem;
  margin: 40px 0 16px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 14px 20px;
  margin: 28px 0;
  font-style: italic;
  color: var(--text-secondary);
  background: rgba(0,113,227,0.03);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1rem;
  line-height: 1.7;
}

/* Share buttons */
.share {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 28px;
}
.share-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btns a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 100px;
  color: var(--white);
  transition: all 0.2s var(--ease);
}
.share-btns a:hover { transform: scale(1.03); }
.share-btns .fb { background: var(--fb-blue); }
.share-btns .wa { background: var(--green-wa); }

/* ============================================
   ABOUT PAGE
   ============================================ */
.about { padding: 32px 0 52px; }
.about h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.about h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 12px;
  font-weight: 600;
}
.about p { font-size: 0.95rem; line-height: 1.75; color: var(--text-secondary); margin-bottom: 14px; max-width: 660px; }
.value-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  max-width: 660px;
  box-shadow: var(--shadow-xs);
}
.value-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--brand);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}
.value-card p { margin-bottom: 0; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.contact-row svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent); }

/* Contact form */
.form-box { max-width: 520px; margin-top: 16px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.92rem;
  font-family: var(--font-body);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-primary);
  transition: all 0.2s var(--ease);
  -webkit-appearance: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
}
.field textarea { resize: vertical; min-height: 110px; }
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--brand);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.btn-submit:hover { background: var(--brand-light); transform: scale(1.02); }

/* Lista de secciones (bullets editoriales en about) */
.sections-list { max-width: 660px; margin: 12px 0 18px; list-style: none; padding: 0; }
.sections-list li { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; padding: 4px 0; }
.sections-list strong { color: var(--text-primary); font-weight: 600; }

/* ============================================
   REDES SOCIALES — bloque reutilizable
   .social-icons: solo iconos (usado al final de cada nota)
   .social-links: icono + texto (usado en sobre-nosotros)
   ============================================ */
.follow-us {
  margin: 40px 0 24px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.follow-us > p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-weight: 500;
}
.social-icons {
  display: inline-flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
}
.social-icons a {
  color: var(--text-primary);
  font-size: 1.75rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.social-icons a:hover { color: var(--accent); transform: translateY(-2px); }
.social-icons svg { display: block; }

.social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  margin: 14px 0 18px;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.social-links a:hover { color: var(--accent); border-color: var(--accent); box-shadow: var(--shadow-xs); }
.social-links svg { flex-shrink: 0; color: inherit; font-size: 1.25em; }

/* Fila de iconos sociales dentro del footer (arriba del copyright) */
.footer-social { text-align: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.footer-social .social-icons { font-size: 1.1rem; }

/* ============================================
   SISTEMA DE BANNERS PUBLICITARIOS
   Banner A: superior del home (entre hero y grid de noticias).
   Banner B: interno en notas (entre el 3er y 4to párrafo).
   Estado sin anunciante → usar atributo `hidden` en el <aside>.
   Regla defensiva: si algún <img> queda sin src, el banner no aparece.
   ============================================ */
.pl-ad {
  display: block;
  max-width: 970px;
  margin: 8px auto;
  font-family: var(--font-body);
  position: relative;
}
/* "Publicidad" como tag flotante en la esquina superior izquierda del banner,
   encima de la imagen. Sin reservar línea propia: el banner queda compacto
   contra el contenido de arriba y abajo. */
.pl-ad-label {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 9px;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0;
  pointer-events: none;
  z-index: 2;
}
/* Variante A - sobria (borde 1px, recomendada)
   Background gris claro para que las imágenes con ratio distinto al slot
   muestren bandas neutras en vez de blanco puro. */
.pl-ad-sobria .pl-ad-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
/* Variante B - integrada (líneas divisorias arriba y abajo) */
.pl-ad-integrada {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0 12px;
}
.pl-ad-integrada .pl-ad-frame { overflow: hidden; background: var(--bg); }
/* Imagen hace contain dentro del frame. Preserva aspect-ratio, se centra
   y deja bandas grises si el ratio de la imagen no coincide con el slot. */
.pl-ad-frame a {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
}
/* La imagen toma su aspect ratio nativo (height: auto). El frame sin alto fijo
   se adapta — así no quedan bandas blancas si el ratio de la imagen no coincide
   con un "slot estándar" como 970×250 o 320×100. Cap de altura para que un
   anunciante no rompa el layout subiendo una imagen cuadrada gigante. */
.pl-ad-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 500px;
}
/* Banner A - home: 3 tamaños responsive (la imagen real determina el alto) */
.pl-ad--banner-a { max-width: 970px; }
.pl-ad--banner-a .pl-ad-img-billboard   { display: block; }
.pl-ad--banner-a .pl-ad-img-leaderboard { display: none; }
.pl-ad--banner-a .pl-ad-img-mobile      { display: none; }
@media (max-width: 1040px) and (min-width: 768px) {
  .pl-ad--banner-a .pl-ad-img-billboard   { display: none; }
  .pl-ad--banner-a .pl-ad-img-leaderboard { display: block; }
}
@media (max-width: 767px) {
  .pl-ad--banner-a .pl-ad-img-billboard   { display: none; }
  .pl-ad--banner-a .pl-ad-img-mobile      { display: block; }
}
/* Banner B - nota: 2 tamaños responsive */
.pl-ad--banner-b { max-width: 728px; margin: 14px auto; }
.pl-ad--banner-b .pl-ad-img-leaderboard { display: block; }
.pl-ad--banner-b .pl-ad-img-mobile      { display: none; }
@media (max-width: 767px) {
  .pl-ad--banner-b { margin: 10px auto; }
  .pl-ad--banner-b .pl-ad-img-leaderboard { display: none; }
  .pl-ad--banner-b .pl-ad-img-mobile      { display: block; }
}
/* Banner A — vive arriba de todo en el home. Slide-up al scrollear (>60px)
   y vuelve si el scroll vuelve a <10px. La transición es sobre el wrapper. */
.pl-ad--banner-a {
  transition: max-height .35s cubic-bezier(.25,.1,.25,1), opacity .25s ease, margin .35s ease, padding .35s ease;
  max-height: 600px;
  overflow: hidden;
}
.pl-ad--banner-a.pl-ad-hidden {
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
/* Banner C — intercalado entre cards del grid (estilo card normal). */
.pl-ad--banner-c {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 0;
  max-width: none;
}
/* Banner C es una card con label en bloque arriba (no overlay). Anulamos el
   floating de .pl-ad-label para devolverlo al flujo normal de la card. */
.pl-ad--banner-c .pl-ad-label {
  position: static;
  background: transparent;
  color: var(--text-tertiary);
  padding: 8px 12px 4px;
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  pointer-events: auto;
}
.pl-ad--banner-c .pl-ad-frame {
  flex: 1;
  aspect-ratio: 4 / 3;
  background: var(--bg);
}
.pl-ad--banner-c .pl-ad-frame img { object-fit: cover; }

/* Colapso defensivo: si quitaron el atributo `hidden` pero todavía no hay
   imagen con src válida, no mostrar el banner (evita frame roto). */
.pl-ad:not(:has(img[src]:not([src=""]))) { display: none; }

/* ============================================
   BACK TO TOP
   ============================================ */
.to-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--brand);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.9);
  transition: all 0.3s var(--ease);
  z-index: 80;
}
.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.to-top:active { transform: scale(0.92); }

/* ============================================
   FOOTER — Clean minimal
   ============================================ */
.footer {
  background: var(--brand);
  color: var(--white);
  padding: 40px 0 24px;
  margin-top: 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.footer h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  opacity: 0.95;
}
.footer p, .footer a {
  font-size: 0.82rem;
  line-height: 1.7;
  opacity: 0.65;
}
.footer a:hover { opacity: 1; }
.footer ul li { margin-bottom: 8px; }
.footer-bottom {
  text-align: center;
  font-size: 0.68rem;
  opacity: 0.4;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 640px) {
  .news-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .card { flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
  .card .thumb { width: 100%; height: 160px; border-radius: 0; }
  .card .info { padding: 14px; }
}
@media (min-width: 900px) {
  .wrap { padding: 0 32px; }
  .logo-text h1 { font-size: 1.4rem; }
  .logo img { width: 32px; height: 32px; }
  .logo img.logo-wordmark { height: 18px; width: auto; }
  .header .wrap { justify-content: space-between; }
  .logo { position: static; transform: none; left: auto; top: auto; }
  .hero .wrap {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
  }
  .hero-body h2 { font-size: 2.25rem; }
  .news-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .article-header h1 { font-size: 3rem; }
  .article-header .subtitle { font-size: 1.25rem; }
  .article-body p { font-size: 1.1875rem; }
  .article-body h2 { font-size: 1.75rem; }
  .section-head h2 { font-size: 1.55rem; }
  .card h3 { font-size: 1.1rem; }
  .card-lg h3 { font-size: 1.55rem; }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.card { animation: fadeIn 0.4s var(--ease) both; }
.card:nth-child(2) { animation-delay: 40ms; }
.card:nth-child(3) { animation-delay: 80ms; }
.card:nth-child(4) { animation-delay: 120ms; }
.card:nth-child(5) { animation-delay: 160ms; }
.card:nth-child(6) { animation-delay: 200ms; }
.hero-card { animation: fadeIn 0.5s var(--ease) both; }
.card-lg { animation: fadeIn 0.4s var(--ease) both; }

@media print {
  .header, .top-bar, .footer, .menu-btn, .share, .to-top { display: none; }
  body { background: white; }
}

/* ===== Cards clickeables (stretched pseudo-link) =====
   El <a> del título se expande via ::after para cubrir toda la card.
   HTML no cambia: screen readers siguen leyendo solo el título como link,
   Tab salta a 1 solo link por card, y el HTML queda válido (sin <a> anidados). */
.hero-card, .card, .card-lg { position: relative; }

.hero-card h2 a::after,
.card h3 a::after,
.card-lg h3 a::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
}

.hero-card, .card, .card-lg { cursor: pointer; }

/* Focus ring visible sobre toda la card cuando el link del título tiene focus */
.hero-card:has(h2 a:focus-visible),
.card:has(h3 a:focus-visible),
.card-lg:has(h3 a:focus-visible) {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: inherit;
}
.hero-card h2 a:focus-visible,
.card h3 a:focus-visible,
.card-lg h3 a:focus-visible { outline: none; }

/* Links internos secundarios futuros (hashtag-badge clickeable, "ver más", etc.)
   deben quedar por encima del pseudo-link estirado. */
.hero-card .hero-body a:not(h2 a),
.card .info a:not(h3 a),
.card-lg a:not(h3 a) { position: relative; z-index: 2; }

/* ===== Empty state y hero de bienvenida (pre-lanzamiento) ===== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-style: italic;
}

.hero-welcome {
  background: var(--card);
  border-radius: var(--radius);
  padding: 60px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}
.hero-welcome h2 {
  font-family: var(--fd);
  color: var(--brand);
  font-size: 1.8rem;
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero-welcome p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}
