/* ==========================================================================
   Kingdom Auto & Detail - Brand Foundation
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Legacy — mapped to design system tokens)
   -------------------------------------------------------------------------- */
:root {
  --kingdom-navy: #1E293B;
  --kingdom-navy-light: #334155;
  --kingdom-white: #FFFFFF;
  --kingdom-off-white: var(--bg-body, #F8FAFC);
  --kingdom-gold: var(--primary, #3B82F6);
  --kingdom-gold-hover: var(--primary-hover, #2563EB);
  --kingdom-text: var(--text-body, #334155);
  --kingdom-text-light: var(--text-muted, #64748B);

  /* Bootstrap primary override */
  --bs-primary: var(--primary, #3B82F6);
  --bs-primary-rgb: 59, 130, 246;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-body, #334155);
  line-height: 1.6;
  background-color: var(--bg-body, #F8FAFC);
  padding-top: 72px; /* Account for fixed navbar height on public pages */
}

/* Staff layout uses flex, not a fixed navbar — remove body padding */
body:has(.app-wrapper) {
  padding-top: 0;
}

/* Fleet portal uses sticky-top navbar, not fixed — remove body padding */
body:has(.fleet-tier-badge) {
  padding-top: 0;
}

/* Auth pages use full-viewport split-screen — no navbar padding */
body:has(.auth-container) {
  padding-top: 0;
  background-color: #fff;
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  color: var(--text-heading, #1E293B);
}

/* --------------------------------------------------------------------------
   Bootstrap Primary Color Override
   -------------------------------------------------------------------------- */
.btn-primary {
  background-color: var(--primary, #3B82F6);
  border-color: var(--primary, #3B82F6);
  color: #FFFFFF;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #FFFFFF;
  border-color: var(--primary, #3B82F6);
  color: var(--primary, #3B82F6);
}

.btn-outline-primary {
  color: var(--primary, #3B82F6);
  border-color: var(--primary, #3B82F6);
  background-color: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--primary, #3B82F6);
  border-color: var(--primary, #3B82F6);
  color: #FFFFFF;
}

/* Selected time-slot button — keeps blue bg + white text on hover/focus */
.slot-btn.active.btn-primary,
.slot-btn.active.btn-primary:hover,
.slot-btn.active.btn-primary:focus {
  background-color: var(--primary, #3B82F6);
  border-color: var(--primary, #3B82F6);
  color: #FFFFFF;
}

.bg-primary {
  background-color: var(--primary, #3B82F6) !important;
}

.text-primary {
  color: var(--primary, #3B82F6) !important;
}

/* --------------------------------------------------------------------------
   Kingdom CTA Button (formerly gold, now blue primary)
   -------------------------------------------------------------------------- */
.btn-kingdom-gold {
  background-color: var(--primary, #3B82F6);
  border-color: var(--primary, #3B82F6);
  color: #FFFFFF;
}

.btn-kingdom-gold:hover,
.btn-kingdom-gold:focus {
  background-color: var(--primary-hover, #2563EB);
  border-color: var(--primary-hover, #2563EB);
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-kingdom-navy { color: var(--text-heading, #1E293B); }
.text-kingdom-gold { color: var(--primary, #3B82F6); }
.text-kingdom-light { color: var(--text-muted, #64748B); }
.bg-kingdom-navy { background-color: #1E293B; }
.bg-kingdom-off-white { background-color: var(--bg-body, #F8FAFC); }
.bg-kingdom-gold { background-color: var(--primary, #3B82F6); }

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  background-color: var(--bg-card, #FFFFFF);
  border-bottom: 1px solid var(--border-color, #E2E8F0);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.navbar-brand {
  padding-top: 0;
  padding-bottom: 0;
}

.navbar-logo {
  height: 95px;
  width: auto;
}

/* Mobile: shrink logo and fix collapsed menu */
@media (max-width: 991.98px) {
  .navbar-logo {
    height: 54px;
    max-width: 200px;
    object-fit: contain;
  }

  .navbar-collapse {
    background: var(--bg-card, #FFFFFF);
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color, #E2E8F0);
  }

  .navbar-collapse .nav-link {
    padding: 0.6rem 1rem;
  }

  .navbar-collapse .btn {
    display: block;
    text-align: center;
    margin-left: 0 !important;
  }
}

[data-bs-theme="dark"] .navbar-logo {
  filter: brightness(0) invert(1);
}

.navbar .nav-link {
  font-size: 0.925rem;
  padding: 0.5rem 1rem;
  color: var(--text-body, #334155) !important;
  transition: color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--primary, #3B82F6) !important;
  font-weight: 600;
}

.navbar .nav-link.active {
  position: relative;
}

.navbar .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--primary, #3B82F6);
}

.navbar-toggler {
  border-color: rgba(30, 41, 59, 0.3);
  padding: 0.5rem 0.75rem;
  font-size: 1.5rem;
}

.navbar-toggler-icon {
  width: 1.75em;
  height: 1.75em;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(30, 41, 59, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --------------------------------------------------------------------------
   Announcement Ribbon
   -------------------------------------------------------------------------- */
.announcement-ribbon {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #1e40af 100%);
  color: #fff;
  padding: 0.6rem 0;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
body.has-ribbon { padding-top: 112px; }
body.has-ribbon .navbar.fixed-top { top: 40px; }
.announcement-ribbon-text {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.announcement-ribbon-text strong {
  color: #fbbf24;
}
@media (max-width: 576px) {
  .announcement-ribbon-text { font-size: 0.82rem; }
  body.has-ribbon { padding-top: 130px; }
  body.has-ribbon .navbar.fixed-top { top: 58px; }
}

/* --------------------------------------------------------------------------
   Hero V3 — full-width centered over background photo
   -------------------------------------------------------------------------- */
.hero-v3 {
  position: relative;
  background: url('/img/hero/auto-shop.jpg') center center / cover no-repeat;
  min-height: 580px;
  display: flex;
  align-items: center;
  padding: 6rem 0 8rem;
}
.hero-v3-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.88) 0%, rgba(15,23,42,0.7) 100%);
  z-index: 1;
}
.hero-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em;
  color: #60A5FA; background: rgba(59,130,246,0.15); padding: 0.35rem 1.2rem; border-radius: 50px;
}
.hero-v3-title {
  color: #fff !important; font-weight: 800; font-size: 3.2rem; line-height: 1.15; letter-spacing: -0.02em;
}
.hero-v3-highlight { color: #60A5FA; }
.hero-v3-desc { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 620px; line-height: 1.7; }
.hero-v3-curve { position: absolute; bottom: -1px; left: 0; right: 0; z-index: 2; line-height: 0; }
.hero-v3-curve svg { width: 100%; height: 70px; }

.btn-hero-primary {
  background: #3B82F6; border: 2px solid #3B82F6; color: #fff; border-radius: 50px; transition: all .25s;
}
.btn-hero-primary:hover {
  background: #2563EB; border-color: #2563EB; color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59,130,246,.4);
}
.btn-hero-outline {
  background: transparent; border: 2px solid rgba(255,255,255,.5); color: #fff; border-radius: 50px; transition: all .25s;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }

@media (max-width: 991.98px) {
  .hero-v3 { min-height: auto; padding: 4rem 0 5rem; }
  .hero-v3-title { font-size: 2.2rem; }
}
@media (max-width: 767.98px) {
  .hero-v3 { padding: 3rem 0 4rem; }
  .hero-v3-title { font-size: 1.75rem; }
  .hero-v3-desc { font-size: 1rem; }
}

/* --------------------------------------------------------------------------
   Stats Bar
   -------------------------------------------------------------------------- */
.stats-bar { background: #fff; padding: 2.5rem 0; border-bottom: 1px solid #E2E8F0; }
.stat-item { padding: 0.5rem 1rem; }
.stat-number { font-size: 2rem; font-weight: 800; color: #3B82F6; line-height: 1.2; }
.stat-label { font-size: 0.85rem; color: #64748B; font-weight: 500; margin-top: 0.2rem; }
@media (max-width: 767.98px) {
  .stat-number { font-size: 1.5rem; }
  .stat-item { padding: 0.75rem 0.5rem; }
}

/* --------------------------------------------------------------------------
   Section Label
   -------------------------------------------------------------------------- */
.section-label {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
  color: #3B82F6; text-transform: uppercase; background: #EFF6FF; padding: 0.3rem 1rem; border-radius: 50px;
}

/* --------------------------------------------------------------------------
   Step Cards (How It Works)
   -------------------------------------------------------------------------- */
.step-card {
  background: #fff; border-radius: 16px; border: 1px solid #E2E8F0; transition: transform .2s, box-shadow .2s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.step-icon-wrap {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE); color: #3B82F6;
}
.step-num { font-size: 0.75rem; font-weight: 700; color: #3B82F6; letter-spacing: 0.1em; margin-bottom: 0.5rem; }

/* --------------------------------------------------------------------------
   About Split Section
   -------------------------------------------------------------------------- */
.about-img-grid { position: relative; min-height: 400px; }
.about-img-main {
  width: 75%; border-radius: 16px; object-fit: cover; height: 340px;
  box-shadow: 0 16px 50px rgba(0,0,0,.12); position: relative; z-index: 2;
}
.about-img-secondary {
  width: 50%; border-radius: 12px; object-fit: cover; height: 200px;
  position: absolute; bottom: -30px; right: 0; z-index: 3; border: 4px solid #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
}
.about-img-accent {
  position: absolute; top: -15px; left: -15px; width: 120px; height: 120px;
  border-radius: 16px; background: linear-gradient(135deg, #3B82F6, #60A5FA); opacity: 0.15; z-index: 1;
}
.about-check { display: flex; align-items: center; font-weight: 600; font-size: 0.95rem; color: #1E293B; }
@media (max-width: 991.98px) {
  .about-img-grid { min-height: 300px; margin-bottom: 2rem; }
  .about-img-main { height: 260px; }
  .about-img-secondary { height: 150px; }
}

/* --------------------------------------------------------------------------
   Service Cards V2 (with photos)
   -------------------------------------------------------------------------- */
.service-card-v2 {
  background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid #E2E8F0;
  transition: transform .25s, box-shadow .25s;
}
.service-card-v2:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,.1); }
.service-card-img {
  height: 210px; background-size: cover; background-position: center; position: relative;
}
.service-card-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.08) 100%);
}
.service-card-body { padding: 1.5rem; }
.service-card-body h5 { margin-bottom: 0.5rem; }
.service-card-link {
  color: #3B82F6; text-decoration: none; font-size: 0.95rem; transition: color .2s;
}
.service-card-link:hover { color: #1E40AF; }

/* --------------------------------------------------------------------------
   Testimonials Carousel
   -------------------------------------------------------------------------- */
.testimonial-section { background: #F8FAFC; }
.testimonial-carousel { position: relative; overflow: hidden; padding: 0 2.5rem; }
.testimonial-track {
  display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); will-change: transform;
}
.testimonial-slide { min-width: 50%; padding: 0 0.75rem; box-sizing: border-box; }
@media(max-width:767.98px){ .testimonial-slide { min-width: 100%; } }

.tcard {
  background: #fff; border-radius: 20px; padding: 2.5rem 2rem 2rem; text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.06); border: 1px solid #E2E8F0; height: 100%;
  position: relative; display: flex; flex-direction: column; align-items: center;
}
.tcard-quote {
  font-size: 3.5rem; line-height: 1; color: #DBEAFE; font-family: Georgia, serif; font-weight: 700;
  position: absolute; top: 12px; left: 24px;
}
.tcard-quote-end { top: auto; left: auto; bottom: 12px; right: 24px; }
.tcard-text {
  color: #475569; font-size: 1rem; line-height: 1.75; margin: 1.5rem 0 1rem;
  flex: 1; max-width: 420px;
}
.tcard-stars { color: #FBBF24; font-size: 1.2rem; letter-spacing: 3px; margin-bottom: 0.5rem; }
.tcard-author { font-weight: 700; color: #1E293B; font-size: 1rem; }
.tcard-role { color: #64748B; font-size: 0.85rem; }

/* Arrows */
.tcarousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  border-radius: 50%; border: 2px solid #CBD5E1; background: #fff; color: #334155;
  font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 3;
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.tcarousel-btn:hover { border-color: #3B82F6; color: #3B82F6; box-shadow: 0 2px 10px rgba(59,130,246,.2); }
.tcarousel-prev { left: 0; }
.tcarousel-next { right: 0; }

/* Dots */
.tcarousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 1.5rem; }
.tcarousel-dot {
  width: 32px; height: 4px; border-radius: 2px; background: #CBD5E1; cursor: pointer; transition: all .3s;
}
.tcarousel-dot.active { background: #3B82F6; width: 48px; }

/* --------------------------------------------------------------------------
   CTA V3 — background image
   -------------------------------------------------------------------------- */
.cta-v3 {
  position: relative; padding: 5rem 0; overflow: hidden;
  background: url('/img/hero/mechanic-bg.jpg') center center / cover no-repeat;
}
.cta-v3-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(30,64,175,.92), rgba(59,130,246,.88));
  z-index: 1;
}
.cta-v3 h2 { color: #fff !important; }
.btn-cta-white {
  background: #fff; color: #3B82F6; border: 2px solid #fff; border-radius: 50px; transition: all .25s;
}
.btn-cta-white:hover { background: transparent; color: #fff; border-color: #fff; }

/* --------------------------------------------------------------------------
   Legacy Hero / Service / CTA (kept for other pages)
   -------------------------------------------------------------------------- */
.hero-section {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  padding: 5rem 0;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.hero-title {
  color: #FFFFFF !important;
  font-weight: 700;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.service-icon {
  width: 70px;
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light, #EFF6FF);
  border-radius: 50%;
}

.feature-icon-circle {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-radius: 50%;
  color: #3B82F6;
}

.cta-banner {
  background: linear-gradient(135deg, var(--primary, #3B82F6) 0%, var(--primary-hover, #2563EB) 100%);
}

.cta-banner h2 {
  color: #FFFFFF !important;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  font-size: 0.9rem;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.footer-text {
  color: #B0B8C1;
}

.footer-links a {
  color: #B0B8C1;
  display: block;
  padding: 2px 0;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   General / Layout
   -------------------------------------------------------------------------- */
.section-padding {
  padding: 4rem 0;
}

.gold-accent {
  border-left: 4px solid var(--primary, #3B82F6);
  padding-left: 1rem;
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  .section-padding {
    padding: 2.5rem 0;
  }

  body {
    padding-top: 62px;
  }
  body:has(.app-wrapper),
  body:has(.fleet-tier-badge) {
    padding-top: 0;
  }
}

@media (max-width: 991.98px) {
  .navbar .nav-link.active::after {
    display: none;
  }
}
