/* ==========================================================================
   Kingdom Auto & Detail - Page-Specific Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page Headers (shared across all inner pages)
   -------------------------------------------------------------------------- */
.page-header {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  padding: 4rem 0 3rem;
  text-align: center;
}

.page-header h1 {
  color: #FFFFFF !important;
  font-weight: 700;
}

.page-header-subtitle {
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 767.98px) {
  .page-header {
    padding: 3rem 0 2rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }
}

/* --------------------------------------------------------------------------
   Homepage: Hero Section
   -------------------------------------------------------------------------- */
.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.15rem;
  line-height: 1.7;
}

.hero-visual {
  position: relative;
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .hero-section {
    padding: 3rem 0;
    min-height: auto;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Homepage: 4-Step Process
   -------------------------------------------------------------------------- */
.process-step-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary, #3B82F6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Homepage: Service Cards Grid
   -------------------------------------------------------------------------- */
.service-card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
}

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

/* --------------------------------------------------------------------------
   Homepage: Feature Icons Grid
   -------------------------------------------------------------------------- */
.feature-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--primary-light, #EFF6FF);
  color: var(--primary, #3B82F6);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Homepage: FAQ Accordion
   -------------------------------------------------------------------------- */
.accordion-button:not(.collapsed) {
  background-color: var(--primary-light, #EFF6FF);
  color: var(--text-heading, #1E293B);
  box-shadow: none;
}

.accordion-button:focus {
  border-color: var(--primary-border, #BFDBFE);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

.accordion-item {
  border-color: var(--border-color, #E2E8F0);
}

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

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

/* --------------------------------------------------------------------------
   Pricing Page
   -------------------------------------------------------------------------- */
.pricing-card {
  border-radius: var(--radius-lg, 12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08)) !important;
}

.pricing-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-heading, #1E293B);
  font-family: 'Inter', sans-serif;
}

.pricing-price-lg {
  font-size: 2rem;
}

.price-from {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted, #64748B);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card-featured {
  border-radius: var(--radius-lg, 12px);
}

.pricing-card-featured ul li {
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pricing-card-featured ul li:last-child {
  border-bottom: none;
}

/* Pricing tiers (brake/tire tier breakdowns) */
.pricing-tiers {
  border-top: 1px solid #eee;
  padding-top: 0.5rem;
  font-size: 0.85rem;
}

.pricing-tiers li {
  padding: 2px 0;
  color: var(--text-muted, #64748B);
}

/* Bundle savings text */
.bundle-savings {
  color: var(--bs-success, #198754);
  font-weight: 600;
  font-size: 0.875rem;
}

/* Diagonal ribbon badge (top-right corner) */
.pricing-ribbon {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 110px;
  height: 110px;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}

.pricing-ribbon span {
  display: block;
  position: absolute;
  top: 18px;
  right: -30px;
  width: 150px;
  padding: 4px 0;
  background: var(--primary, #3B82F6);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Add-on cards */
.addon-card {
  border-left: 4px solid var(--primary, #3B82F6) !important;
  border-radius: var(--radius-lg, 12px);
}

.addon-price-badge {
  background: var(--primary, #3B82F6);
  color: white;
  border-radius: 4px;
  padding: 2px 10px;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Upsell selectable cards */
.upsell-card {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  background: #fff;
}

.upsell-card:hover {
  border-color: var(--primary, #3B82F6);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}

.upsell-card.selected {
  border-color: var(--primary, #3B82F6);
  background: rgba(59, 130, 246, 0.04);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.upsell-card-text {
  font-size: 1.05rem;
  line-height: 1.4;
}

.upsell-card-price {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-heading, #1E293B);
  white-space: nowrap;
  margin-left: 12px;
}

.upsell-card-bundle {
  border-color: var(--bs-success, #198754);
  border-style: dashed;
}

.upsell-card-bundle.selected {
  border-color: var(--bs-success, #198754);
  border-style: solid;
  background: rgba(25, 135, 84, 0.04);
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.15);
}

.upsell-bundle-includes {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.upsell-bundle-item {
  font-size: 0.95rem;
  color: var(--text-body, #475569);
  padding: 2px 0;
}

/* --------------------------------------------------------------------------
   Contact Page
   -------------------------------------------------------------------------- */
.contact-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light, #EFF6FF);
  border-radius: 50%;
  color: var(--primary, #3B82F6);
}

.contact-info-item {
  padding: 0.5rem 0;
}

.map-container {
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
  display: block;
}

.contact-form .form-control,
.contact-form .form-select {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-color, #E2E8F0);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
  border-color: var(--primary, #3B82F6);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

/* --------------------------------------------------------------------------
   About Page
   -------------------------------------------------------------------------- */
.value-card {
  border-radius: var(--radius-lg, 12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08)) !important;
}

.value-icon {
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light, #EFF6FF);
  border-radius: 50%;
  margin: 0 auto;
  color: var(--primary, #3B82F6);
}

/* --------------------------------------------------------------------------
   Order Parts Page
   -------------------------------------------------------------------------- */
.parts-card {
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.parts-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08)) !important;
}

.parts-card-image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.parts-card:hover .parts-card-image {
  opacity: 0.9;
}

.quote-form .form-control,
.quote-form .form-select {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-color, #E2E8F0);
}

.quote-form .form-control:focus,
.quote-form .form-select:focus {
  border-color: var(--primary, #3B82F6);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

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

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   Service Detail Pages
   -------------------------------------------------------------------------- */
.service-price-banner {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.service-price-banner .price-from {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.service-price-banner .pricing-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

/* Service article typography */
.service-article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-heading);
}
.service-article p {
  color: var(--text-muted);
  line-height: 1.75;
}
.service-article ul {
  color: var(--text-muted);
  line-height: 1.75;
}
.service-article ul li {
  margin-bottom: 0.5rem;
}

/* Services index category sections */
.service-index-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-index-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

/* Multi-level dropdown submenus */
.dropdown-submenu {
  position: relative;
}
.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -0.375rem;
  margin-left: 0;
  display: none;
  position: absolute;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  min-width: 12rem;
}
/* Right-pointing arrow for category items */
.dropdown-submenu > a.submenu-toggle::after {
  display: inline-block;
  margin-left: auto;
  float: right;
  margin-top: 0.35em;
  content: "";
  border-top: 0.3em solid transparent;
  border-bottom: 0.3em solid transparent;
  border-left: 0.3em solid;
  border-right: 0;
  vertical-align: middle;
}

/* Desktop: hover to open submenu to the right */
@media (min-width: 992px) {
  .dropdown-submenu:hover > .dropdown-menu,
  .dropdown-submenu:focus-within > .dropdown-menu {
    display: block !important;
  }
  .dropdown-submenu > a.submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 1rem;
  }
  /* Prevent parent dropdown from closing when hovering submenu */
  .dropdown-menu > .dropdown-submenu > .dropdown-menu {
    pointer-events: auto;
  }
}

/* Mobile: click to toggle, stack vertically */
@media (max-width: 991.98px) {
  .navbar .dropdown-menu {
    max-height: 70vh;
    overflow-y: auto;
  }
  .dropdown-submenu > .dropdown-menu {
    position: static !important;
    left: 0;
    margin-top: 0;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    background: transparent;
  }
  .dropdown-submenu > a.submenu-toggle::after {
    float: right;
    border-left: 0.3em solid;
    border-top: 0.3em solid transparent;
    border-bottom: 0.3em solid transparent;
    border-right: 0;
    transition: transform 0.2s;
  }
  .dropdown-submenu.show > a.submenu-toggle::after {
    transform: rotate(90deg);
  }
  .dropdown-submenu.show > .dropdown-menu {
    display: block !important;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .pricing-price {
    font-size: 1.4rem;
  }

  .pricing-price-lg {
    font-size: 1.6rem;
  }

  .parts-card-image {
    height: 120px;
  }

  .section-padding {
    padding: 2.5rem 0;
  }
}
