/* ══════════════════════════════════════════
   PLANTILLA 2 — MiVoto Blog
   Paleta: Azul navy oscuro como fondo principal
   ══════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --navy:         #0a1628;
  --navy-mid:     #112240;
  --navy-light:   #1a3358;
  --navy-surface: #0f1e35;
  --red:          #E63946;
  --red-dark:     #C71C30;
  --red-grad:     linear-gradient(135deg, #E63946 0%, #C71C30 100%);
  --blue:         #3686d3;
  --blue-dark:    #2563a6;
  --blue-bright:  #4a9fe8;
  --blue-grad:    linear-gradient(135deg, #3686d3 0%, #2563a6 100%);
  --cream:        #f5f0e8;
  --white:        #ffffff;
  --text-dark:    #e8edf5;
  --text-muted-dark: #8a9bbf;
  --text-body:    #1a1a2e;
  --text-muted:   #5a6178;
  --border-dark:  rgba(255,255,255,0.08);
  --border-blue:  rgba(54,134,211,0.35);
  --surface:      #13243d;
  --surface-2:    #1c3254;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--navy);
  color: var(--text-dark);
  line-height: 1.7;
}

/* ══════════════════════════════════════════
   NAVBAR — estructura idéntica al original
   ══════════════════════════════════════════ */
nav {
  background: var(--navy-surface);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 68px;
}
.logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--blue-bright);
  letter-spacing: 0.05em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo img { height: 32px; width: 32px; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 18px;
  margin: 0;
}
.nav-links a {
  color: var(--text-muted-dark);
  text-decoration: none;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--white);
  background: rgba(54,134,211,0.12);
}

.nav-social { display: flex; align-items: center; gap: 10px; }
.nav-social a {
  color: var(--text-muted-dark);
  background: rgba(255,255,255,0.05);
  border-radius: 7px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  border: 1.5px solid var(--border-dark);
  transition: background 0.18s, border 0.18s, color 0.18s;
  padding: 0; margin: 0 3px;
}
.nav-social a i { font-size: 1.08rem; font-weight: 900; color: var(--text-muted-dark); }
.nav-social a:hover {
  background: rgba(54,134,211,0.15);
  border-color: var(--blue);
  color: var(--blue-bright);
}
.nav-social a:hover i { color: var(--blue-bright); }

.nav-desktop-block { display: flex; align-items: center; }
.nav-row-mobile    { display: none; }

@media (max-width: 900px) {
  .nav-row-mobile {
    display: flex; flex-direction: row; align-items: center;
    justify-content: flex-start; width: 100%; margin: 12px 0 6px; gap: 0;
  }
  .nav-row-mobile .logo       { margin-right: auto; }
  .nav-row-mobile .nav-social { margin-left: auto; justify-content: flex-end; }
  .nav-desktop-block          { display: none !important; }
  .nav-inner { flex-direction: column; height: auto; padding: 0 10px; align-items: stretch; }
  .nav-links { gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; margin-bottom: 6px; }
  .nav-links a { font-size: 0.85rem; padding: 6px 10px; }
  .nav-social a { width: 28px; height: 28px; border-radius: 5px; }
  .nav-social a i { font-size: 0.92rem; }
}
@media (max-width: 700px) { .nav-social { gap: 6px; } }


/* ══════════════════════════════════════════
   HERO — mismo contenido, fondo oscuro
   ══════════════════════════════════════════ */
.hero {
  background:
    linear-gradient(135deg, rgba(10,22,40,0.88) 0%, rgba(54,134,211,0.45) 100%),
    url('encuestas.jpg') center center / cover no-repeat;
  position: relative;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px 56px;
}
/* Línea inferior roja */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: var(--red-grad);
}
/* Grid de líneas sutil */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(54,134,211,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54,134,211,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero-bg, .hero-grid { display: none; }

.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 100%; max-width: 720px; margin: 0 auto;
  animation: fadeUp 0.65s ease forwards;
}
.hero-left { display: flex; flex-direction: column; align-items: center; width: 100%; }

.hero h1 {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 2.5rem; font-weight: 900;
  color: #fff; line-height: 1.18;
  margin-bottom: 18px; letter-spacing: -0.01em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.12rem; font-weight: 400;
  line-height: 1.7; margin-bottom: 12px;
  max-width: 520px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}
.hero span { display: none; }

.hero-buttons { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-block;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 700; letter-spacing: 0.08em;
  text-decoration: none; cursor: pointer; border: none;
  transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.hero .btn-primary {
  background: var(--white); color: var(--navy);
  padding: 13px 32px; border-radius: 6px; font-size: 0.95rem;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}
.hero .btn-primary:hover { background: rgba(255,255,255,0.9); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.32); }
.hero .btn-light {
  background: rgba(255,255,255,0.08); color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 13px 32px; border-radius: 6px; font-size: 0.95rem; font-weight: 600;
}
.hero .btn-light:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.7); transform: translateY(-2px); }

@media (max-width: 900px) { .hero { min-height: 400px; padding: 56px 24px 48px; } .hero h1 { font-size: 2rem; } }
@media (max-width: 700px) {
  .hero { min-height: 340px; padding: 48px 20px 44px; }
  .hero h1 { font-size: 1.6rem; } .hero p { font-size: 0.98rem; }
  .hero-buttons { flex-direction: column; align-items: center; gap: 10px; }
  .hero .btn-primary, .hero .btn-light { width: 100%; max-width: 300px; text-align: center; }
}


/* ══════════════════════════════════════════
   LAYOUT PRINCIPAL
   ══════════════════════════════════════════ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 52px;
  padding: 52px 0 80px;
  align-items: start;
}
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; gap: 40px; padding: 40px 0 60px; } }


/* ══════════════════════════════════════════
   ARTÍCULO
   ══════════════════════════════════════════ */
.article-category {
  display: inline-flex;
  align-items: center; gap: 7px;
  background: var(--red-grad);
  color: #fff;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 2px;
  margin-bottom: 16px;
}
.article-category i { font-size: 0.55rem; }

main > h1 {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1.75rem; font-weight: 900;
  color: var(--white);
  line-height: 1.22; margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--border-dark);
}
@media (max-width: 700px) { main > h1 { font-size: 1.2rem; margin-top: 18px; } }

main h2 {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1.2rem; font-weight: 800;
  color: var(--white);
  margin: 44px 0 14px;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.01em;
}
main h2::before {
  content: '';
  display: inline-block;
  width: 10px; min-width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--blue-grad);
  flex-shrink: 0;
}
main h2:nth-of-type(even)::before { background: var(--red-grad); }

main p {
  font-size: 1.04rem;
  color: rgba(232,237,245,0.82);
  margin-bottom: 20px; font-weight: 300; line-height: 1.88;
}

/* Párrafo lead */
.lead-paragraph {
  font-size: 1.08rem; font-weight: 400;
  color: var(--text-dark); line-height: 1.9;
  background: var(--surface);
  border-left: 4px solid var(--blue-bright);
  padding: 16px 20px; margin-bottom: 32px;
  border-radius: 0 4px 4px 0;
}

/* ── DATA CALLOUT ── */
.data-callout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 36px 0; overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border-dark);
}
.data-item {
  padding: 28px 18px; text-align: center;
  border-right: 1px solid var(--border-dark);
  position: relative; transition: background 0.22s;
}
.data-item:last-child { border-right: none; }
.data-item:hover { background: var(--surface-2); }
.data-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--blue-grad);
  transform: scaleX(0); transition: transform 0.28s; transform-origin: left;
}
.data-item:nth-child(2)::after { background: var(--red-grad); }
.data-item:hover::after { transform: scaleX(1); }
.data-item .num {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 2.5rem; font-weight: 900;
  color: var(--blue-bright);
  display: block; line-height: 1; margin-bottom: 8px;
}
.data-item:nth-child(2) .num { color: var(--red); }
.data-item .desc {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.64rem; letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted-dark); line-height: 1.5;
}
@media (max-width: 700px) {
  .data-callout { grid-template-columns: 1fr; }
  .data-item { border-right: none; border-bottom: 1px solid var(--border-dark); }
  .data-item:last-child { border-bottom: none; }
}

/* ── HIGHLIGHT BOX ── */
.highlight-box {
  background: var(--navy-light);
  border: 1px solid var(--border-blue);
  border-left: 4px solid var(--blue-bright);
  padding: 26px 30px; margin: 36px 0;
  position: relative; border-radius: 0 4px 4px 0;
  overflow: hidden;
}
.highlight-box::before {
  content: '"';
  position: absolute;
  top: -22px; left: 14px;
  font-family: Georgia, serif;
  font-size: 9rem;
  color: var(--blue-bright);
  opacity: 0.1; line-height: 1; pointer-events: none;
}
.highlight-box p {
  font-family: 'Source Serif 4', Georgia, serif !important;
  font-size: 1.08rem !important; font-style: italic;
  color: var(--text-dark) !important;
  margin: 0 !important; line-height: 1.75;
  position: relative; z-index: 1;
}

/* ── TOC ── */
.toc-wrap {
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-left: 4px solid var(--blue-bright);
  padding: 22px 26px; margin: 0 0 34px;
  border-radius: 0 4px 4px 0;
}
.toc-title {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--blue-bright); margin-bottom: 14px;
}
.toc-list { list-style: none; counter-reset: toc; }
.toc-list li {
  counter-increment: toc;
  display: flex; align-items: baseline; gap: 10px;
  padding: 5px 0; border-bottom: 1px dashed rgba(54,134,211,0.18);
}
.toc-list li:last-child { border-bottom: none; }
.toc-list li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'Source Sans Pro', monospace;
  font-size: 0.65rem; font-weight: 800;
  color: var(--blue-bright); flex-shrink: 0;
}
.toc-list a {
  font-family: 'Source Sans Pro', sans-serif;
  color: var(--text-muted-dark); text-decoration: none;
  font-size: 0.9rem; transition: color 0.18s;
}
.toc-list a:hover { color: var(--white); }

/* ── REFERENCIAS ── */
.refs {
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-top: 3px solid var(--blue-bright);
  padding: 22px 26px; margin-top: 44px;
  border-radius: 0 0 4px 4px;
}
.refs-title {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--blue-bright); margin-bottom: 14px;
}
.refs ul { list-style: none; padding: 0; }
.refs ul li {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.84rem; color: var(--text-muted-dark);
  padding: 5px 0 5px 16px;
  border-bottom: 1px dashed rgba(255,255,255,0.07);
  position: relative;
}
.refs ul li:last-child { border-bottom: none; }
.refs ul li::before { content: '→'; position: absolute; left: 0; top: 7px; color: var(--red); font-size: 0.72rem; }


/* ══════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════ */
.sidebar { position: relative; }
.sidebar-sticky {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: 20px;
}

/* Tarjeta de anuncio */
.ad-card {
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-top: 3px solid var(--blue);
  overflow: hidden;
  border-radius: 0 0 4px 4px;
  transition: box-shadow 0.25s, transform 0.2s, border-color 0.2s;
}
.ad-card:nth-child(even) { border-top-color: var(--red); }
.ad-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(-2px);
  border-color: rgba(54,134,211,0.35);
}
.ad-card:nth-child(even):hover { border-top-color: var(--red); border-color: rgba(230,57,70,0.3); }

.ad-card a { text-decoration: none; color: inherit; display: block; }
.ad-img-wrap { overflow: hidden; height: 148px; }
.ad-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.38s; filter: brightness(0.88); }
.ad-card:hover .ad-img-wrap img { transform: scale(1.05); filter: brightness(1); }

.ad-card-body { padding: 14px 16px 16px; }
.ad-card-body h4 {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.97rem; font-weight: 800;
  color: var(--white); margin-bottom: 5px; line-height: 1.32;
}
.ad-card-body p {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.82rem; color: var(--text-muted-dark); line-height: 1.5; margin: 0;
}
.ad-card-cta {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px; color: var(--blue-bright);
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.76rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.ad-card-cta i { font-size: 0.66rem; transition: transform 0.2s; }
.ad-card:hover .ad-card-cta i { transform: translateX(4px); }


/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
footer { background: var(--navy-surface); border-top: 3px solid var(--red); }

.footer-main { padding: 48px 0; background: var(--navy-surface); }
.footer-main hr { border: none; border-top: 1px solid var(--border-dark); margin: 0 0 16px; }

.footer-container {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: flex-start;
  gap: 32px; padding: 32px 0;
}
.footer-col { flex: 1; min-width: 180px; }
.footer-brand { min-width: 220px; max-width: 340px; }
.footer-brand .logo img { height: 38px; width: auto; object-fit: contain; display: block; margin-bottom: 10px; }
.footer-brand p {
  font-family: 'Source Sans Pro', sans-serif;
  color: var(--text-muted-dark); font-size: 0.92rem; line-height: 1.6;
}

.footer-col strong {
  display: block; margin-bottom: 12px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.78rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--white);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  font-family: 'Source Sans Pro', sans-serif;
  color: var(--blue-bright); text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  font-size: 0.9rem; transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--white); }
.footer-col ul li a i { font-size: 0.85rem; }

.footer-copy {
  text-align: center; font-family: 'Source Sans Pro', sans-serif;
  color: var(--text-muted-dark); font-size: 0.88rem; padding-bottom: 18px;
}
@media (max-width: 900px) { .footer-container { flex-direction: column; gap: 24px; padding: 24px 24px; } }


/* ══════════════════════════════════════════
   WHATSAPP FLOTANTE
   ══════════════════════════════════════════ */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  background: #25d366; color: #fff;
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35); text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.whatsapp-float:hover { background: #1ebe57; box-shadow: 0 6px 24px rgba(0,0,0,0.45); transform: translateY(-2px); }
.whatsapp-float svg { width: 32px; height: 32px; fill: #fff; display: block; }
@media (max-width: 700px) {
  .whatsapp-float { width: 44px; height: 44px; bottom: 16px; right: 16px; }
  .whatsapp-float svg { width: 22px; height: 22px; }
}


/* ══════════════════════════════════════════
   ANIMACIONES
   ══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-content   { animation: fadeUp 0.65s ease forwards; }
main            { animation: fadeUp 0.6s 0.1s ease both; }
.sidebar-sticky { animation: fadeUp 0.6s 0.2s ease both; }
