/* ── AutoInfo Chile — style.css ── */

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

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

:root {
  --clr-bg:        #f8fafc;
  --clr-bg-alt:    #ffffff;
  --clr-bg-card:   #ffffff;
  --clr-nav:       #0f172a;
  --clr-text:      #0f172a;
  --clr-muted:     #475569;
  --clr-border:    #e2e8f0;
  --clr-primary:   #1d4ed8;
  --clr-primary-l: #dbeafe;
  --clr-accent:    #0ea5e9;
  --clr-green:     #16a34a;
  --clr-green-l:   #dcfce7;
  --clr-orange:    #ea580c;
  --clr-red:       #dc2626;
  --clr-amber:     #d97706;
  --clr-teal:      #0d9488;
  --radius:        0.75rem;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
  --transition:    0.2s ease;
  --max-w:         1200px;
  --font:          'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); background: var(--clr-bg); color: var(--clr-text); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--clr-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--clr-accent); }
ul { list-style: none; }

/* ── Scroll Progress ── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
  z-index: 10000; transition: width 0.1s linear;
}

/* ── Navbar ── */
#navbar {
  position: fixed; top: 3px; left: 0; right: 0; z-index: 9000;
  background: var(--clr-nav); transition: box-shadow var(--transition);
}
#navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.4); }
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo { font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.nav-logo span { color: var(--clr-accent); }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  color: rgba(255,255,255,.75); font-size: .82rem; font-weight: 500;
  padding: .4rem .65rem; border-radius: .4rem; transition: all var(--transition);
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
#hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: .5rem;
}
#hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all .3s; }
#mobile-menu {
  display: none; background: var(--clr-nav); border-top: 1px solid rgba(255,255,255,.1);
}
#mobile-menu.open { display: block; }
#mobile-menu a {
  display: block; padding: .75rem 1.5rem; color: rgba(255,255,255,.8);
  font-size: .9rem; font-weight: 500; transition: all var(--transition);
}
#mobile-menu a:hover { color: #fff; background: rgba(255,255,255,.08); }

/* ── Back to top ── */
#back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 8000;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--clr-primary); color: #fff;
  border: none; cursor: pointer; font-size: 1.2rem;
  box-shadow: var(--shadow-md); opacity: 0; transform: translateY(12px);
  transition: opacity .3s, transform .3s;
  display: flex; align-items: center; justify-content: center;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { background: var(--clr-accent); }

/* ── Layout helpers ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-alt { background: var(--clr-bg-alt); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: .75rem; letter-spacing: -.02em; }
.section-header p { color: var(--clr-muted); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .9rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  margin-bottom: 1.25rem; letter-spacing: .02em; text-transform: uppercase;
}
.badge-blue { background: var(--clr-primary-l); color: var(--clr-primary); }
.badge-green { background: var(--clr-green-l); color: var(--clr-green); }
.badge-gray { background: #f1f5f9; color: var(--clr-muted); }
.badge-amber { background: #fef3c7; color: var(--clr-amber); }

/* ── Fade-in animation ── */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Card ── */
.card {
  background: var(--clr-bg-card); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.card-icon {
  width: 44px; height: 44px; border-radius: .6rem; display: flex;
  align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem;
}
.card-icon.blue { background: var(--clr-primary-l); }
.card-icon.green { background: var(--clr-green-l); }
.card-icon.orange { background: #ffedd5; }
.card-icon.teal { background: #ccfbf1; }
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.card p { color: var(--clr-muted); font-size: .93rem; line-height: 1.65; }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1.25rem; }

/* ── Hero ── */
#inicio {
  min-height: 100vh; display: flex; align-items: center;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 60%, #0f172a 100%);
  color: #fff; padding-top: 80px;
}
.hero-inner { max-width: var(--max-w); margin: 0 auto; padding: 4rem 1.5rem; text-align: center; }
.hero-disclaimer {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: .5rem; padding: .75rem 1.25rem; margin-bottom: 2.5rem;
  font-size: .88rem; color: rgba(255,255,255,.8); max-width: 700px;
}
.hero-disclaimer strong { color: #fff; }
.hero-title {
  font-size: clamp(2rem, 6vw, 3.75rem); font-weight: 900; letter-spacing: -.03em;
  line-height: 1.1; margin-bottom: 1.25rem;
}
.hero-title .highlight { color: var(--clr-accent); }
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(255,255,255,.75); max-width: 680px; margin: 0 auto 2.5rem; }
.info-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(14,165,233,.15); border: 1px solid rgba(14,165,233,.3);
  color: #7dd3fc; border-radius: 999px; padding: .4rem 1rem;
  font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 2rem;
}
.hero-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; margin-top: 3rem; max-width: 640px; margin-left: auto; margin-right: auto; }
@media(min-width:640px){ .hero-stats { grid-template-columns: repeat(4,1fr); } }
.stat-box {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 1.25rem .75rem; text-align: center;
}
.stat-number { font-size: 1.75rem; font-weight: 900; color: #fff; display: block; }
.stat-label { font-size: .78rem; color: rgba(255,255,255,.6); margin-top: .25rem; line-height: 1.3; }

/* ── Acerca de ── */
.about-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); }
.about-pillar {
  background: var(--clr-bg-card); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
}
.about-pillar .icon { font-size: 2rem; margin-bottom: 1rem; }
.about-pillar h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.about-pillar p { color: var(--clr-muted); font-size: .9rem; }

/* ── Tipos Vehículos ── */
.vehicle-card {
  background: var(--clr-bg-card); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.vehicle-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; display: flex; align-items: center; gap: .5rem; }
.vehicle-card .emoji { font-size: 1.5rem; }
.vehicle-card p { color: var(--clr-muted); font-size: .88rem; margin-bottom: 1rem; line-height: 1.6; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pros h4 { color: var(--clr-green); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4rem; }
.cons h4 { color: var(--clr-red); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4rem; }
.pros li, .cons li { font-size: .82rem; color: var(--clr-muted); margin-bottom: .2rem; padding-left: 1rem; position: relative; }
.pros li::before { content: '+'; position: absolute; left: 0; color: var(--clr-green); font-weight: 700; }
.cons li::before { content: '−'; position: absolute; left: 0; color: var(--clr-red); font-weight: 700; }

/* ── EV stat strip ── */
.ev-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.ev-stat {
  background: var(--clr-bg-card); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 1.25rem; text-align: center;
}
.ev-stat .val { font-size: 1.75rem; font-weight: 900; }
.ev-stat .lbl { font-size: .8rem; color: var(--clr-muted); margin-top: .2rem; }

/* ── Financing tabs content ── */
.finance-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
.finance-card {
  background: var(--clr-bg-card); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 1.5rem;
}
.finance-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.finance-card ul li {
  font-size: .88rem; color: var(--clr-muted); padding: .3rem 0 .3rem 1.2rem;
  border-bottom: 1px solid var(--clr-border); position: relative;
}
.finance-card ul li:last-child { border: none; }
.finance-card ul li::before { content: '→'; position: absolute; left: 0; color: var(--clr-primary); }
.tips-box {
  background: var(--clr-primary-l); border: 1px solid #bfdbfe;
  border-radius: var(--radius); padding: 1.5rem; margin-top: 2rem;
}
.tips-box h3 { font-size: 1rem; font-weight: 700; color: var(--clr-primary); margin-bottom: 1rem; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: .5rem; }
.tips-grid li { font-size: .88rem; color: #1e40af; padding-left: 1.2rem; position: relative; }
.tips-grid li::before { content: '✓'; position: absolute; left: 0; color: var(--clr-primary); font-weight: 700; }

/* ── Trámites ── */
.tramite {
  background: var(--clr-bg-card); border: 1px solid var(--clr-border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.tramite-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.5rem; background: #f8fafc; border-bottom: 1px solid var(--clr-border);
}
.tramite-num { font-size: 2rem; font-weight: 900; color: #cbd5e1; line-height: 1; }
.tramite-header h3 { font-size: 1.05rem; font-weight: 700; }
.tramite-body { padding: 1.25rem 1.5rem; }
.tramite-steps { counter-reset: step; margin-bottom: 1rem; }
.tramite-steps li {
  counter-increment: step; font-size: .88rem; color: var(--clr-muted);
  padding: .4rem 0 .4rem 2rem; border-bottom: 1px solid var(--clr-border);
  position: relative;
}
.tramite-steps li:last-child { border: none; }
.tramite-steps li::before {
  content: counter(step); position: absolute; left: 0;
  width: 20px; height: 20px; background: var(--clr-primary-l); color: var(--clr-primary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; top: .45rem;
}
.tramite-alert {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: .5rem;
  padding: .75rem 1rem; font-size: .83rem; color: #92400e; display: flex; gap: .5rem;
}
.tramite-alert::before { content: '⚠️'; flex-shrink: 0; }

/* ── Seguridad ── */
.seguridad-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.seg-stat {
  background: var(--clr-bg-card); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 1.25rem; text-align: center;
}
.seg-stat .val { font-size: 1.6rem; font-weight: 900; }
.seg-stat .lbl { font-size: .78rem; color: var(--clr-muted); margin-top: .3rem; }
.seg-card {
  background: var(--clr-bg-card); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 1.5rem;
}
.seg-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.seg-card li { font-size: .88rem; color: var(--clr-muted); padding: .3rem 0 .3rem 1.2rem; position: relative; border-bottom: 1px solid var(--clr-border); }
.seg-card li:last-child { border: none; }
.seg-card li::before { content: '→'; position: absolute; left: 0; color: var(--clr-primary); }

/* ── FAQ ── */
.faq-item { background: var(--clr-bg-card); border: 1px solid var(--clr-border); border-radius: var(--radius); margin-bottom: .75rem; overflow: hidden; }
.faq-question {
  width: 100%; text-align: left; padding: 1.1rem 1.5rem;
  background: none; border: none; cursor: pointer;
  font-size: .95rem; font-weight: 600; color: var(--clr-text);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: background var(--transition);
}
.faq-question:hover { background: #f8fafc; }
.faq-chevron { font-size: .8rem; color: var(--clr-muted); transition: transform .25s; flex-shrink: 0; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 1.5rem; font-size: .9rem; color: var(--clr-muted); line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 400px; padding: 1rem 1.5rem 1.25rem; border-top: 1px solid var(--clr-border); }

/* ── Glossary ── */
.gloss-search-wrap { max-width: 480px; margin: 0 auto 2rem; position: relative; }
.gloss-search-wrap::before { content: '🔍'; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
#gloss-search {
  width: 100%; padding: .75rem 1rem .75rem 2.75rem;
  border: 1px solid var(--clr-border); border-radius: var(--radius);
  font-size: .95rem; font-family: var(--font); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
#gloss-search:focus { border-color: var(--clr-primary); box-shadow: 0 0 0 3px rgba(29,78,216,.1); }
.gloss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1rem; }
.gloss-card {
  background: var(--clr-bg-card); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
}
.gloss-card dt { font-weight: 700; color: var(--clr-primary); font-size: .92rem; margin-bottom: .3rem; }
.gloss-card dd { font-size: .84rem; color: var(--clr-muted); line-height: 1.55; }
#gloss-empty { display: none; text-align: center; color: var(--clr-muted); padding: 2rem; }

/* ── Legal pages ── */
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-section { margin-bottom: 2rem; }
.legal-section h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.legal-section p { color: var(--clr-muted); font-size: .93rem; line-height: 1.7; }
.alert-box {
  display: flex; gap: .75rem; border-radius: var(--radius);
  padding: 1rem 1.25rem; font-size: .88rem; margin: 1.5rem 0;
}
.alert-amber { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-blue { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-green { background: var(--clr-green-l); border: 1px solid #86efac; color: #166534; }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.contact-card {
  background: var(--clr-bg-card); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
}
.contact-card .icon { font-size: 2rem; margin-bottom: .75rem; }
.contact-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.contact-card p { color: var(--clr-muted); font-size: .88rem; line-height: 1.5; }
.email-display {
  background: #f1f5f9; border: 1px solid var(--clr-border);
  border-radius: .5rem; padding: .5rem 1rem;
  font-family: monospace; font-size: .9rem; color: var(--clr-muted);
  display: inline-block; margin-top: .5rem;
}

/* ── Note text ── */
.note-text { font-size: .78rem; color: var(--clr-muted); text-align: center; margin-top: 2rem; font-style: italic; }

/* ── Sector highlight cards ── */
.sector-highlight {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  color: #fff; border-radius: var(--radius); padding: 2rem; text-align: center;
}
.sector-highlight .big-num { font-size: 2.5rem; font-weight: 900; color: var(--clr-accent); }
.sector-highlight p { color: rgba(255,255,255,.7); font-size: .9rem; margin-top: .5rem; }

/* ── Privacy items ── */
.privacy-item {
  display: flex; gap: 1rem; background: var(--clr-bg-card);
  border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 1.5rem;
  margin-bottom: 1rem;
}
.privacy-item .icon { font-size: 1.75rem; flex-shrink: 0; }
.privacy-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.privacy-item p { color: var(--clr-muted); font-size: .88rem; line-height: 1.65; }

/* ── Footer ── */
footer {
  background: var(--clr-nav); color: rgba(255,255,255,.7); padding: 3rem 0 1.5rem;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-brand h3 { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: .75rem; }
.footer-brand h3 span { color: var(--clr-accent); }
.footer-brand p { font-size: .85rem; line-height: 1.6; margin-bottom: 1rem; }
.footer-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(14,165,233,.15); border: 1px solid rgba(14,165,233,.3);
  color: #7dd3fc; border-radius: 999px; padding: .3rem .8rem;
  font-size: .78rem; font-weight: 600;
}
.footer-col h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: .75rem; }
.footer-col li { margin-bottom: .35rem; }
.footer-col a { color: rgba(255,255,255,.6); font-size: .85rem; transition: color var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem;
  text-align: center; font-size: .8rem;
}
.footer-bottom p { margin-bottom: .35rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  #hamburger { display: flex; }
  .section { padding: 3.5rem 0; }
  .footer-cols { grid-template-columns: 1fr; gap: 1.5rem; }
  .pros-cons { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
  .tramite-header { flex-direction: column; align-items: flex-start; gap: .5rem; }
}
@media (max-width: 480px) {
  .ev-stats, .seguridad-stats { grid-template-columns: 1fr 1fr; }
}
