/* 
================================================================
  BUILDERS TEMPLATE - RESPONSIVE STYLES (responsive.css)
================================================================
*/

/* 1. Large Screen Adjustments (1200px and under) */
@media (max-width: 1200px) {
  :root {
    --section-padding: 60px 0;
  }
  
  .container {
    width: 92%;
  }
}

/* 2. Tablet Screens (1024px and under) */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero::before {
    background: rgba(17, 24, 39, 0.85); /* Slightly darker for readability */
  }

  .hero-content {
    max-content: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .quick-quote-card {
    max-width: 550px;
    margin: 0 auto;
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* 3. Small Tablets & Landscape Mobile (768px and under) */
@media (max-width: 768px) {
  /* Topbar Hide on Mobile for space saving */
  .topbar {
    display: none;
  }

  /* Sticky Header overrides */
  header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
  }

  /* Responsive Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: block;
  }

  .nav-ctas {
    display: none; /* Hide phone & button in direct bar, put in sidebar if needed, or hide */
  }

  .nav-menu {
    position: fixed;
    top: 70px; /* height of header */
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - 70px);
    background-color: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 30px;
    gap: 25px;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-normal);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-link {
    font-size: 1.1rem;
    width: 100%;
    display: block;
    border-bottom: 1px solid var(--color-gray-100);
    padding-bottom: 10px;
  }

  .nav-link::after {
    display: none; /* Remove line animation for mobile */
  }

  /* Menu Overlay background when open */
  .menu-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 998;
  }

  .menu-overlay.active {
    display: block;
  }

  /* Section Spacing Adjustments */
  .stats-bar {
    margin-top: -15px;
    padding: 30px 0;
  }

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

  .why-grid, 
  .services-grid, 
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-item.wide {
    grid-column: span 1; /* Reset spans on mobile for vertical alignment */
  }

  /* Process Timeline Responsive */
  .process-timeline::before {
    left: 20px;
  }

  .process-step {
    width: 100%;
    margin-bottom: 40px;
  }

  .process-step:nth-child(odd),
  .process-step:nth-child(even) {
    left: 0;
    padding-left: 50px;
    padding-right: 0;
    text-align: left;
  }

  .process-step:nth-child(odd) .process-number,
  .process-step:nth-child(even) .process-number {
    left: 0;
  }

  .testimonial-card {
    padding: 25px;
  }

  .lightbox-prev, 
  .lightbox-next {
    display: none; /* Hide visual buttons on mobile to encourage swipe / taps */
  }
}

/* 4. Portrait Mobile Screens (480px and under) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .quick-quote-card {
    padding: 20px;
  }

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

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

  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-item,
  .gallery-item.tall {
    height: 250px; /* Uniform height for clean grid on small mobile */
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .footer-bottom-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Move WhatsApp & Back to top slightly to not clash */
  .whatsapp-float {
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
