
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --az: #1d4ed8;
  --az-hover: #1e40af;
  --az-light: #eff6ff;
  --verde: #15803d;
  --verde-light: #f0fdf4;
  --rojo: #dc2626;
  --rojo-light: #fef2f2;
  --naranja: #d97706;
  --naranja-light: #fffbeb;
  --gris1: #111827;
  --gris2: #374151;
  --gris3: #6b7280;
  --gris4: #9ca3af;
  --gris5: #e5e7eb;
  --gris6: #f9fafb;
  --blanco: #ffffff;
  --sombra: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --sombra-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --radio: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; font-size: 16px; line-height: 1.7; color: var(--gris1); background: var(--blanco); }
img { max-width: 100%; height: auto; display: block; }

/* ---- HEADER ---- */
.header {
  background: var(--gris1);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.1);
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 20px; height: 56px;
}
.logo {
  font-size: 1rem; font-weight: 700; color: #fff;
  text-decoration: none; letter-spacing: -.01em; white-space: nowrap; flex-shrink: 0;
}
.logo em { color: #60a5fa; font-style: normal; }

/* Nav desktop */
.nav {
  display: flex; align-items: center; gap: 2px;
  list-style: none; flex: 1; overflow: hidden;
}
.nav a {
  display: block; color: rgba(255,255,255,.75); text-decoration: none;
  font-size: .8rem; font-weight: 500; padding: 5px 10px; border-radius: 6px;
  white-space: nowrap; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav a.active { background: rgba(96,165,250,.2); color: #93c5fd; }

/* Hamburger - solo móvil */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.85); padding: 6px; margin-left: auto; flex-shrink: 0;
}
.hamburger svg { display: block; }

/* Menú móvil */
.nav-drawer {
  display: none; flex-direction: column;
  background: #1f2937; border-top: 1px solid rgba(255,255,255,.08);
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  color: rgba(255,255,255,.8); text-decoration: none; font-size: .9rem;
  font-weight: 500; padding: 13px 20px; border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .15s;
}
.nav-drawer a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-drawer a:last-child { border-bottom: none; }

/* ---- BREADCRUMB ---- */
.breadcrumb {
  background: var(--gris6); border-bottom: 1px solid var(--gris5);
  padding: 9px 20px; font-size: .78rem; color: var(--gris3);
}
.breadcrumb .bc-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--az); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--gris5); }

/* ---- HERO DEL ARTÍCULO ---- */
.article-hero {
  background: var(--gris1); padding: 36px 20px 44px;
  position: relative; overflow: hidden;
}
.article-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 24px; background: var(--blanco);
  clip-path: ellipse(70% 100% at 50% 100%);
}
.article-hero-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }

.hero-tag {
  display: inline-block; background: rgba(96,165,250,.15);
  border: 1px solid rgba(96,165,250,.3); color: #93c5fd;
  font-size: .72rem; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em;
}
.article-hero h1 {
  font-size: clamp(1.4rem, 4vw, 2.1rem); font-weight: 700;
  color: #fff; line-height: 1.25; margin-bottom: 14px;
}
.article-hero h1 span { color: #60a5fa; }
.hero-answer {
  background: rgba(255,255,255,.07); border-left: 3px solid #60a5fa;
  padding: 12px 16px; border-radius: 0 6px 6px 0;
  color: rgba(255,255,255,.88); font-size: .9rem; max-width: 680px; margin-bottom: 14px;
}
.hero-answer strong { color: #93c5fd; }
.hero-meta { font-size: .75rem; color: rgba(255,255,255,.4); }
.hero-meta span { margin: 0 6px; }

/* Chips de info */
.chips-bar {
  background: var(--gris6); border-bottom: 1px solid var(--gris5);
  padding: 8px 20px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.chips-bar-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; white-space: nowrap;
}
.chip-blue   { background: var(--az-light); color: var(--az); }
.chip-green  { background: var(--verde-light); color: var(--verde); }
.chip-orange { background: var(--naranja-light); color: var(--naranja); }
.chip-red    { background: var(--rojo-light); color: var(--rojo); }

/* ---- LAYOUT ARTÍCULO ---- */
.page-body { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.article-layout {
  display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: start;
}

/* ---- CONTENIDO ---- */
.article-content { padding: 32px 0; min-width: 0; }

.article-content h2 {
  font-size: 1.2rem; font-weight: 700; color: var(--gris1);
  margin: 36px 0 10px; padding-top: 4px;
  border-top: 1px solid var(--gris5);
}
.article-content h2:first-child { margin-top: 0; border-top: none; }
.article-content h3 { font-size: .97rem; font-weight: 600; color: var(--gris2); margin: 18px 0 6px; }
.article-content p  { margin-bottom: 14px; color: var(--gris2); }
.article-content strong { color: var(--gris1); font-weight: 600; }
.article-content ul,
.article-content ol { padding-left: 20px; color: var(--gris2); margin-bottom: 14px; }
.article-content li { margin-bottom: 5px; }
.article-content a  { color: var(--az); }

/* Índice */
.toc {
  background: var(--az-light); border: 1px solid #bfdbfe;
  border-radius: var(--radio); padding: 16px 18px; margin-bottom: 28px;
}
.toc-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--az); margin-bottom: 10px; }
.toc ol { padding-left: 16px; margin: 0; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--az); font-size: .85rem; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Alertas */
.alert {
  border-radius: 0 var(--radio) var(--radio) 0;
  padding: 12px 15px; margin: 16px 0; font-size: .87rem;
}
.alert-orange { background: var(--naranja-light); border-left: 3px solid var(--naranja); color: #92400e; }
.alert-green  { background: var(--verde-light);   border-left: 3px solid var(--verde);   color: #14532d; }
.alert-blue   { background: var(--az-light);      border-left: 3px solid var(--az);      color: #1e3a8a; }
.alert-red    { background: var(--rojo-light);    border-left: 3px solid var(--rojo);    color: #7f1d1d; }

/* Cards de método */
.method-card {
  border: 1px solid var(--gris5); border-radius: var(--radio);
  margin-bottom: 14px; overflow: hidden; box-shadow: var(--sombra);
}
.method-header {
  background: var(--gris1); padding: 12px 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.method-num {
  background: rgba(255,255,255,.15); color: #fff; font-weight: 700;
  font-size: .75rem; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.method-title { font-weight: 600; color: #fff; font-size: .9rem; flex: 1; min-width: 0; }
.badge { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.badge-easy   { background: #d1fae5; color: #065f46; }
.badge-medium { background: #fef3c7; color: #92400e; }
.badge-hard   { background: #fee2e2; color: #991b1b; }

.method-body { padding: 16px; background: #fff; }
.method-body .req { font-size: .82rem; color: var(--gris3); margin-bottom: 14px; padding: 8px 12px; background: var(--gris6); border-radius: 6px; }

/* Pasos */
.steps { list-style: none; padding: 0; counter-reset: s; }
.steps li {
  counter-increment: s; display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px solid var(--gris5); font-size: .87rem; color: var(--gris2);
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(s); background: var(--az); color: #fff; font-weight: 700;
  font-size: .7rem; min-width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
}

/* Tip */
.tip {
  border-radius: 0 6px 6px 0; padding: 9px 13px; margin: 12px 0; font-size: .84rem;
}
.tip-green { background: var(--verde-light); border-left: 3px solid var(--verde); color: #14532d; }
.tip-blue  { background: var(--az-light);    border-left: 3px solid var(--az);    color: #1e3a8a; }

/* Tabla comparativa */
.table-wrap { overflow-x: auto; margin: 16px 0; border-radius: var(--radio); box-shadow: var(--sombra); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .84rem; background: #fff; }
.table thead tr { background: var(--gris1); color: #fff; }
.table th { padding: 10px 14px; text-align: left; font-weight: 600; }
.table td { padding: 9px 14px; border-bottom: 1px solid var(--gris5); color: var(--gris2); }
.table tr:last-child td { border-bottom: none; }
.table tr:nth-child(even) { background: var(--gris6); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--gris5); padding: 14px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 600; color: var(--gris1); margin-bottom: 6px; font-size: .9rem; }
.faq-a { font-size: .87rem; color: var(--gris2); margin: 0; }

/* CTA */
.cta-box {
  background: var(--gris1); border-radius: var(--radio);
  padding: 28px 24px; text-align: center; margin: 36px 0;
}
.cta-box h3 { color: #fff; font-size: 1.1rem; margin-bottom: 8px; }
.cta-box p  { color: rgba(255,255,255,.65); font-size: .88rem; margin-bottom: 18px; }
.btn {
  display: inline-block; background: #60a5fa; color: #1e3a8a !important;
  font-weight: 700; font-size: .87rem; padding: 10px 22px;
  border-radius: 6px; text-decoration: none !important; transition: background .2s;
}
.btn:hover { background: #93c5fd; }

/* Modelos relacionados */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; margin: 14px 0; }
.related-card {
  border: 1px solid var(--gris5); border-radius: var(--radio);
  padding: 12px; text-decoration: none; display: block;
  background: var(--blanco); transition: border-color .15s, box-shadow .15s;
  box-shadow: var(--sombra);
}
.related-card:hover { border-color: var(--az); box-shadow: var(--sombra-md); }
.related-card .brand { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--az); margin-bottom: 3px; }
.related-card .model { font-size: .85rem; font-weight: 600; color: var(--gris1); margin-bottom: 2px; }
.related-card .spec  { font-size: .7rem; color: var(--gris3); }

/* ---- SIDEBAR ---- */
.sidebar { padding-top: 32px; min-width: 0; }
.sidebar-widget {
  border: 1px solid var(--gris5); border-radius: var(--radio);
  padding: 16px; margin-bottom: 14px; background: var(--blanco); box-shadow: var(--sombra);
}
.sidebar-widget h4 {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--gris3);
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--gris5);
}
.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar-widget li { border-bottom: 1px solid var(--gris5); }
.sidebar-widget li:last-child { border-bottom: none; }
.sidebar-widget a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0; font-size: .83rem; color: var(--gris2); text-decoration: none; transition: color .15s;
}
.sidebar-widget a:hover { color: var(--az); }
.sidebar-widget a .code { font-weight: 700; color: var(--az); min-width: 54px; font-size: .83rem; }
.sidebar-widget .desc { font-size: .75rem; color: var(--gris3); margin-top: 2px; }

.severity-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 6px; font-size: .83rem; font-weight: 600; width: 100%;
  margin-bottom: 8px;
}

/* ---- HOMEPAGE ---- */
.home-hero {
  background: var(--gris1); padding: 60px 20px 70px;
  text-align: center; position: relative; overflow: hidden;
}
.home-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 30px; background: var(--blanco);
  clip-path: ellipse(70% 100% at 50% 100%);
}
.home-hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 700; color: #fff;
  line-height: 1.2; max-width: 620px; margin: 0 auto 14px; position: relative; z-index: 1;
}
.home-hero h1 em { color: #60a5fa; font-style: normal; }
.home-hero p {
  color: rgba(255,255,255,.65); font-size: .97rem;
  max-width: 480px; margin: 0 auto 28px; position: relative; z-index: 1;
}
.home-hero .btn-main {
  display: inline-block; background: #60a5fa; color: #1e3a8a;
  font-weight: 700; font-size: .93rem; padding: 12px 28px;
  border-radius: 6px; text-decoration: none; position: relative; z-index: 1; transition: background .2s;
}
.home-hero .btn-main:hover { background: #93c5fd; }

.section { padding: 48px 20px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section h2 { font-size: 1.25rem; font-weight: 700; color: var(--gris1); margin-bottom: 6px; }
.section .sub { font-size: .87rem; color: var(--gris3); margin-bottom: 24px; }

.brands-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.brand-card {
  border: 1px solid var(--gris5); border-radius: var(--radio); padding: 18px;
  text-decoration: none; display: block; background: var(--blanco);
  transition: border-color .15s, box-shadow .15s; box-shadow: var(--sombra);
}
.brand-card:hover { border-color: var(--az); box-shadow: var(--sombra-md); }
.brand-card .icon { font-size: 1.7rem; margin-bottom: 8px; }
.brand-card h3 { font-size: .97rem; font-weight: 700; color: var(--gris1); margin-bottom: 4px; }
.brand-card p  { font-size: .78rem; color: var(--gris3); margin: 0; line-height: 1.5; }
.brand-card .count { display: inline-block; background: var(--az-light); color: var(--az); font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-top: 8px; }

/* ---- FOOTER ---- */
.footer {
  background: var(--gris1); color: rgba(255,255,255,.55);
  padding: 44px 20px 24px; margin-top: 0;
}
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-brand .footer-logo { font-size: 1rem; font-weight: 700; color: #fff; text-decoration: none; display: inline-block; margin-bottom: 10px; }
.footer-brand .footer-logo em { color: #60a5fa; font-style: normal; }
.footer-brand p { font-size: .82rem; line-height: 1.6; }
.footer-col h5 { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.35); margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .83rem; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1100px; margin: 0 auto; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .76rem; flex-wrap: wrap; gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,.5); text-decoration: none; }

/* ---- RESPONSIVE ---- */
@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { padding-top: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  /* Header: ocultar nav, mostrar hamburger */
  .nav { display: none; }
  .hamburger { display: flex; }

  /* Hero más compacto */
  .article-hero { padding: 26px 16px 36px; }
  .article-hero h1 { font-size: 1.3rem; }
  .hero-answer { font-size: .86rem; padding: 10px 13px; }

  /* Contenido */
  .page-body { padding: 0 16px; }
  .article-content { padding: 22px 0; }
  .article-content h2 { font-size: 1.1rem; margin: 28px 0 8px; }

  /* Sidebar: columna única */
  .sidebar { grid-template-columns: 1fr; }

  /* Método cards */
  .method-header { flex-wrap: wrap; gap: 6px; }
  .method-title { font-size: .86rem; }
  .method-body { padding: 13px; }
  .steps li { font-size: .84rem; }

  /* Grid relacionados: 2 cols */
  .related-grid { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Homepage */
  .home-hero { padding: 44px 16px 58px; }
  .brands-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .brand-card { padding: 14px; }
  .brand-card .icon { font-size: 1.4rem; }
  .brand-card h3 { font-size: .9rem; }

  /* Chips */
  .chips-bar { padding: 6px 16px; }
  .chips-bar-inner { flex-wrap: wrap; gap: 5px; }
  .chip { font-size: .68rem; padding: 3px 8px; }
}

@media (max-width: 380px) {
  .article-hero h1 { font-size: 1.2rem; }
  .related-grid { grid-template-columns: 1fr; }
  .brands-grid { grid-template-columns: 1fr; }
}
