/* ── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: #1a1a2e; background: #fff; line-height: 1.6; font-size: 16px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Variables ────────────────────────────────────────────────────────── */
:root {
  --primary: #1a1a2e;
  --accent:  #f59e0b;
  --accent2: #3b82f6;
  --gray:    #f8fafc;
  --gray2:   #e2e8f0;
  --text:    #374151;
  --muted:   #64748b;
  --radius:  12px;
  --shadow:  0 2px 12px rgba(0,0,0,.08);
}

/* ── Container ────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Header ───────────────────────────────────────────────────────────── */
.header { background: var(--primary); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 800; font-size: 1.25rem; }
.logo-icon { font-size: 1.4rem; }
.nav { display: flex; gap: 1.5rem; }
.nav a { color: rgba(255,255,255,.8); font-weight: 500; font-size: .9rem; transition: color .2s; }
.nav a:hover { color: var(--accent); }
.menu-btn { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%); color: #fff; padding: 5rem 1.25rem 4rem; text-align: center; }
.hero-badge { display: inline-block; background: rgba(245,158,11,.2); color: var(--accent); border: 1px solid rgba(245,158,11,.4); padding: .35rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.2; max-width: 700px; margin: 0 auto 1.25rem; }
.hero h1 .accent { color: var(--accent); }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,.75); max-width: 520px; margin: 0 auto 2.5rem; }
.hero-stats { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat strong { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat span { font-size: .85rem; color: rgba(255,255,255,.6); }

/* ── Sections ─────────────────────────────────────────────────────────── */
.section { padding: 4rem 1.25rem; }
.section-gray { background: var(--gray); }
.section-title { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; color: var(--primary); }
.section-sub { color: var(--muted); margin-bottom: 2.5rem; }

/* ── Tabla Top Hostings ───────────────────────────────────────────────── */
.tabla-top { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 1.5rem; }
.tabla-top table { width: 100%; border-collapse: collapse; background: #fff; }
.tabla-top th { background: var(--primary); color: #fff; padding: 1rem 1.25rem; text-align: left; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.tabla-top td { padding: .9rem 1.25rem; border-bottom: 1px solid var(--gray2); font-size: .95rem; }
.tabla-top tr:last-child td { border-bottom: none; }
.tabla-top tr:hover td { background: #fffbeb; }
.precio { font-weight: 700; color: var(--accent2); }
.badge-descuento { background: #dcfce7; color: #16a34a; font-size: .8rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; }
.btn-sm { background: var(--accent); color: var(--primary); font-weight: 700; font-size: .85rem; padding: .45rem 1rem; border-radius: 8px; white-space: nowrap; transition: background .2s; }
.btn-sm:hover { background: #d97706; }

/* ── Cards Grid ───────────────────────────────────────────────────────── */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card { background: #fff; border: 1px solid var(--gray2); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.card h3 { font-size: 1rem; font-weight: 700; color: var(--primary); line-height: 1.4; }
.card p { font-size: .9rem; color: var(--muted); flex: 1; }
.card-link { font-size: .85rem; font-weight: 600; color: var(--accent2); margin-top: auto; }

/* Card tipo badges */
.card-tipo { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: .2rem .55rem; border-radius: 999px; width: fit-content; }
.card-tipo.ranking { background: #fef3c7; color: #92400e; }
.card-tipo.review  { background: #dbeafe; color: #1d4ed8; }
.card-tipo.vs      { background: #fce7f3; color: #9d174d; }
.card-tipo.guia    { background: #dcfce7; color: #15803d; }
.card-tipo.wordpress { background: #ede9fe; color: #6d28d9; }
.card-tipo.ecommerce { background: #ffedd5; color: #c2410c; }

/* ── CTA Banner ───────────────────────────────────────────────────────── */
.cta-banner { background: linear-gradient(135deg, #1a1a2e, #0f3460); color: #fff; padding: 4rem 1.25rem; text-align: center; }
.cta-banner h2 { font-size: 2rem; font-weight: 800; margin-bottom: .75rem; }
.cta-banner p { color: rgba(255,255,255,.75); margin-bottom: 2rem; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary { background: var(--accent); color: var(--primary); font-weight: 700; padding: .75rem 1.75rem; border-radius: 10px; transition: background .2s; }
.btn-primary:hover { background: #d97706; }
.btn-secondary { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.3); font-weight: 600; padding: .75rem 1.75rem; border-radius: 10px; transition: background .2s; }
.btn-secondary:hover { background: rgba(255,255,255,.2); }

/* ── Artículo layout ──────────────────────────────────────────────────── */
.articulo-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; padding: 2.5rem 1.25rem; align-items: start; }
.articulo-main { min-width: 0; }
.articulo-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.cat-tag { background: var(--gray); color: var(--muted); font-size: .8rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; text-transform: uppercase; }
.art-fecha { font-size: .85rem; color: var(--muted); }
.articulo-main h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.3; margin-bottom: 1rem; }
.articulo-extracto { font-size: 1.1rem; color: var(--muted); border-left: 4px solid var(--accent); padding-left: 1rem; margin-bottom: 2rem; }
.disclaimer { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 1rem 1.25rem; font-size: .85rem; color: #92400e; margin-top: 2rem; }

/* Sidebar */
.articulo-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-card { background: var(--gray); border-radius: var(--radius); padding: 1.25rem; }
.sidebar-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--accent); }
.sidebar-hosting { display: flex; flex-direction: column; gap: .3rem; padding: .75rem 0; border-bottom: 1px solid var(--gray2); }
.sidebar-hosting:last-child { border-bottom: none; }
.sidebar-hosting strong { font-size: .95rem; }
.sidebar-precio { font-size: .8rem; color: var(--muted); }
.sidebar-btn { background: var(--accent); color: var(--primary); font-weight: 700; font-size: .82rem; padding: .35rem .8rem; border-radius: 6px; width: fit-content; margin-top: .25rem; }
.sidebar-related { display: flex; flex-direction: column; gap: .3rem; padding: .65rem 0; border-bottom: 1px solid var(--gray2); font-size: .88rem; font-weight: 500; color: var(--text); }
.sidebar-related:last-child { border-bottom: none; }
.sidebar-related:hover { color: var(--accent2); }

/* ── Page header ──────────────────────────────────────────────────────── */
.page-header { padding: 2.5rem 0 1.5rem; border-bottom: 1px solid var(--gray2); margin-bottom: 2rem; }
.page-header h1 { font-size: 2rem; font-weight: 800; }
.page-header p { color: var(--muted); margin-top: .35rem; }

/* ── Paginacion ───────────────────────────────────────────────────────── */
.paginacion { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 2.5rem 0; }
.paginacion span { color: var(--muted); font-size: .9rem; }

/* ── Empty state ──────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty-state p { margin-bottom: 1.5rem; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer { background: var(--primary); color: rgba(255,255,255,.8); padding: 3.5rem 1.25rem 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer-brand .logo { color: #fff; margin-bottom: .75rem; display: inline-flex; }
.footer-brand p { font-size: .9rem; color: rgba(255,255,255,.55); max-width: 280px; }
.footer-links h4 { color: #fff; font-size: .9rem; font-weight: 700; margin-bottom: 1rem; }
.footer-links a { display: block; color: rgba(255,255,255,.6); font-size: .88rem; margin-bottom: .5rem; transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0; }
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.4); text-align: center; }

/* ── Card imagen ──────────────────────────────────────────────────────── */
.card-img { width:100%; height:180px; object-fit:cover; border-radius:8px; margin-bottom:.25rem; }

/* ── Header search ────────────────────────────────────────────────────── */
.header-search { display:flex; align-items:center; gap:.35rem; }
.header-search input { background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.25); color:#fff; border-radius:8px; padding:.4rem .75rem; font-size:.85rem; width:160px; transition:width .3s, background .2s; }
.header-search input::placeholder { color:rgba(255,255,255,.5); }
.header-search input:focus { outline:none; width:210px; background:rgba(255,255,255,.2); }
.header-search button { background:none; border:none; color:rgba(255,255,255,.8); cursor:pointer; font-size:1rem; padding:.3rem; }
.header-search button:hover { color:var(--accent); }

/* ── Buscar page ──────────────────────────────────────────────────────── */
.buscar-form { display:flex; gap:.75rem; max-width:560px; margin:1.5rem 0 0; }
.buscar-form input { flex:1; border:1px solid var(--gray2); border-radius:10px; padding:.65rem 1rem; font-size:1rem; font-family:inherit; }
.buscar-form input:focus { outline:none; border-color:var(--accent2); }

/* ── AdSense slots ────────────────────────────────────────────────────── */
.adsense-slot { margin:2rem 0; text-align:center; min-height:90px; background:var(--gray); border-radius:8px; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .articulo-layout { grid-template-columns: 1fr; }
  .articulo-sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--primary); padding: 1rem 1.25rem; gap: 1rem; }
  .nav.open { display: flex; }
  .menu-btn { display: block; }
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .hero-stats { gap: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .tabla-top th, .tabla-top td { padding: .65rem .75rem; font-size: .85rem; }
}
