/* ══════════════════════════════════════════
   PLANTILLA 1 — MiVoto Blog
   Paleta: Rojos y azules vivos del logo
   ══════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --navy:        #0a1628;
  --navy-mid:    #112240;
  --red:         #E63946;
  --red-dark:    #C71C30;
  --red-grad:    linear-gradient(135deg, #E63946 0%, #C71C30 100%);
  --blue:        #3686d3;
  --blue-dark:   #2563a6;
  --blue-light:  #ddeeff;
  --blue-grad:   linear-gradient(135deg, #3686d3 0%, #2563a6 100%);
  --cream:       #f5f0e8;
  --white:       #ffffff;
  --text:        #1a1a2e;
  --text-muted:  #5a6178;
  --accent:      #b5253c;
  --border-red:  rgba(230, 57, 70, 0.22);
  --border-blue: rgba(54, 134, 211, 0.22);
}

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

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

/* ══════════════════════════════════════════
   NAVBAR — estructura idéntica al original
   ══════════════════════════════════════════ */
nav {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1.5px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(10,22,40,0.03);
}
.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);
  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: #222;
  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;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); }

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

.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: 2px; }
  .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, diseño renovado
   ══════════════════════════════════════════ */
.hero {
  background:
    linear-gradient(135deg, rgba(10,22,40,0.82) 0%, rgba(54,134,211,0.52) 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;
}
/* Barra inferior roja */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: var(--red-grad);
}
/* Patrón de puntos sutil */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 30px 30px;
  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.35);
}
.hero p {
  color: rgba(255,255,255,0.88);
  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.3);
}
.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.2);
}
.hero .btn-primary:hover { background: rgba(255,255,255,0.88); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.28); }

.hero .btn-light {
  background: rgba(255,255,255,0.10); color: #fff;
  border: 1.5px solid rgba(255,255,255,0.45);
  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.20); border-color: rgba(255,255,255,0.75); 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
   ══════════════════════════════════════════ */

/* Etiqueta de categoría sobre el título */
.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.6rem; }

main > h1 {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.22;
  margin-bottom: 24px;
  /* Línea azul debajo — diferente al original */
  padding-bottom: 22px;
  border-bottom: 3px solid var(--blue);
}
@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.25rem;
  font-weight: 800;
  color: var(--navy);
  margin: 44px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
/* Pastilla azul/roja alternante — lograda con nth-child */
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(odd)::before  { background: var(--blue-grad); }
main h2:nth-of-type(even)::before { background: var(--red-grad); }

main p { font-size: 1.04rem; color: #2c2c3e; margin-bottom: 20px; font-weight: 300; line-height: 1.85; }

/* Párrafo lead */
.lead-paragraph {
  font-size: 1.1rem; font-weight: 400;
  color: var(--navy); line-height: 1.9;
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  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;
  border: 2px solid var(--navy);
}
.data-item {
  padding: 26px 18px;
  text-align: center;
  background: var(--white);
  border-right: 1px solid rgba(10,22,40,0.12);
  position: relative;
  transition: background 0.22s;
}
.data-item:last-child { border-right: none; }
.data-item:hover { background: #f0f7ff; }
/* Línea inferior coloreada en hover */
.data-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 4px;
  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); 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.66rem; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-muted); line-height: 1.5;
}
@media (max-width: 700px) {
  .data-callout { grid-template-columns: 1fr; border-radius: 4px; }
  .data-item { border-right: none; border-bottom: 1px solid rgba(10,22,40,0.12); }
  .data-item:last-child { border-bottom: none; }
}

/* ── HIGHLIGHT BOX ── */
.highlight-box {
  background: var(--navy);
  padding: 28px 32px;
  margin: 36px 0;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}
.highlight-box::before {
  content: '"';
  position: absolute;
  top: -24px; left: 16px;
  font-family: Georgia, serif;
  font-size: 9rem;
  color: var(--red);
  opacity: 0.18;
  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: rgba(255,255,255,0.92) !important;
  margin: 0 !important;
  line-height: 1.75;
  position: relative; z-index: 1;
}

/* ── TOC ── */
.toc-wrap {
  background: var(--white);
  border: 1px solid var(--border-blue);
  border-left: 4px solid var(--blue);
  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); 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); flex-shrink: 0;
}
.toc-list a {
  font-family: 'Source Sans Pro', sans-serif;
  color: var(--text); text-decoration: none; font-size: 0.9rem;
  transition: color 0.18s;
}
.toc-list a:hover { color: var(--blue); }

/* ── REFERENCIAS ── */
.refs {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-top: 3px solid var(--blue);
  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); 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);
  padding: 5px 0 5px 16px;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
  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(--white);
  border: 1px solid rgba(0,0,0,0.09);
  border-top: 3px solid var(--blue);
  overflow: hidden;
  border-radius: 0 0 4px 4px;
  transition: box-shadow 0.25s, transform 0.2s;
}
.ad-card:nth-child(odd)  { border-top-color: var(--blue); }
.ad-card:nth-child(even) { border-top-color: var(--red); }
.ad-card:hover { box-shadow: 0 8px 28px rgba(54,134,211,0.13); transform: translateY(-2px); }

.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; }
.ad-card:hover .ad-img-wrap img { transform: scale(1.05); }

.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(--navy); 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); line-height: 1.5; margin: 0;
}
.ad-card-cta {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px; color: var(--blue);
  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(--white); border-top: 3px solid var(--red); }
.footer-main { padding: 48px 0; background: var(--cream); }
.footer-main hr { border: none; border-top: 1px solid #e0e0e0; 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); 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(--navy);
}
.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); 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(--blue-dark); }
.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); 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: var(--white);
  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.18);
  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.22); transform: translateY(-2px); }
.whatsapp-float svg { width: 32px; height: 32px; fill: var(--white); 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; }
