/* ========================================
   AutoSector – Informativo Automotriz
   Stylesheet principal (mobile-first)
   ======================================== */

:root {
  --primary: #0d1b2a;
  --primary-light: #1b2d42;
  --accent: #c0392b;
  --accent-hover: #a93226;
  --secondary: #2980b9;
  --bg: #f4f6f8;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --radius: 8px;
  --radius-lg: 16px;
  --max-width: 1180px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }
a { color: var(--secondary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); text-decoration: underline; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }
strong { font-weight: 600; }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* ---- HEADER / NAV ---- */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none !important;
  color: var(--white) !important;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Nav toggle (mobile) */
.nav-toggle {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* Desktop nav */
.main-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--primary-light);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 999;
}
.main-nav.open { display: block; }
.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.main-nav a {
  display: block;
  color: #cbd5e1;
  text-decoration: none !important;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}
.main-nav a:hover,
.main-nav a.active {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .main-nav {
    display: flex !important;
    position: static;
    background: none;
    padding: 0;
    box-shadow: none;
    flex: 1;
    justify-content: flex-end;
  }
  .main-nav ul {
    flex-direction: row;
    gap: 0.2rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .main-nav a { font-size: 0.85rem; padding: 0.4rem 0.7rem; }
}

/* ---- DISCLAIMER BANNER ---- */
.disclaimer-banner {
  background: #fff8e1;
  border-bottom: 2px solid #f59e0b;
  padding: 0.75rem 0;
  font-size: 0.82rem;
  color: #78350f;
  text-align: center;
}
.disclaimer-banner strong { font-weight: 700; }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #1e3a5f 100%);
  color: var(--white);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E") repeat;
}
.hero-content { position: relative; z-index: 1; }
.hero-label {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero .lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #94a3b8;
  max-width: 680px;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(192,57,43,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

/* ---- MAIN CONTENT ---- */
main { flex: 1; padding: 3rem 0; }

/* ---- PAGE HEADER ---- */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 3rem 0 2.5rem;
}
.page-header h1 { color: var(--white); margin-bottom: 0.6rem; }
.page-header .lead { color: #94a3b8; font-size: 1.05rem; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #94a3b8;
}
.breadcrumb li + li::before { content: '›'; margin-right: 0.4rem; }
.breadcrumb a { color: #94a3b8; }
.breadcrumb a:hover { color: var(--white); }

/* ---- SECTION SPACING ---- */
.section { margin-bottom: 3rem; }
.section-title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--primary);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}
.section-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* ---- CARDS GRID ---- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 600px)  { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .cards-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--primary); }
.card p { font-size: 0.93rem; color: var(--text-muted); margin-bottom: 0; }
.card a { text-decoration: none !important; color: inherit; }
.card-link:hover .card { transform: translateY(-3px); box-shadow: var(--shadow); }
a.card-link { display: block; text-decoration: none !important; color: inherit; }
a.card-link h3 { color: var(--primary); }

/* ---- CONTENT PROSE ---- */
.prose h2 { color: var(--primary); margin: 2rem 0 0.75rem; }
.prose h3 { color: var(--primary); margin: 1.5rem 0 0.5rem; }
.prose p { margin-bottom: 1.1rem; }
.prose ul, .prose ol { margin-bottom: 1.1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1.25rem;
  background: #fef2f2;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-style: italic;
}

/* ---- INFO BOX ---- */
.info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.info-box.warning {
  background: #fff7ed;
  border-color: #fed7aa;
}
.info-box h4 { color: #1e40af; margin-bottom: 0.5rem; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }
.info-box.warning h4 { color: #c2410c; }
.info-box p { margin-bottom: 0; font-size: 0.93rem; }

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th { background: var(--primary); color: var(--white); padding: 0.75rem 1rem; text-align: left; font-weight: 600; }
td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
tr:nth-child(even) td { background: #f8fafc; }

/* ---- TIMELINE ---- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.6rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-year {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.4rem;
}
.timeline-item h3 { font-size: 1rem; margin-bottom: 0.3rem; color: var(--primary); }
.timeline-item p { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

/* ---- GLOSSARY ---- */
.glossary-list { list-style: none; padding: 0; }
.glossary-list dt {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
  margin-top: 1.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}
.glossary-list dd {
  padding: 0.5rem 0 0.5rem 1rem;
  color: var(--text);
  font-size: 0.93rem;
  margin-left: 0;
}

/* ---- FAQ ---- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.97rem;
  list-style: none;
  gap: 1rem;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform var(--transition);
}
details[open] .faq-question::after { content: '−'; }
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  background: var(--bg-card);
  font-size: 0.93rem;
  color: var(--text-muted);
}
.faq-answer p { margin-bottom: 0.5rem; }

/* ---- DISCLAIMER BOX ---- */
.disclaimer-box {
  background: #fff8e1;
  border: 2px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}
.disclaimer-box h2, .disclaimer-box h3 { color: #78350f; margin-bottom: 0.5rem; }
.disclaimer-box p { color: #78350f; font-size: 0.93rem; margin-bottom: 0.5rem; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--primary);
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 600px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-brand .site-logo { font-size: 1.1rem; margin-bottom: 0.75rem; display: inline-flex; }
.footer-brand p { font-size: 0.85rem; color: #64748b; line-height: 1.6; }
.footer-section h4 { color: var(--white); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.75rem; }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section li { margin-bottom: 0.35rem; }
.footer-section a { color: #64748b; font-size: 0.88rem; text-decoration: none !important; transition: color var(--transition); }
.footer-section a:hover { color: #94a3b8; }
.footer-disclaimer {
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #475569;
}

/* ---- STATS STRIP ---- */
.stats-strip {
  background: var(--primary);
  color: var(--white);
  padding: 2.5rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}
@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--accent); display: block; }
.stat-label { font-size: 0.82rem; color: #94a3b8; margin-top: 0.25rem; }

/* ---- HIGHLIGHT BAND ---- */
.highlight-band {
  background: linear-gradient(90deg, var(--accent) 0%, #e74c3c 100%);
  color: var(--white);
  padding: 2rem 0;
  text-align: center;
}
.highlight-band h2 { color: var(--white); font-size: clamp(1.2rem, 3vw, 1.75rem); margin-bottom: 0.5rem; }
.highlight-band p { color: rgba(255,255,255,0.85); font-size: 1rem; margin: 0; }

/* ---- UTILITIES ---- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.tag {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin: 0.15rem;
}
.tag.red { background: #fee2e2; color: #b91c1c; }
.tag.green { background: #dcfce7; color: #166534; }

/* ---- SKIP TO CONTENT (accessibility) ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 600;
  z-index: 9999;
}
.skip-link:focus { top: 0; }
