/* =====================================================
   GUÍAS VIRALES TOP - ESTILOS PRINCIPALES
   Modifica colores, tamaños y espaciados desde aquí.
   ===================================================== */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f4ff;
  --text: #111827;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --border: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 20px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.brand-text { font-size: 1.22rem; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--surface-2);
  color: var(--primary);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--surface-2);
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
}

/* HERO */
.hero {
  padding: 56px 0 26px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.20), transparent 36%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 34%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 38px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 22px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 18px;
  transform: rotate(1deg);
}

/* BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--primary); }

.btn-light {
  background: #fff;
  color: var(--primary);
}

/* FILTROS */
.filters {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 13px 16px;
  font-size: 1rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pill {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.pill:hover,
.pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ARTÍCULOS */
.posts-section { padding: 46px 0 28px; }

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.posts-grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  transition: 0.22s ease;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.post-media {
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
}

.post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s ease;
}

.post-card:hover .post-media img { transform: scale(1.04); }

.post-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 9px;
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.78rem;
}

.post-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.post-card p {
  color: var(--muted);
  margin: 10px 0 18px;
}

.post-card .btn { margin-top: auto; width: fit-content; }

.empty-state {
  display: none;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
}

/* PROMO */
.promo-box {
  margin: 24px auto 54px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  border-radius: 28px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow);
}

.promo-box h2 { margin: 0 0 6px; }
.promo-box p { margin: 0; opacity: 0.90; }

/* PÁGINA DE ARTÍCULO */
.article-main { padding: 42px 0 50px; }

.article-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.article-hero-img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  background: var(--surface-2);
}

.article-body { padding: clamp(22px, 5vw, 48px); }

.article-body h1 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.article-body p,
.article-body li { color: #334155; font-size: 1.05rem; }

.article-body h2 {
  margin-top: 28px;
  letter-spacing: -0.03em;
}

.article-body ul { padding-left: 22px; }

.article-note {
  padding: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  color: #9a3412;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.related-section { padding-top: 34px; }

/* PÁGINAS INFORMATIVAS */
.page-main {
  padding: 54px 0;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 48px);
}

.info-card h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.05em;
}

.info-card p { color: #334155; }

/* FOOTER */
.site-footer {
  background: #0f172a;
  color: #e5e7eb;
  padding-top: 44px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 30px;
}

.footer-brand { margin-bottom: 12px; }

.site-footer p { color: #cbd5e1; margin: 0; }
.site-footer h3 { margin: 0 0 12px; color: #fff; }
.site-footer a:not(.brand) {
  display: block;
  color: #cbd5e1;
  padding: 5px 0;
}
.site-footer a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  text-align: center;
  padding: 18px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 520px; transform: none; }
  .posts-grid,
  .posts-grid.small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .header-inner { min-height: 68px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 10px;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .nav-link { text-align: center; }
  .hero { padding-top: 36px; }
  .search-box { grid-template-columns: 1fr; }
  .posts-grid,
  .posts-grid.small { grid-template-columns: 1fr; }
  .promo-box { flex-direction: column; align-items: start; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .container { width: min(100% - 22px, var(--container)); }
  .brand-text { font-size: 1rem; }
  .filters { padding: 14px; }
  .post-content { padding: 16px; }
}

/* =====================================================
   BLOQUES DE ENLACES PATROCINADOS
   Estos espacios NO muestran anuncios reales todavía.
   Cuando tengas aprobado AdSense, Ezoic, Adsterra u otra red,
   reemplaza el comentario dentro de .ad-code por tu código.
   ===================================================== */
.ad-box {
  margin: 26px auto;
  min-height: 112px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(37,99,235,0.06), rgba(245,158,11,0.08)),
    #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: #64748b;
  padding: 20px;
}

.ad-top { margin-top: 24px; }
.ad-bottom { margin-bottom: 38px; }

.ad-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-code {
  width: 100%;
  max-width: 760px;
  min-height: 48px;
  display: grid;
  place-items: center;
  font-size: 0.92rem;
}

.ad-placeholder-text {
  opacity: 0.75;
}

.posts-grid .ad-box {
  grid-column: 1 / -1;
  margin-top: 4px;
  margin-bottom: 4px;
}

.article-body .ad-box {
  margin: 28px 0;
}

@media (max-width: 720px) {
  .ad-box {
    min-height: 96px;
    padding: 16px;
  }
}
