/* ============================================
   New Method Driving School — Production Styles
   Premium Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --navy: #111827;
  --navy-dark: #0B1120;
  --blue: #3366CC;
  --blue-hover: #2855B3;
  --blue-light: #EEF2FF;
  --blue-glow: rgba(51, 102, 204, 0.25);
  --red-accent: #DC2626;
  --off-white: #FAFAFA;
  --muted-gray: #6B7280;
  --border-light: #E5E7EB;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 12px 40px rgba(11,30,63,0.14);
  --shadow-xl: 0 20px 60px rgba(11,30,63,0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Smooth scrolling & base --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-hover); }

/* --- Selection color --- */
::selection {
  background: var(--blue);
  color: var(--white);
}

/* --- Eyebrow label underline --- */
.eyebrow {
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}
.eyebrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
}
.eyebrow-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* --- Card hover lift --- */
.card-hover {
  transition: transform var(--transition), box-shadow var(--transition);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* --- Premium gradient card --- */
.card-gradient {
  position: relative;
  overflow: hidden;
}
.card-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--navy));
}

/* --- Mobile hamburger menu --- */
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Mobile nav overlay --- */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 360px;
  height: 100vh;
  background: var(--white);
  z-index: 90;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.2);
  padding-top: 80px;
}
.mobile-nav.open { right: 0; }

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 85;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* --- Testimonial Slider --- */
.testimonial-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.testimonial-slide {
  min-width: 100%;
  padding: 0 12px;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .testimonial-slide { min-width: 50%; }
}
@media (min-width: 1024px) {
  .testimonial-slide { min-width: 33.333%; }
}
.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.slider-dot.active {
  background: var(--blue);
  transform: scale(1.3);
}

/* --- FAQ Accordion --- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-answer.open { max-height: 500px; }
.faq-chevron { transition: transform var(--transition); }
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* --- Floating call button --- */
.floating-call {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--blue), var(--blue-hover));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--blue-glow);
  z-index: 80;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: pulse-call 2s infinite;
}
.floating-call:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(51, 102, 204, 0.5);
}
.floating-call svg {
  color: var(--white) !important;
}
@keyframes pulse-call {
  0%, 100% { box-shadow: 0 4px 20px var(--blue-glow); }
  50% { box-shadow: 0 4px 30px rgba(51, 102, 204, 0.5); }
}

/* --- Scroll reveal animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Corner accent on images --- */
.gold-corner { position: relative; }
.gold-corner::before {
  content: '';
  position: absolute;
  top: -4px; right: -4px;
  width: 60px; height: 60px;
  border-top: 4px solid var(--blue);
  border-right: 4px solid var(--blue);
  border-radius: 0 var(--radius-md) 0 0;
  z-index: 10;
}
.gold-corner::after {
  content: '';
  position: absolute;
  bottom: -4px; left: -4px;
  width: 60px; height: 60px;
  border-bottom: 4px solid var(--blue);
  border-left: 4px solid var(--blue);
  border-radius: 0 0 0 var(--radius-md);
  z-index: 10;
}

/* --- L-plate motif --- */
.l-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 32px;
  background: var(--red-accent);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 18px;
  border-radius: 3px;
  border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* --- Contact form focus styles --- */
.form-input {
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px var(--blue-glow);
  outline: none;
}

/* --- Package card popular badge --- */
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--blue), #4D88E0);
  color: var(--white);
  padding: 4px 20px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 12px var(--blue-glow);
}

/* --- Active nav link --- */
.nav-link {
  position: relative;
  transition: color var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width var(--transition);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* --- Header scroll state --- */
.header-scrolled {
  box-shadow: 0 2px 24px rgba(11, 30, 63, 0.10) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px);
}

/* --- Success toast --- */
.toast {
  position: fixed;
  top: 100px;
  right: 24px;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  color: var(--white);
  font-weight: 500;
  z-index: 100;
  transform: translateX(120%);
  transition: transform 0.4s ease;
  box-shadow: var(--shadow-md);
}
.toast.show { transform: translateX(0); }
.toast-success { background: #10B981; }
.toast-error { background: #E63946; }

/* --- Star rating --- */
.star-blue { color: var(--blue); }

/* --- Responsive typography scale --- */
@media (max-width: 640px) {
  .hero-heading {
    font-size: 2.25rem !important;
    line-height: 1.15 !important;
  }
}
@media (min-width: 641px) and (max-width: 1023px) {
  .hero-heading {
    font-size: 3rem !important;
    line-height: 1.1 !important;
  }
}

/* --- Section divider --- */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #4D88E0);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* --- Hero image container --- */
.hero-image-container {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.hero-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(17, 24, 39, 0.8) 0%, transparent 100%);
  padding: 24px;
}

/* --- About instructor photo --- */
.instructor-photo {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.instructor-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* --- Service card border accent --- */
.service-card {
  border-left: 4px solid var(--blue);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* --- Feature icon circle --- */
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue-light), #dce5ff);
}

/* --- Language badges --- */
.lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--blue-light);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  transition: all var(--transition);
}
.lang-badge:hover {
  background: var(--blue);
  color: var(--white);
}

/* --- Stats counter animation --- */
.stat-number {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--navy);
  line-height: 1;
}

/* --- Page hero gradient mesh --- */
.page-hero {
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(51, 102, 204, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(51, 102, 204, 0.10) 0%, transparent 70%);
  border-radius: 50%;
}

/* --- MTO badge --- */
.mto-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
}

/* --- Pricing popular ring --- */
.price-popular {
  box-shadow: 0 0 0 3px var(--blue), var(--shadow-lg);
}

/* --- Animated gradient border --- */
.gradient-border {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: linear-gradient(135deg, var(--blue), var(--navy), var(--blue));
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}
.gradient-border > * {
  border-radius: calc(var(--radius-lg) - 2px);
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- WhatsApp / text button --- */
.whatsapp-btn {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 50px;
  height: 50px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  z-index: 80;
  transition: transform var(--transition);
}
.whatsapp-btn:hover { transform: scale(1.1); }

/* --- Logo styles --- */
.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-icon-img {
  flex-shrink: 0;
  object-fit: contain;
  image-rendering: auto;
}

/* --- Subtle background pattern --- */
.bg-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(51, 102, 204, 0.04) 1px, transparent 0);
  background-size: 40px 40px;
}

/* --- Safe driving banner --- */
.safe-driving-banner {
  background: linear-gradient(90deg, var(--navy), #1a2744);
  color: var(--white);
  padding: 10px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ============================================
   PREMIUM HERO SECTION ENHANCEMENTS
   ============================================ */

/* --- Animated floating particles --- */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.hero-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 8s ease-in-out infinite;
}
.hero-particle:nth-child(1) { width: 6px; height: 6px; background: var(--blue); top: 20%; left: 10%; animation-delay: 0s; animation-duration: 7s; }
.hero-particle:nth-child(2) { width: 4px; height: 4px; background: var(--blue-hover); top: 60%; left: 85%; animation-delay: 1.5s; animation-duration: 9s; }
.hero-particle:nth-child(3) { width: 8px; height: 8px; background: rgba(51,102,204,0.3); top: 80%; left: 25%; animation-delay: 3s; animation-duration: 6s; }
.hero-particle:nth-child(4) { width: 5px; height: 5px; background: var(--blue); top: 15%; left: 70%; animation-delay: 2s; animation-duration: 10s; }
.hero-particle:nth-child(5) { width: 3px; height: 3px; background: rgba(51,102,204,0.5); top: 45%; left: 50%; animation-delay: 4s; animation-duration: 8s; }
.hero-particle:nth-child(6) { width: 7px; height: 7px; background: rgba(51,102,204,0.2); top: 70%; left: 65%; animation-delay: 1s; animation-duration: 11s; }

@keyframes particleFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
  20% { opacity: 0.6; }
  50% { opacity: 0.8; transform: translateY(-40px) scale(1); }
  80% { opacity: 0.4; }
}

/* --- Glassmorphism trust bar --- */
.hero-trust-bar {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  box-shadow: 0 8px 32px rgba(11,30,63,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
@media (max-width: 480px) {
  .hero-trust-bar {
    gap: 16px;
    padding: 16px 16px;
    flex-wrap: wrap;
  }
  .hero-trust-bar .stat-number { font-size: 1.4rem; }
}

/* --- Hero gradient text shimmer --- */
.hero-text-gradient {
  background: linear-gradient(135deg, var(--blue), #4D88E0, var(--blue));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 4s linear infinite;
}
@keyframes shimmerText {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* --- Premium hero image with glow --- */
.hero-image-premium {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(51,102,204,0.2), 0 8px 24px rgba(11,30,63,0.12);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.hero-image-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(51,102,204,0.28), 0 12px 32px rgba(11,30,63,0.16);
}
.hero-image-premium::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--blue), transparent 50%, var(--blue));
  border-radius: inherit;
  z-index: -1;
  opacity: 0.5;
}
.hero-image-premium img {
  width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.hero-image-premium .hero-image-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(17,24,39,0.85) 0%, rgba(17,24,39,0.3) 60%, transparent 100%);
  padding: 24px;
}

/* --- Experience badge (floating on hero image) --- */
.experience-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-md);
  z-index: 5;
  text-align: center;
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* ============================================
   RESPONSIVE LOGO SIZING
   ============================================ */
/* Header logo */
@media (max-width: 640px) {
  .header-logo {
    width: 42px !important;
    height: 42px !important;
  }
}
@media (min-width: 641px) and (max-width: 1023px) {
  .header-logo {
    width: 52px !important;
    height: 52px !important;
  }
}
/* Footer logo */
@media (max-width: 640px) {
  .footer-logo {
    width: 50px !important;
    height: 50px !important;
  }
}
/* Mobile nav logo */
.mobile-nav-logo {
  width: 50px !important;
  height: 50px !important;
}

/* ============================================
   RESPONSIVE HERO IMAGE (show on mobile too)
   ============================================ */
.hero-mobile-image {
  display: block;
  margin: 32px auto 0;
  max-width: 280px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(51,102,204,0.15);
}
.hero-mobile-image img {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: cover;
  object-position: top center;
  display: block;
}
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-mobile-image {
    max-width: 260px;
  }
  .hero-mobile-image img {
    max-height: 320px;
  }
}
@media (min-width: 1024px) {
  .hero-mobile-image { display: none; }
}

/* ============================================
   RESPONSIVE INSTRUCTOR PHOTO (About page)
   ============================================ */
.instructor-photo img {
  max-height: 520px;
  object-position: top center;
}
@media (max-width: 640px) {
  .instructor-photo img {
    max-height: 360px;
  }
  .gold-corner::before,
  .gold-corner::after {
    width: 40px; height: 40px;
  }
}
@media (min-width: 641px) and (max-width: 1023px) {
  .instructor-photo {
    max-width: 420px;
    margin: 0 auto;
  }
  .instructor-photo img {
    max-height: 440px;
  }
}

/* ============================================
   RESPONSIVE FOOTER FIXES
   ============================================ */
@media (max-width: 640px) {
  footer .grid {
    gap: 32px !important;
  }
  footer h3 {
    font-size: 1rem !important;
  }
  footer .border-t {
    text-align: center;
  }
  footer .border-t .flex {
    justify-content: center;
  }
}

/* ============================================
   RESPONSIVE HEADER TEXT
   ============================================ */
@media (max-width: 374px) {
  #main-header .font-bold.text-lg {
    font-size: 0.9rem;
  }
  #main-header .text-xs {
    font-size: 0.6rem;
  }
  .logo-icon-img {
    width: 44px !important;
    height: 44px !important;
  }
}

/* --- Animated border glow for hero CTA --- */
.hero-cta-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.hero-cta-primary::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, var(--blue), #4D88E0, var(--blue));
  background-size: 200% auto;
  border-radius: inherit;
  z-index: -1;
  animation: ctaGlow 3s linear infinite;
}
@keyframes ctaGlow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* --- Stats separator responsive --- */
@media (max-width: 480px) {
  .stat-number { font-size: 1.5rem; }
}
