/* ==========================================================================
   FRIDGE REPAIR SERVICE CENTER - COMPLETE RESPONSIVE SYSTEM
   Domain: https://fridgerepairservicecenter.com
   Tested Viewports: 320px, 360px, 375px, 393px, 430px, Tablet & Desktop (1366px+)
   Zero Horizontal Overflow - Flexible Widths - Proper Box Sizing
   ========================================================================== */

/* 1. Mobile Drawer Navigation & Backdrop */
.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 34, 64, 0.65);
  z-index: 850;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
}

.nav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 290px;
  max-width: 82vw;
  height: 100%;
  background-color: #ffffff;
  z-index: 860;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-header .logo-title {
  font-size: 1.05rem;
}

.close-menu-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-primary-dark);
  padding: 0.2rem 0.4rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.mobile-nav-links a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-main);
  padding: 0.65rem 0.25rem;
  border-bottom: 1px solid var(--color-bg-soft);
  display: block;
}

.mobile-nav-links a:hover, .mobile-nav-links a.active {
  color: var(--color-primary);
  text-decoration: none;
}

.mobile-nav-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* 2. Tablet & Medium Desktop Breakpoints (< 992px) */
@media screen and (max-width: 991px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-image-wrapper {
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .card-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* 3. Mobile Viewports (< 768px) */
@media screen and (max-width: 767px) {
  body {
    padding-bottom: 74px; /* Essential clearance for fixed bottom contact bar */
  }

  .site-header {
    height: auto;
    min-height: 60px;
  }

  .header-inner {
    height: 60px;
  }

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

  .hero-section {
    padding: 2rem 0 2.25rem 0;
  }

  .hero-features-list {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  /* Single Column Grids on Mobile to Prevent Overflow */
  .card-grid-4, .card-grid-3, .card-grid-2 {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  /* Fixed Bottom Contact Bar Display */
  .mobile-bottom-bar {
    display: block;
  }

  /* Compact Circular Floating Buttons to Prevent Content Overlap */
  .floating-side-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }

  .floating-side-btn span {
    display: none;
  }

  .floating-wa-btn {
    left: 8px;
  }

  .floating-call-btn {
    right: 8px;
  }

  /* Header Call Button adjustment on Mobile */
  .header-actions .btn-call span {
    display: none;
  }

  .header-actions .btn-call {
    padding: 0.45rem 0.55rem;
  }

  /* Photo Cards Image Height Adjustment */
  .photo-card-img-wrap {
    height: 180px;
  }
}

/* 4. Small to Standard Smartphones (< 480px) */
@media screen and (max-width: 479px) {
  .site-container {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .logo-icon {
    width: 34px;
    height: 34px;
  }

  .logo-title {
    font-size: 0.95rem;
    white-space: normal;
    line-height: 1.15;
  }

  .logo-sub {
    display: none; /* Hide subtitle on small screens to fit logo comfortably */
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
    white-space: normal;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }

  .city-pill-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .city-pill {
    padding: 0.5rem 0.4rem;
    font-size: 0.82rem;
  }

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

  .faq-question {
    font-size: 0.95rem;
    padding: 0.9rem 1rem;
  }
}

/* 5. Ultra-Narrow Devices (320px – 359px) */
@media screen and (max-width: 359px) {
  .site-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .logo-title {
    font-size: 0.88rem;
  }

  .header-actions .btn-call {
    display: none; /* Keep header clean: logo + hamburger only on 320px */
  }

  .city-pill-grid {
    grid-template-columns: 1fr; /* Single column on 320px */
  }

  .brand-directory-grid {
    grid-template-columns: 1fr;
  }

  .bottom-bar-btn {
    font-size: 0.88rem;
    padding: 0.65rem 0.35rem;
  }
}

/* 6. Large Screens (1366px and Above) */
@media screen and (min-width: 1366px) {
  .site-container {
    max-width: 1240px;
  }

  .hero-section {
    padding: 4.5rem 0 3.8rem 0;
  }

  .hero-lead {
    font-size: 1.15rem;
  }

  .hero-image-wrapper img {
    max-height: 460px;
  }
}
