/* ==========================================================================
   RESPONSIVE.CSS - KR PEST CONTROL SERVICES PVT. LTD
   Media Queries & Breakpoints (320px to 1920px)
   ========================================================================== */

/* 1. Large Displays (1440px - 1920px+) */
@media screen and (min-width: 1440px) {
  :root {
    --container-max-width: 1400px;
  }
  h1 {
    font-size: 3.75rem;
  }
}

/* 2. Standard Laptops (1025px - 1366px) */
@media screen and (max-width: 1366px) {
  html {
    font-size: 15px;
  }
  .container {
    padding: 0 1.5rem;
  }
}

/* 3. Small Laptops & Tablets (769px - 1024px) */
@media screen and (max-width: 1024px) {
  :root {
    --header-height: 70px;
  }
  
  html {
    font-size: 14px;
  }
  
  .section-padding {
    padding: 6rem 0;
  }
  
  /* Grids adjustments */
  .grid-4, .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .grid-3, .values-grid, .services-grid-home {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }

  .services-grid-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  /* Header Nav collapses to Mobile Drawer */
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 3rem 0;
    gap: 2rem;
    transition: var(--transition-smooth);
    z-index: 1000;
    box-shadow: var(--shadow-md);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-actions {
    margin-top: 1rem;
  }

  /* Reset mobile nav link colors to dark for readability in mobile drawer */
  .site-header:not(.sticky) .nav-menu .nav-link {
    color: var(--text-dark);
  }

  .site-header.sticky .nav-menu {
    top: 75px;
    height: calc(100vh - 75px);
  }

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

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* 4. Large Mobile to Small Tablets (426px - 768px) */
@media screen and (max-width: 768px) {
  /* Hide Top bar on small screens to save vertical space */
  .top-bar {
    display: none;
  }
  
  .site-header {
    top: 0;
  }
  
  h1 {
    font-size: 2.75rem;
  }
  
  h2 {
    font-size: 1.85rem;
  }
  
  .grid-2, .grid-3, .grid-4,
  .hero-container, .contact-layout, .services-grid-list, .values-grid, .team-grid, .services-grid-home {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .section-padding {
    padding: 5rem 0;
  }

  /* Sticky navbar position fix */
  .site-header.sticky {
    height: 70px;
  }

  .logo-img {
    height: 60px;
  }

  .logo-img-footer {
    height: 86px;
  }
  
  /* Before After Slider responsiveness */
  .ba-slider-container {
    height: 300px !important;
  }
  
  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
  }

  .footer-bottom-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-bottom-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .footer-bottom-links a {
    margin-left: 0;
  }

  /* Prevent side overflow from absolute cards on mobile */
  .hero-floating-card {
    display: none !important;
  }

  /* Keep hero banner background and image static on mobile (no transitions/jumps) */
  .hero-section {
    background-attachment: scroll !important;
    padding: 7rem 0 5rem !important;
    text-align: center;
  }

  .hero-container {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 2rem;
  }

  .hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    margin-bottom: 2rem;
  }

  .hero-main-img {
    max-width: 90%;
    margin: 0 auto;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3) !important;
  }

  .hero-visual.reveal, .hero-text.reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  .testimonial-text {
    font-size: 1.15rem;
  }

  .page-banner {
    padding: 8rem 0 4rem;
  }

  .glass-card {
    padding: 2rem !important;
  }

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

/* 5. Small Mobile (320px - 425px) */
@media screen and (max-width: 425px) {
  html {
    font-size: 13.5px;
  }
  
  h1 {
    font-size: 2.25rem;
  }
  
  .container {
    padding: 0 1.25rem;
  }
  
  .section-padding {
    padding: 4.5rem 0;
  }
  
  .btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Hero buttons adjustment */
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }

  /* Floating action adjustments */
  .floating-actions {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .btn-float {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  
  .back-to-top {
    bottom: 5.5rem;
    right: 1.5rem;
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .page-banner {
    padding: 7rem 0 3.5rem;
  }

  .glass-card {
    padding: 1.5rem !important;
  }

  .cta-title {
    font-size: 1.65rem;
    margin-bottom: 1rem;
  }
}

@media screen and (max-width: 320px) {
  h1 {
    font-size: 2rem;
  }
}
