/* ==========================================================================
   Farmcart Driving School — Design System
   Flat, minimal, 8px spacing scale. No gradients. No emoji icons.
   ========================================================================== */

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

:root {
  /* Color: flat, high-contrast, professional */
  --ink-900: #0e1520;
  --ink-800: #1b2430;
  --ink-700: #2c3646;
  --ink-500: #5b6675;
  --ink-300: #98a2b0;
  --ink-150: #d8dde3;
  --ink-100: #e9ecf0;
  --bg: #f5f5f3;
  --bg-soft: #f5f6f8;
  --bg-tint: #eef3f5;

  --primary-900: #0d2f42;
  --primary-700: #124a63;
  --primary-600: #165b79;
  --primary-500: #1b7093;
  --primary-100: #e4eef2;

  --accent-700: #055f3a;
  --accent-600: #055530;
  --accent-500: #006935;
  --accent-100: #fbead9;

  --success-600: #276749;
  --success-100: #e4f1ea;

  --line: rgba(14, 21, 32, 0.1);
  --shadow-sm: 0 1px 2px rgba(14, 21, 32, 0.06);
  --shadow-md: 0 8px 24px rgba(14, 21, 32, 0.08);
  --shadow-lg: 0 24px 48px rgba(14, 21, 32, 0.14);

  /* 8px spacing system */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;
  --sp-8: 96px;
  --sp-9: 128px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
  --dur-med: 320ms;
  --dur-slow: 560ms;

  --container: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body, h1, h2, h3, h4, p, figure, ul, ol, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

body {
  font-family: var(--font-body);
  color: var(--ink-800);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-900); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 1.7rem + 2.6vw, 3.75rem); font-weight: 500; }
h2 { font-size: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-600);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.lede { font-size: 1.125rem; color: var(--ink-700); line-height: 1.65; }
.muted { color: var(--ink-500); }
.text-sm { font-size: 0.875rem; }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-4); }
@media (min-width: 640px) { .container { padding-inline: var(--sp-6); } }

.section { padding-block: var(--sp-8); }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }
.section-head { max-width: 640px; margin-bottom: var(--sp-6); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head > .eyebrow { margin-bottom: var(--sp-3); }
.section-head > h2 { margin-bottom: var(--sp-3); }

.stack { display: flex; flex-direction: column; }
.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-600); color: #fff; }
.btn-primary:hover { background: var(--accent-700); box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Attention-drawing CTA pulse (hero primary action) */
.cta-pulse { position: relative; animation: cta-breathe 2.6s ease-in-out infinite; }
.cta-pulse::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(5, 85, 48, 0.45);
  animation: cta-ring 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes cta-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2px) scale(1.015); } }
@keyframes cta-ring { 0% { box-shadow: 0 0 0 0 rgba(5, 85, 48, 0.45); opacity: 1; } 80% { box-shadow: 0 0 0 14px rgba(5, 85, 48, 0); opacity: 0; } 100% { box-shadow: 0 0 0 14px rgba(5, 85, 48, 0); opacity: 0; } }
.cta-pulse:hover { animation-play-state: paused; }
.cta-pulse:hover::after { animation-play-state: paused; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .cta-pulse, .cta-pulse::after { animation: none; }
}
.btn-secondary { background: var(--primary-900); color: #fff; }
.btn-secondary:hover { background: var(--ink-900); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--primary-900); border: 1.5px solid var(--ink-150); }
.btn-ghost:hover { border-color: var(--primary-600); background: var(--primary-100); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 30px; font-size: 1rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  color: var(--primary-700);
  position: relative;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-med) var(--ease);
}
.link-arrow:hover::after { transform: scaleX(1); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}
.site-header.scrolled { background: rgba(255,255,255,0.98); border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: var(--sp-4); }
.brand { display: flex; align-items: center; gap: var(--sp-3); font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: var(--ink-900); }
.brand .mark {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--primary-900); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
}
.brand-logo { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.footer-brand .brand-logo { width: 48px; height: 48px; }
.lang-modal-logo { width: 56px; height: 56px; margin: 0 auto var(--sp-4); }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.6875rem; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.06em; }

.nav-primary { display: none; }
.nav-primary ul { display: flex; align-items: center; gap: var(--sp-5); }
.nav-primary a, .nav-primary button.nav-toggle-drop {
  font-size: 0.9375rem; font-weight: 500; color: var(--ink-700);
  padding: var(--sp-2) 0; position: relative;
  display: inline-flex; align-items: center; gap: 4px;
}
.nav-primary a:hover, .nav-primary a.active, .nav-primary button.nav-toggle-drop:hover { color: var(--primary-700); }
.nav-primary a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--accent-600); transform: scaleX(0); transition: transform var(--dur-fast) var(--ease);
}
.nav-primary a:hover::after, .nav-primary a.active::after { transform: scaleX(1); }

.nav-item-drop { position: relative; }
.nav-dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(6px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--sp-2); min-width: 240px;
  opacity: 0; visibility: hidden; transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility var(--dur-fast);
}
.nav-item-drop:hover .nav-dropdown,
.nav-item-drop:focus-within .nav-dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown a { display: block; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--ink-700); }
.nav-dropdown a:hover { background: var(--bg-soft); color: var(--primary-700); }

.header-actions { display: flex; align-items: center; gap: var(--sp-3); }
.lang-switch { display: flex; align-items: center; border: 1px solid var(--ink-150); border-radius: 999px; padding: 3px; }
.lang-switch button { padding: 6px 14px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-500); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.lang-switch button.active { background: var(--primary-900); color: #fff; }

.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--ink-150); }
.menu-toggle svg { width: 20px; height: 20px; }
.header-register-btn { display: none; }
@media (min-width: 1000px) {
  .nav-primary { display: block; }
  .menu-toggle { display: none; }
  .header-register-btn { display: inline-flex; }
}

/* Mobile nav */
.mobile-nav {
  position: fixed; inset: 0; z-index: 50; background: #fff;
  transform: translateX(100%); transition: transform var(--dur-med) var(--ease);
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-4); border-bottom: 1px solid var(--line); }
.mobile-nav ul { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-1); }
.mobile-nav a, .mobile-nav .mobile-sub-toggle { display: flex; align-items: center; justify-content: space-between; padding: 16px var(--sp-2); font-size: 1.0625rem; font-weight: 500; border-bottom: 1px solid var(--ink-100); }
.mobile-nav .sub-list { padding-left: var(--sp-4); display: none; }
.mobile-nav .sub-list.open { display: block; }
@media (min-width: 1000px) { .mobile-nav { display: none; } }
.mobile-nav .mobile-nav-register {
  margin-top: var(--sp-3); padding: 16px var(--sp-3); border-bottom: none;
  background: var(--accent-600); color: #fff; border-radius: var(--radius-md);
  justify-content: center; font-weight: 600;
}
.mobile-nav .mobile-nav-register:hover { background: var(--accent-700); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: var(--sp-7) var(--sp-8); overflow: hidden; }
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: var(--success-100); color: var(--success-600);
  padding: 8px 16px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
  margin-bottom: var(--sp-5);
}
.hero-badge svg { width: 16px; height: 16px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-7); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: var(--sp-6); } :root{ --sp-6: 25px;}}
.hero h1 { margin-bottom: var(--sp-4); }
.hero h1 .accent { color: var(--accent-600); }
.hero .lede { margin-bottom: var(--sp-5); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.hero-stats { display: flex; gap: var(--sp-6); flex-wrap: wrap; }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: 1.75rem; color: var(--ink-900); }
.hero-stat span { font-size: 0.8125rem; color: var(--ink-500); }
.hero-art { border-radius: var(--radius-lg); overflow: hidden; background: var(--primary-100); aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center; }
.hero-art svg { width: 100%; height: 100%; }
.hero-art picture { display: block; width: 100%; height: 100%; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; padding: var(--sp-5); }
@media (max-width: 767px) { .hero-art { aspect-ratio: 4/5; } }

.photo-frame { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--bg-soft); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-frame.wide { aspect-ratio: 16/9; }
.photo-frame.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.portrait-circle { border-radius: 50%; overflow: hidden; background: var(--primary-100); flex-shrink: 0; }
.portrait-circle img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

.card-media { aspect-ratio: 4/3; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; margin: calc(var(--sp-5) * -1) calc(var(--sp-5) * -1) var(--sp-4); background: var(--bg-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 85%; display: block; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-5); transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card-icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--primary-100); color: var(--primary-700); display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-4); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: var(--sp-2); }
.card p { color: var(--ink-500); font-size: 0.9375rem; }

/* ---------- Services: featured plan + compact secondary plans ---------- */
.services-featured {
  position: relative; max-width: 760px; margin: 0 auto var(--sp-7);
  background: var(--success-100); border: 1.5px solid var(--accent-600); border-radius: var(--radius-lg);
  padding: var(--sp-7) var(--sp-6) var(--sp-6); text-align: center;
  box-shadow: var(--shadow-md);
}
.services-featured .service-badge {
  position: absolute; top: calc(var(--sp-4) * -1); left: 50%; transform: translateX(-50%);
  background: var(--accent-600); color: #fff; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 8px 18px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; box-shadow: var(--shadow-sm);
}
.services-featured .service-badge svg { width: 14px; height: 14px; animation: badge-blink 1.8s ease-in-out infinite; }
@keyframes badge-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .services-featured .service-badge svg { animation: none; } }
.services-featured .card-icon { margin-inline: auto; }
.services-featured h3 { font-size: 1.625rem; margin-top: var(--sp-4); }
.services-featured .service-desc { color: var(--ink-600); margin-top: var(--sp-2); font-size: 1rem; }
.services-featured-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3) var(--sp-5);
  margin: var(--sp-5) auto 0; max-width: 440px; text-align: left;
}
.services-featured-list li { display: flex; gap: 10px; font-size: 0.9375rem; color: var(--ink-700); align-items: flex-start; }
.services-featured-list li svg { width: 18px; height: 18px; color: var(--success-600); flex-shrink: 0; margin-top: 2px; }
.services-featured .price-tag { font-family: var(--font-display); font-size: 2.75rem; font-weight: 500; color: var(--ink-900); margin: var(--sp-5) 0 var(--sp-5); line-height: 1.1; }
@media (max-width: 560px) { .services-featured-list { grid-template-columns: 1fr; } }

.services-secondary { max-width: 900px; margin-inline: auto; }
.service-mini {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-5); text-align: center;
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
}
.service-mini:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-mini h4 { font-size: 1rem; }
.service-mini .price { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink-900); margin: var(--sp-2) 0 var(--sp-3); }
.service-mini ul { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); text-align: left; }
.service-mini li { display: flex; gap: 8px; font-size: 0.8125rem; color: var(--ink-500); align-items: flex-start; }
.service-mini li svg { width: 14px; height: 14px; color: var(--success-600); flex-shrink: 0; margin-top: 2px; }

/* ---------- Steps / timeline ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); position: relative; }
.step { position: relative; padding-top: var(--sp-6); }
.step-num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--primary-900); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display);
  position: absolute; top: 0; left: 0;
}
.step h3 { margin-bottom: var(--sp-2); font-size: 1.0625rem; }
.step p { color: var(--ink-500); font-size: 0.9rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } .step-num{ top: -20px;}}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
/* ---------- Testimonials: full-screen blocks, sticky photo per block ---------- */
.testimonials-section { background: var(--bg); }
.testimonials-list { display: flex; flex-direction: column; }

.testimonial-row {
  display: grid; grid-template-columns: 360px 1fr; gap: var(--sp-8);
  min-height: 140vh; padding-block: var(--sp-8);
}
.testimonial-row + .testimonial-row { border-top: 1px solid var(--line); }

.testimonial-media-col { position: sticky; top: 20vh; margin-top: 20vh; align-self: start; height: fit-content; }
.testimonial-photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow-lg); background: var(--bg-soft); }
.testimonial-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

.testimonial-text-col { display: flex; flex-direction: column; gap: var(--sp-4); align-self: start; padding-top: 20vh; }
.testimonial-text-col .stars { display: flex; gap: 4px; color: var(--accent-600); }
.testimonial-text-col .stars svg { width: 18px; height: 18px; }
.testimonial-text-col blockquote { font-family: var(--font-display); font-weight: 500; font-size: 1.75rem; line-height: 1.5; color: var(--ink-900); max-width: 46ch; }
.testimonial-text-col .who-meta strong { display: block; font-size: 1.0625rem; color: var(--ink-900); }
.testimonial-text-col .who-meta span { font-size: 0.875rem; color: var(--ink-500); }

@media (max-width: 900px) {
  .testimonials-list {
    display: flex; flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    gap: var(--sp-4); margin-inline: calc(var(--sp-4) * -1); padding-inline: var(--sp-4);
    padding-bottom: var(--sp-3); scrollbar-width: none;
  }
  .testimonials-list::-webkit-scrollbar { display: none; }

  .testimonial-row {
    grid-template-columns: auto 1fr;
    grid-template-areas: "photo quote" "photo meta" "stars stars";
    align-items: start; column-gap: var(--sp-4); row-gap: var(--sp-2);
    min-height: auto; padding: var(--sp-5);
    flex: 0 0 88%; scroll-snap-align: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  }

  .testimonial-media-col { display: contents; }
  .testimonial-photo {
    grid-area: photo; width: 56px; height: 56px; aspect-ratio: 1/1;
    border-radius: 50%; box-shadow: none;
  }
  .testimonial-text-col { display: contents; }
  .testimonial-text-col blockquote { grid-area: quote; max-width: none; font-size: 1rem; line-height: 1.55; }
  .testimonial-text-col .who-meta { grid-area: meta; }
  .testimonial-text-col .stars { grid-area: stars; justify-content: flex-start; margin-top: var(--sp-3); }
}

/* ---------- CTA banner ---------- */
.cta-banner { background: var(--primary-900); color: #fff; border-radius: var(--radius-lg); padding: var(--sp-7) var(--sp-6); text-align: center; }
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.75); margin-block: var(--sp-3) var(--sp-5); }
.cta-banner .hero-cta { justify-content: center; }
.cta-banner .btn-ghost { border-color: rgba(255,255,255,0.3); color: #fff; }
.cta-banner .btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-900); color: rgba(255,255,255,0.7); padding-block: var(--sp-8) var(--sp-5); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-6); padding-bottom: var(--sp-7); border-bottom: 1px solid rgba(255,255,255,0.1); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--sp-4); }
.site-footer ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.site-footer a { font-size: 0.9rem; transition: color var(--dur-fast) var(--ease); }
.site-footer a:hover { color: #fff; }
.footer-brand p { font-size: 0.9rem; margin-block: var(--sp-3) var(--sp-4); max-width: 34ch; }
.social-row { display: flex; gap: var(--sp-3); }
.social-row a { width: 38px; height: 38px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.social-row a:hover { background: var(--accent-600); }
.social-row svg { width: 18px; height: 18px; }
.contact-line { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; }
.contact-line svg { width: 16px; height: 16px; margin-top: 3px; flex-shrink: 0; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: var(--sp-5); font-size: 0.8125rem; flex-wrap: wrap; gap: var(--sp-3); }

/* ---------- Page header (subpages) ---------- */
.page-header { padding-block: var(--sp-7) var(--sp-6); background: var(--bg-soft); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--ink-500); margin-bottom: var(--sp-4); }
.breadcrumb svg { width: 14px; height: 14px; }
.breadcrumb a:hover { color: var(--primary-700); }
.page-header h1 { max-width: 20ch; }
.page-header .lede { margin-top: var(--sp-3); }

/* Full-height photographic page header variant (courses hero) */
.page-header--photo {
  position: relative; min-height: 100vh; display: flex; align-items: flex-end;
  background: url('https://res.cloudinary.com/dam6cl8k0/image/upload/v1784998998/courses-hero_xxctve.jpg') center/cover no-repeat;
  padding-block: var(--sp-8) var(--sp-8);
}
.page-header--photo::before {
  content: ''; position: absolute; inset: 0; background: rgba(13, 47, 66, 0.6);
}
.page-header--photo .container { position: relative; z-index: 1; }
.page-header--photo .breadcrumb { color: rgba(255, 255, 255, 0.75); }
.page-header--photo .breadcrumb a { color: rgba(255, 255, 255, 0.75); }
.page-header--photo .breadcrumb a:hover { color: #fff; }
.page-header--photo .breadcrumb svg { color: rgba(255, 255, 255, 0.6); }
.page-header--photo h1 { color: #fff; }
.page-header--photo .lede { color: rgba(255, 255, 255, 0.85); }
@media (max-width: 640px) { .page-header--photo { min-height: 80vh; align-items: center; } }

/* ---------- Accordion (safety / traffic signs) ---------- */
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4) 0; text-align: left; font-weight: 600; font-size: 1rem; color: var(--ink-900); }
.accordion-trigger svg { width: 20px; height: 20px; transition: transform var(--dur-fast) var(--ease); flex-shrink: 0; }
.accordion-item.open .accordion-trigger svg { transform: rotate(45deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height var(--dur-med) var(--ease); }
.accordion-panel-inner { padding-bottom: var(--sp-4); color: var(--ink-500); font-size: 0.9375rem; }

/* ---------- Sign grid (traffic signs) ---------- */
.sign-card { text-align: center; }
.sign-card .sign-icon { width: 72px; height: 72px; margin-inline: auto var(--sp-3); }
.sign-card h4 { margin-bottom: 4px; }
.sign-card p { font-size: 0.8125rem; color: var(--ink-500); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--primary-100); position: relative; cursor: pointer; }
.gallery-item svg, .gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.gallery-item:hover svg, .gallery-item:hover img { transform: scale(1.06); }
.gallery-caption { position: absolute; inset-inline: 0; bottom: 0; padding: var(--sp-3); background: linear-gradient(transparent, rgba(0,0,0,0.55)); color: #fff; font-size: 0.8125rem; font-weight: 600; opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.gallery-item:hover .gallery-caption { opacity: 1; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(14,21,32,0.9); z-index: 70; display: flex; align-items: center; justify-content: center; padding: var(--sp-5); opacity: 0; visibility: hidden; transition: opacity var(--dur-med) var(--ease), visibility var(--dur-med); }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-inner { max-width: 720px; width: 100%; background: #fff; border-radius: var(--radius-lg); overflow: hidden; }
.lightbox-inner svg { width: 100%; height: auto; aspect-ratio: 4/3; }
.lightbox-inner img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; display: block; }
.lightbox-caption { padding: var(--sp-4); font-size: 0.9375rem; }
.lightbox-close { position: absolute; top: var(--sp-5); right: var(--sp-5); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; color: #fff; }
.lightbox-close svg { width: 20px; height: 20px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--ink-700); }
.field input, .field select, .field textarea {
  padding: 13px 16px; border: 1.5px solid var(--ink-150); border-radius: var(--radius-md);
  background: #fff; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary-600); box-shadow: 0 0 0 3px var(--primary-100);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { display: flex; gap: 10px; align-items: flex-start; background: var(--primary-100); border-radius: var(--radius-md); padding: var(--sp-4); font-size: 0.875rem; color: var(--primary-900); }
.form-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* ---------- Download list ---------- */
.download-row { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.download-row:hover { border-color: var(--primary-500); box-shadow: var(--shadow-sm); }
.download-row .card-icon { margin: 0; flex-shrink: 0; }
.download-row .meta { flex: 1; }
.download-row h4 { margin-bottom: 2px; }
.download-row .meta span { font-size: 0.8125rem; color: var(--ink-500); }

/* ---------- Utilities ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); will-change: opacity, transform; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > * { transition-delay: calc(var(--stagger-i, 0) * 100ms); }
.center-text { text-align: center; }
.mt-0 { margin-top: 0; }
.divider { height: 1px; background: var(--line); border: 0; }
.skip-link { position: fixed; top: -60px; left: var(--sp-4); background: var(--primary-900); color: #fff; padding: 12px 20px; border-radius: var(--radius-sm); z-index: 100; transition: top var(--dur-fast) var(--ease); }
.skip-link:focus { top: var(--sp-4); }
:focus-visible { outline: 2px solid var(--accent-600); outline-offset: 2px; }

/* ==========================================================================
   Skeleton Preloader
   ========================================================================== */
#preload {
  position: fixed; inset: 0; z-index: 200; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow);
}
#preload.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.skeleton-wrap { width: 100%; max-width: 720px; padding: var(--sp-5); }
.skeleton-logo { width: 56px; height: 56px; border-radius: var(--radius-md); margin-inline: auto var(--sp-5); }
.sk { position: relative; overflow: hidden; background: var(--ink-100); border-radius: var(--radius-sm); }
.sk::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-line { height: 14px; margin-bottom: var(--sp-3); }
.sk-line.w-60 { width: 60%; margin-inline: auto; }
.sk-line.w-40 { width: 40%; margin-inline: auto; }
.sk-block { height: 160px; margin-top: var(--sp-5); }

/* Language modal */
#lang-modal {
  position: fixed; inset: 0; z-index: 210; background: rgba(14,21,32,0.55);
  display: flex; align-items: center; justify-content: center; padding: var(--sp-4);
  opacity: 0; visibility: hidden; transition: opacity var(--dur-med) var(--ease), visibility var(--dur-med);
}
#lang-modal.open { opacity: 1; visibility: visible; }
.lang-card {
  background: #fff; border-radius: var(--radius-lg); padding: var(--sp-7) var(--sp-6);
  max-width: 460px; width: 100%; text-align: center; box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98); transition: transform var(--dur-med) var(--ease);
}
#lang-modal.open .lang-card { transform: translateY(0) scale(1); }
.lang-card .mark { width: 56px; height: 56px; border-radius: var(--radius-md); background: var(--primary-900); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin: 0 auto var(--sp-4); }
.lang-card h2 { font-size: 1.375rem; margin-bottom: var(--sp-2); }
.lang-card p { color: var(--ink-500); font-size: 0.9375rem; margin-bottom: var(--sp-6); }
.lang-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.lang-option {
  border: 1.5px solid var(--ink-150); border-radius: var(--radius-md); padding: var(--sp-4);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.lang-option:hover { border-color: var(--primary-600); background: var(--primary-100); transform: translateY(-2px); }
.lang-option .lang-badge { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-900); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.02em; }
.lang-option strong { font-size: 0.9375rem; }
.lang-option span { font-size: 0.75rem; color: var(--ink-500); }

/* ==========================================================================
   Floating WhatsApp assistance — appears while scrolling, fades when idle
   ========================================================================== */
.whatsapp-float {
  position: fixed; right: var(--sp-5); bottom: var(--sp-5); z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--success-600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(16px) scale(0.9); pointer-events: none;
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease), background var(--dur-fast) var(--ease);
}
.whatsapp-float svg { width: 26px; height: 26px; }
.whatsapp-float:hover { background: var(--success-600); transform: translateY(0) scale(1.06); }
.whatsapp-float.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .whatsapp-float { transition: opacity var(--dur-fast) linear; transform: none !important; } }

/* ==========================================================================
   First-visit brand intro overlay
   ========================================================================== */
.brand-intro {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.9s var(--ease), clip-path 0.9s var(--ease);
}
.brand-intro-inner { display: flex; align-items: center; gap: 1.25rem; }
.brand-intro-logo {
  width: 64px; height: 64px; object-fit: contain;
  opacity: 0; transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.brand-intro.logo-in .brand-intro-logo { opacity: 1; transform: scale(1); }
.brand-intro-text {
  display: flex; flex-direction: column; justify-content: center;
  max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap;
  transition: max-width 0.8s var(--ease), opacity 0.8s ease;
}
.brand-intro-text span { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.25; color: var(--ink-900); }
.brand-intro.text-in .brand-intro-text { opacity: 1; }
.brand-intro.wipe { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .brand-intro, .brand-intro-logo, .brand-intro-text { transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Lenis smooth scroll
   ========================================================================== */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
