/* ===== Cortesvial - Escuela de Conducción ===== */

:root{
  --green: #4CAF2F;
  --green-dark: #3C8F24;
  --green-light: #6BC94A;
  --black: #0d0f0d;
  --black-soft: #141614;
  --gray-bg: #f4f5f4;
  --gray-text: #6b6f6b;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --container: 1180px;
  font-size: 16px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color:var(--black);
  background:var(--white);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
h1,h2,h3{ font-family:'Poppins', sans-serif; margin:0; line-height:1.15; }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }
ul{ list-style:none; margin:0; padding:0; }
svg{ display:block; }

.container{ max-width:var(--container); margin:0 auto; padding:0 24px; }
.skip-link{ position:absolute; left:-999px; top:0; background:var(--green); color:#fff; padding:10px 16px; z-index:9999; }
.skip-link:focus{ left:8px; top:8px; }

.section-title{ font-size:clamp(1.5rem, 3vw, 2.1rem); font-weight:800; text-align:center; margin-bottom:44px; letter-spacing:.2px; }
.section-title.light{ color:#fff; }
.section-title.tight{ margin-bottom:8px; }
.section-hint{ text-align:center; font-size:.85rem; color:var(--gray-text); margin-top:0; margin-bottom:34px; }
.accent{ color:var(--green); }

/* ===== SCROLL REVEAL (progressive enhancement: only when JS + IO run) ===== */
.js .reveal{ opacity:0; transform:translateY(26px); transition:opacity .65s cubic-bezier(.2,.7,.3,1), transform .65s cubic-bezier(.2,.7,.3,1); }
.js .reveal.is-visible{ opacity:1; transform:none; }
.js .why-grid .why-item.reveal{ transition-delay:calc(var(--i, 0) * 70ms); }
.js .trust-grid .trust-item.reveal{ transition-delay:calc(var(--i, 0) * 70ms); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1 !important; transform:none !important; transition:none !important; }
  .hero-copy{ animation:none; }
  .cat-track, .testi-track, html{ scroll-behavior:auto; }
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  padding:13px 22px; border-radius:999px; font-weight:600; font-size:.92rem;
  border:none; cursor:pointer; transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space:nowrap;
}
.btn .ico{ width:18px; height:18px; flex-shrink:0; transition:transform .3s ease; }
.btn-whatsapp{ background:linear-gradient(135deg, var(--green-light), var(--green-dark)); color:#fff; box-shadow:0 6px 18px rgba(76,175,47,.35); }
.btn-whatsapp:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(76,175,47,.45); }
.btn-whatsapp:hover .ico{ transform:rotate(-8deg) scale(1.12); }
.btn-lg{ padding:16px 30px; font-size:1rem; }
.btn-sm{ width:100%; padding:11px 14px; font-size:.82rem; }
.btn-white{ background:#fff; color:var(--green-dark); }
.btn-white:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(0,0,0,.2); }

/* ===== HEADER ===== */
.site-header{
  position:sticky; top:0; z-index:500;
  background:var(--black);
  border-bottom:1px solid rgba(255,255,255,.06);
  transition:box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled{
  box-shadow:0 6px 24px rgba(0,0,0,.35);
  background:rgba(13,15,13,.97);
  backdrop-filter:saturate(140%) blur(8px);
}
.header-inner{ display:flex; align-items:center; gap:24px; height:78px; }
.brand{ display:flex; align-items:center; flex-shrink:0; }
.brand-logo{ height:44px; width:auto; display:block; }
.footer-logo{ height:64px; width:auto; display:block; border-radius:12px; }

.main-nav{ display:flex; align-items:center; gap:30px; margin-left:12px; flex:1; }
.nav-link{ color:#e7e7e7; font-size:.92rem; font-weight:500; padding:6px 2px; position:relative; }
.nav-link.active{ color:#fff; }
.nav-link.active::after{ content:''; position:absolute; left:0; right:0; bottom:-4px; height:2px; background:var(--green); border-radius:2px; }
.nav-link:hover{ color:#fff; }

.header-cta{ flex-shrink:0; }
.nav-toggle{ display:none; flex-direction:column; justify-content:center; gap:5px; width:36px; height:36px; background:none; border:none; cursor:pointer; padding:0; flex-shrink:0; }
.nav-toggle span{ display:block; height:2px; width:100%; background:#fff; border-radius:2px; transition:transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero{ position:relative; background:var(--black); color:#fff; overflow:hidden; padding-bottom:0; }
.hero-bg{
  position:absolute; inset:0; background-size:cover; background-position:center;
  opacity:.55; mask-image:linear-gradient(to right, transparent 0%, transparent 32%, black 62%);
  -webkit-mask-image:linear-gradient(to right, transparent 0%, transparent 32%, black 62%);
}
.hero-scrim{
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(13,15,13,.55) 0%, rgba(13,15,13,.75) 60%, var(--black) 100%),
             linear-gradient(90deg, var(--black) 0%, rgba(13,15,13,.55) 45%, transparent 75%);
}
.hero-glow{
  position:absolute; top:-10%; left:-8%; width:420px; height:420px; z-index:1; pointer-events:none;
  background:radial-gradient(circle, rgba(76,175,47,.35) 0%, rgba(76,175,47,0) 70%);
  filter:blur(10px);
}
.hero-inner{ position:relative; z-index:2; padding:72px 24px 60px; }
.hero-copy{ max-width:620px; animation:hero-in .8s cubic-bezier(.2,.7,.3,1) both; }
@keyframes hero-in{ from{ opacity:0; transform:translateY(22px); } to{ opacity:1; transform:none; } }
.hero h1{ font-size:clamp(2rem, 4.6vw, 3rem); font-weight:800; color:#fff; letter-spacing:.2px; }
.hero-desc{ margin-top:22px; font-size:1.02rem; color:#d7dad7; max-width:520px; line-height:1.6; }

.hero-features{ display:flex; flex-wrap:wrap; gap:26px; margin-top:30px; }
.hero-features li{ display:flex; align-items:center; gap:9px; font-size:.85rem; font-weight:500; color:#eee; }
.hero-features svg{ width:26px; height:26px; color:var(--green); flex-shrink:0; }

.hero-copy .btn-lg{ margin-top:32px; }
.hero-note{ display:block; margin-top:12px; font-size:.8rem; color:#9aa09a; }

.hero-strip{
  position:relative; z-index:2; background:linear-gradient(90deg, var(--black), var(--green-dark), var(--black));
  padding:12px 0; text-align:center;
}
.hero-strip span{ font-size:.78rem; letter-spacing:2px; font-weight:600; color:#fff; text-transform:uppercase; }

/* ===== CATEGORIES ===== */
.categories{ padding:88px 0; background:#fff; }

.cat-carousel{ display:flex; align-items:center; gap:12px; }
.cat-track{
  display:flex; gap:18px; overflow-x:auto; scroll-snap-type:x proximity; scroll-behavior:smooth;
  padding:6px 2px 18px; flex:1; min-width:0;
  -webkit-overflow-scrolling:touch; scrollbar-width:thin; scrollbar-color:var(--green) transparent;
}
.cat-track::-webkit-scrollbar{ height:6px; }
.cat-track::-webkit-scrollbar-thumb{ background:#d8ddd8; border-radius:4px; }
.cat-track::-webkit-scrollbar-thumb:hover{ background:var(--green); }

.cat-card{
  background:#fff; border:1px solid #ececec; border-radius:var(--radius); padding:20px 16px 18px;
  box-shadow:var(--shadow); display:flex; flex-direction:column; align-items:center; text-align:center;
  transition:transform .25s ease, box-shadow .25s ease;
  flex:0 0 auto; width:200px; scroll-snap-align:start;
}
.cat-card:hover{ transform:translateY(-6px); box-shadow:0 18px 36px rgba(0,0,0,.14); }
.cat-label{ font-size:.68rem; letter-spacing:1.5px; color:var(--gray-text); font-weight:600; text-transform:uppercase; }
.cat-code{ font-size:1.7rem; font-weight:900; color:var(--green); font-family:'Poppins',sans-serif; margin-top:2px; }
.cat-code-sm{ font-size:1.05rem; }
.cat-img{ width:100%; aspect-ratio:6/4.2; border-radius:10px; overflow:hidden; margin:14px 0 12px; background:var(--gray-bg); }
.cat-img img{ width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.cat-card:hover .cat-img img{ transform:scale(1.09); }
.cat-img-icon{ display:flex; align-items:center; justify-content:center; }
.cat-img-icon svg{ width:56%; height:56%; }
.cat-desc{ font-size:.76rem; font-weight:700; letter-spacing:.3px; text-transform:uppercase; color:var(--black); min-height:32px; margin-bottom:14px; }

/* shared carousel arrows (categories + testimonials) */
.cat-arrow{
  flex-shrink:0; width:44px; height:44px; border-radius:50%; border:1.5px solid #e2e2e2; background:#fff;
  color:var(--black); display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition:background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.cat-arrow svg{ width:20px; height:20px; }
.cat-arrow:hover{ background:var(--green); border-color:var(--green); color:#fff; }
.cat-arrow:active{ transform:scale(.93); }
.cat-arrow[disabled]{ opacity:.35; cursor:default; pointer-events:none; }

.cat-dots, .testi-dots{ display:flex; justify-content:center; gap:8px; margin-top:14px; }
.cat-dots button, .testi-dots button{ width:8px; height:8px; border-radius:50%; border:none; background:#d3d6d3; padding:0; cursor:pointer; transition:width .2s ease, background .2s ease; }
.cat-dots button.active, .testi-dots button.active{ background:var(--green); width:22px; border-radius:4px; }

/* ===== WHY ===== */
.why{ background:var(--black); padding:70px 0; }
.why-grid{ display:grid; grid-template-columns:repeat(6,1fr); }
.why-item{
  display:flex; flex-direction:column; align-items:center; gap:14px; text-align:center; color:#fff;
  padding:0 16px; border-right:1px solid rgba(255,255,255,.12);
}
.why-item:last-child{ border-right:none; }
.why-item svg{ width:38px; height:38px; color:var(--green); }
.why-item p{ font-size:.85rem; line-height:1.4; }

/* ===== STEPS ===== */
.steps{ padding:90px 0; background:#fff; }
.steps-row{ display:flex; align-items:flex-start; justify-content:center; gap:14px; }
.step{ flex:1; max-width:300px; text-align:center; display:flex; flex-direction:column; align-items:center; }
.step-num{
  width:38px; height:38px; border-radius:50%; background:var(--green); color:#fff; font-weight:800;
  display:flex; align-items:center; justify-content:center; margin-bottom:14px; font-family:'Poppins',sans-serif;
}
.step svg{ width:64px; height:64px; margin-bottom:14px; }
.step h3{ font-size:1.05rem; font-weight:800; text-transform:uppercase; margin-bottom:10px; letter-spacing:.4px; }
.step p{ font-size:.87rem; color:var(--gray-text); line-height:1.55; }
.step-connector{ width:90px; height:24px; margin-top:38px; flex-shrink:0; }

/* ===== TESTIMONIALS ===== */
.testimonials{ background:var(--gray-bg); padding:90px 0; }
.testi-carousel{ display:flex; align-items:center; gap:12px; }
.testi-track{
  display:flex; gap:24px; overflow-x:auto; scroll-snap-type:x proximity; scroll-behavior:smooth;
  flex:1; min-width:0; padding:4px 2px 10px; -webkit-overflow-scrolling:touch;
  scrollbar-width:thin; scrollbar-color:var(--green) transparent;
}
.testi-track::-webkit-scrollbar{ height:6px; }
.testi-track::-webkit-scrollbar-thumb{ background:#d8ddd8; border-radius:4px; }
.testi-card{
  background:#fff; border-radius:var(--radius); padding:28px 26px; box-shadow:var(--shadow);
  flex:0 0 auto; width:340px; scroll-snap-align:start;
  transition:transform .25s ease, box-shadow .25s ease;
}
.testi-card:hover{ transform:translateY(-5px); box-shadow:0 16px 34px rgba(0,0,0,.1); }
.testi-card .quote{ width:30px; height:30px; margin-bottom:10px; }
.testi-text{ font-size:.92rem; color:#333; line-height:1.6; min-height:80px; }
.stars{ color:#f5b301; letter-spacing:2px; margin:14px 0; font-size:.95rem; }
.testi-person{ display:flex; align-items:center; gap:12px; }
.testi-person img{ width:48px; height:48px; border-radius:50%; object-fit:cover; }
.testi-person strong{ display:block; font-size:.9rem; }
.testi-person span{ font-size:.78rem; color:var(--gray-text); }

/* ===== CTA BAND ===== */
.cta-band{ background:linear-gradient(120deg, var(--green-dark), var(--green)); position:relative; overflow:hidden; }
.cta-inner{ display:flex; align-items:center; justify-content:space-between; gap:40px; padding:64px 24px; }
.cta-copy{ color:#fff; max-width:520px; }
.cta-copy h2{ font-size:clamp(1.5rem,3vw,2.1rem); font-weight:800; }
.cta-copy h2 span{ color:var(--black); }
.cta-copy p{ margin-top:16px; font-size:.98rem; color:rgba(255,255,255,.92); line-height:1.6; }
.cta-copy .btn{ margin-top:26px; }
.cta-photo{ width:280px; height:280px; border-radius:50%; overflow:hidden; flex-shrink:0; border:6px solid rgba(255,255,255,.35); }
.cta-photo img{ width:100%; height:100%; object-fit:cover; }

/* ===== TRUST STRIP ===== */
.trust-strip{ background:#fff; border-top:1px solid #eee; border-bottom:1px solid #eee; padding:30px 0; }
.trust-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.trust-item{ display:flex; align-items:center; gap:10px; font-size:.82rem; font-weight:600; color:var(--black); justify-content:center; text-align:center; }
.trust-item svg{ width:26px; height:26px; flex-shrink:0; }

/* ===== FOOTER ===== */
.site-footer{ background:var(--black); color:#fff; padding-top:44px; }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; padding-bottom:36px; }
.footer-brand{ }
.footer-label{ display:block; font-size:.68rem; letter-spacing:2px; text-transform:uppercase; color:#9aa09a; margin-bottom:10px; }
.social-icons{ display:flex; gap:12px; }
.social-icons a{ width:36px; height:36px; border-radius:50%; border:1px solid rgba(255,255,255,.25); display:flex; align-items:center; justify-content:center; color:#fff; transition:background .15s ease, border-color .15s ease; }
.social-icons a:hover{ background:var(--green); border-color:var(--green); }
.social-icons svg{ width:17px; height:17px; }
.footer-contact{ text-align:right; }
.footer-whatsapp{ display:flex; align-items:center; gap:8px; font-weight:700; font-size:1rem; justify-content:flex-end; }
.footer-whatsapp .ico{ width:20px; height:20px; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.1); padding:18px 0; }
.footer-bottom p{ font-size:.78rem; color:#9aa09a; text-align:center; }
.footer-bottom a{ color:var(--green); font-weight:600; }
.footer-bottom a:hover{ text-decoration:underline; }

/* ===== FLOATING WHATSAPP ===== */
.wa-float{ position:fixed; right:20px; bottom:20px; z-index:600; }
.wa-float a{
  width:56px; height:56px; border-radius:50%; background:var(--green); color:#fff; display:flex;
  align-items:center; justify-content:center; box-shadow:0 8px 22px rgba(76,175,47,.5);
  animation:wa-pulse 2.4s ease-in-out infinite;
}
.wa-float svg{ width:28px; height:28px; }
@keyframes wa-pulse{ 0%,100%{ transform:scale(1);} 50%{ transform:scale(1.08);} }

/* ===== PWA INSTALL POPUP ===== */
.pwa-install{
  position:fixed; top:14px; left:50%; transform:translateX(-50%) translateY(-140%);
  z-index:800; display:flex; align-items:center; gap:12px;
  background:rgba(13,15,13,.97); color:#fff; border:1px solid rgba(255,255,255,.1);
  border-radius:16px; padding:10px 14px; box-shadow:0 14px 34px rgba(0,0,0,.35);
  backdrop-filter:saturate(140%) blur(8px);
  max-width:min(92vw, 400px);
  transition:transform .4s cubic-bezier(.2,.8,.3,1), opacity .4s ease;
  opacity:0;
}
.pwa-install.show{ transform:translateX(-50%) translateY(0); opacity:1; }
.pwa-install[hidden]{ display:flex; }
.pwa-icon{ width:38px; height:38px; border-radius:10px; flex-shrink:0; object-fit:cover; }
.pwa-text{ display:flex; flex-direction:column; line-height:1.3; flex:1; min-width:0; }
.pwa-text strong{ font-size:.85rem; font-weight:700; }
.pwa-text span{ font-size:.72rem; color:#b7bdb7; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pwa-btn{
  background:var(--green); color:#fff; border:none; border-radius:999px; padding:8px 16px;
  font-size:.78rem; font-weight:700; cursor:pointer; flex-shrink:0; transition:background .15s ease, transform .15s ease;
}
.pwa-btn:hover{ background:var(--green-light); transform:translateY(-1px); }
.pwa-close{
  position:absolute; top:-8px; right:-8px; width:22px; height:22px; border-radius:50%;
  background:#fff; color:var(--black); border:none; font-size:15px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(0,0,0,.3);
}
@media (max-width:480px){
  .pwa-install{ left:12px; right:12px; transform:translateX(0) translateY(-140%); max-width:none; }
  .pwa-install.show{ transform:translateX(0) translateY(0); }
}

/* ===================================================== */
/* RESPONSIVE                                             */
/* ===================================================== */
@media (max-width:1100px){
  .why-grid{ grid-template-columns:repeat(3,1fr); row-gap:32px; }
  .why-item{ border-right:1px solid rgba(255,255,255,.12); }
  .why-item:nth-child(3){ border-right:none; }
  .why-item:nth-child(6){ border-right:none; }
}

@media (max-width:900px){
  .main-nav{ display:none; }
  .nav-toggle{ display:flex; }
  .header-cta{ display:none; }
  .header-inner{ height:68px; }

  .site-header.nav-open .main-nav{
    display:flex; position:absolute; top:68px; left:0; right:0; background:var(--black);
    flex-direction:column; padding:18px 24px 26px; gap:16px; border-top:1px solid rgba(255,255,255,.08);
  }
  .site-header.nav-open .nav-link{ font-size:1rem; }

  .hero-bg{ opacity:.35; mask-image:linear-gradient(to bottom, transparent 0%, black 55%); -webkit-mask-image:linear-gradient(to bottom, transparent 0%, black 55%); }
  .hero-scrim{ background:linear-gradient(180deg, rgba(13,15,13,.5) 0%, rgba(13,15,13,.85) 50%, var(--black) 100%); }
  .hero-inner{ padding:44px 20px 40px; }
  .hero-features{ gap:16px 22px; }

  .steps-row{ flex-direction:column; align-items:center; gap:12px; }
  .step-connector{ width:2px; height:36px; transform:rotate(90deg); margin:0; }

  .cat-card{ width:170px; }
  .testi-card{ width:82vw; max-width:360px; }

  .cta-inner{ flex-direction:column; text-align:center; padding:50px 20px; }
  .cta-copy{ max-width:100%; }
  .cta-photo{ width:220px; height:220px; }

  .footer-inner{ flex-direction:column; text-align:center; }
  .footer-contact{ text-align:center; }
  .footer-whatsapp{ justify-content:center; }
}

@media (max-width:680px){
  :root{ font-size:15px; }
  .container{ padding:0 18px; }
  .why-grid{ grid-template-columns:repeat(2,1fr); }
  .why-item{ border-right:none !important; border-bottom:1px solid rgba(255,255,255,.12); padding-bottom:24px; }
  .why-item:nth-last-child(-n+2){ border-bottom:none; }
  .trust-grid{ grid-template-columns:repeat(2,1fr); }
  .hero-features{ flex-direction:column; align-items:flex-start; gap:12px; }
  .categories, .why, .steps, .testimonials{ padding:56px 0; }
  .cta-photo{ width:180px; height:180px; }
  .section-title{ margin-bottom:28px; }
  .section-title.tight{ margin-bottom:8px; }
  .section-hint{ margin-bottom:28px; }

  .cat-arrow, .testi-carousel > .cat-arrow{ width:38px; height:38px; }
  .cat-arrow svg{ width:17px; height:17px; }
}

@media (max-width:420px){
  .cat-card{ width:150px; padding:16px 10px 14px; }
  .brand-logo{ height:36px; }
}
