/* ==========================================================================
   SPA CAR CARE - TABLET & MOBILE RESPONSIVE REFINEMENTS
   Breakpoints:
   - Desktop: 1440px, 1366px, 1280px (PRESERVED 100% UNTOUCHED)
   - Tablet: 1024px, 912px, 820px, 768px
   - Mobile: 430px, 390px, 375px, 360px, 320px
   ========================================================================== */

/* --- Desktop 1440px, 1366px & 1280px (Preserved Desktop Container Widths) --- */
@media (max-width: 1440px) {
  :root {
    --container-width: 1240px;
  }
}

@media (max-width: 1366px) {
  :root {
    --container-width: 1180px;
  }
}

@media (max-width: 1280px) {
  :root {
    --container-width: 1120px;
  }

  .nav-menu {
    gap: 24px;
  }
}

/* ==========================================================================
   TABLET RESPONSIVE RULES (1024px, 912px, 820px, 768px)
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --container-width: 920px;
  }

  /* Tablet Section & Text Sizing */
  .section-title {
    font-size: clamp(2.1rem, 3.8vw, 2.4rem);
  }

  .section-subtitle {
    font-size: 1rem;
    max-width: 620px;
  }

  .hero-headline {
    font-size: clamp(2.6rem, 5vw, 3.4rem);
  }

  .hero-subtitle {
    font-size: 1.05rem;
    max-width: 580px;
  }

  /* Compact Balanced Buttons */
  .btn {
    padding: 14px 24px;
    font-size: 0.85rem;
    min-height: 46px;
    width: fit-content;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid > div:nth-child(2) {
    border-right: none;
  }

  .stats-grid > div:nth-child(3),
  .stats-grid > div:nth-child(4) {
    border-top: 1px solid var(--border-dark);
  }

  .split-grid {
    gap: 36px;
  }

  .ppf-visual img {
    height: 380px;
  }

  .process-timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .timeline-line-bg, .timeline-line-progress {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

/* --- Tablet Specific 912px & 820px --- */
@media (max-width: 912px) {
  .hero-content {
    margin-top: 20px;
  }

  .hero-headline {
    font-size: clamp(2.4rem, 4.5vw, 3rem);
  }

  .services-grid {
    gap: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 820px) {
  .hero-actions {
    justify-content: flex-start;
    gap: 12px;
  }

  .hero-actions .btn {
    width: fit-content;
    padding: 13px 22px;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .ppf-content {
    padding-right: 0;
  }

  .features-grid {
    gap: 20px;
  }
}

/* --- Tablet Portrait 768px --- */
@media (max-width: 768px) {
  .header-cta .btn {
    display: none;
  }

  .nav-menu {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .brand-logo-img {
    height: 42px;
    max-width: 180px;
  }

  .section-padding {
    padding: 60px 0;
  }

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

  .section-subtitle {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .hero-headline {
    font-size: 2.35rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  /* Side-By-Side Hero CTA Buttons for 768px Tablet */
  .hero-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 520px !important;
  }

  .hero-actions .btn {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    padding: 13px 16px !important;
    font-size: 0.84rem !important;
    min-height: 48px !important;
    justify-content: center !important;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .service-card {
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
  }

  .service-body {
    padding: 24px;
  }

  .service-title {
    font-size: 1.25rem;
  }

  .service-desc {
    font-size: 0.9rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-badge-float {
    bottom: 16px;
    left: 16px;
    padding: 10px 14px;
  }

  .about-pillars-header {
    margin-top: 48px;
    margin-bottom: 24px;
  }

  .about-features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .creative-feature-card {
    padding: 24px 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-info-card, .contact-form-card {
    padding: 28px;
  }

  /* Compact Contact Form & Info Buttons */
  .contact-form-card .btn,
  .contact-info-card .btn,
  .info-card-btn,
  .form-submit-btn {
    width: fit-content !important;
    min-width: 140px;
    padding: 12px 22px;
    align-self: flex-start;
  }

  .ba-slider-container {
    height: 360px;
  }

  /* 2x2 Grid for Gallery Filter Buttons on Mobile & Tablet */
  .gallery-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto 32px auto;
  }

  .filter-btn {
    width: 100%;
    padding: 12px 10px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
    white-space: nowrap;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .gallery-item {
    height: 240px;
  }

  .final-cta-actions {
    gap: 12px;
  }

  .final-cta-actions .btn {
    width: auto;
    min-width: 140px;
    padding: 12px 22px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   MOBILE RESPONSIVE RULES (430px, 390px, 375px, 360px, 320px)
   ========================================================================== */
@media (max-width: 430px) {
  :root {
    --container-padding: 20px;
  }

  /* Preloader Mobile Responsive Scaling */
  .preloader-content {
    width: 88%;
    max-width: 320px;
  }

  .preloader-logo-img {
    height: 48px;
  }

  .running-car {
    width: 68px;
    height: 24px;
    bottom: 2px;
  }

  .preloader-text {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
  }

  .preloader-num {
    font-size: 0.88rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Mobile Text Scaling */
  .hero-headline {
    font-size: 2rem;
    line-height: 1.1;
    margin: 16px 0;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .badge-tag {
    font-size: 0.7rem;
    padding: 5px 12px;
  }

  /* Compact Button Styling for Mobile 430px & 390px */
  .btn {
    width: fit-content;
    min-width: 130px;
    padding: 12px 20px;
    font-size: 0.82rem;
    min-height: 44px;
  }

  /* Hero Actions Side-By-Side Row Layout for Mobile */
  .hero-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .hero-actions .btn {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    padding: 12px 6px !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.04em !important;
    min-height: 46px !important;
    justify-content: center !important;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    divide-x: none;
  }

  .stats-grid > div {
    border-right: none !important;
    border-bottom: 1px solid var(--border-dark);
    padding: 20px 16px;
  }

  .stats-grid > div:last-child {
    border-bottom: none;
  }

  .stat-number {
    font-size: 2.1rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  .ppf-visual img {
    height: 280px;
  }

  .ppf-badge-float {
    bottom: 14px;
    left: 14px;
    padding: 10px 14px;
  }

  .benefit-list {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0;
  }

  .benefit-item {
    font-size: 0.9rem;
  }

  .process-timeline {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .step-node {
    width: 60px;
    height: 60px;
    font-size: 1rem;
    margin-bottom: 16px;
  }

  .gallery-filter-bar {
    gap: 8px;
    margin-bottom: 24px;
  }

  .filter-btn {
    padding: 10px 4px;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    min-height: 44px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-item {
    height: 230px;
  }

  .ba-slider-container {
    height: 300px;
  }

  .ba-badge {
    font-size: 0.65rem;
    padding: 4px 10px;
    top: 12px;
  }

  .final-cta-title {
    font-size: 1.85rem;
  }

  .final-cta-subtitle {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }

  .final-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .final-cta-actions .btn {
    width: auto;
    min-width: 125px;
    padding: 11px 18px;
    font-size: 0.8rem;
  }

  .contact-form-card, .contact-info-card {
    padding: 22px 18px;
  }

  .form-label {
    font-size: 0.75rem;
  }

  .form-input, .form-select, .form-textarea {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .contact-form-card .btn,
  .contact-info-card .btn,
  .info-card-btn,
  .form-submit-btn {
    width: fit-content !important;
    padding: 11px 20px;
    font-size: 0.82rem;
    align-self: flex-start;
  }

  .lightbox-prev {
    left: 8px;
    width: 38px;
    height: 38px;
  }

  .lightbox-next {
    right: 8px;
    width: 38px;
    height: 38px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }
}

/* --- Mobile Small (375px & 360px) --- */
@media (max-width: 375px) {
  :root {
    --container-padding: 16px;
  }

  .hero-headline {
    font-size: 1.85rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .brand-logo .logo-title {
    font-size: 1.1rem;
  }

  .brand-logo .logo-tagline {
    font-size: 0.58rem;
  }

  .btn {
    padding: 11px 18px;
    font-size: 0.78rem;
    min-height: 42px;
  }

  .ppf-visual img {
    height: 250px;
  }

  .stat-number {
    font-size: 1.95rem;
  }

  .feature-card {
    padding: 22px 18px;
  }

  .feature-num {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  .feature-title {
    font-size: 1.1rem;
  }

  .feature-desc {
    font-size: 0.88rem;
  }
}

/* --- Mobile Extra Small (320px) --- */
@media (max-width: 320px) {
  :root {
    --container-padding: 12px;
  }

  .hero-headline {
    font-size: 1.65rem;
  }

  .section-title {
    font-size: 1.45rem;
  }

  .hero-actions {
    gap: 4px !important;
  }

  .hero-actions .btn {
    padding: 10px 3px !important;
    font-size: 0.65rem !important;
    min-height: 42px !important;
    letter-spacing: 0 !important;
  }

  .btn {
    font-size: 0.75rem;
    padding: 10px 16px;
  }

  .floating-controls-right {
    bottom: 16px;
    right: 16px;
    gap: 10px;
  }

  .floating-btn {
    width: 44px;
    height: 44px;
  }
}
