/* ==========================================================================
   Responsive Stylesheet - Cleaning Service Website
   Breakpoints: 1024px / 768px / 480px
   ========================================================================== */

/* --------------------------------------------------------------------------
   General Responsive Rules
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

body {
  overflow-x: hidden;
}

/* Ensure adequate touch targets on interactive elements */
a,
button,
input[type="submit"],
input[type="button"],
.nav-toggle {
  min-height: 44px;
  min-width: 44px;
}

/* --------------------------------------------------------------------------
   Hamburger Menu Toggle (hidden by default, shown on mobile)
   -------------------------------------------------------------------------- */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: #333;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X animation moved to fixes.css */

/* ==========================================================================
   BREAKPOINT: 1024px - Tablet Landscape
   ========================================================================== */

@media screen and (max-width: 1024px) {

  /* Container */
  .container {
    max-width: 960px;
    padding-left: 24px;
    padding-right: 24px;
  }

  /* Section padding reduction */
  section,
  .section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  /* Grids: 4-column layouts become 2 columns */
  .values-grid,
  .target-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Services grid: cap at 2 columns */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Contact grid stays 2 columns but with reduced gap */
  .contact-grid {
    gap: 30px;
  }

  /* Headings use clamp() for fluid scaling */
}

/* ==========================================================================
   BREAKPOINT: 768px - Tablet Portrait
   ========================================================================== */

@media screen and (max-width: 768px) {

  /* Container */
  .container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Section padding reduction */
  section,
  .section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  /* --- Navigation: handled in fixes.css (drawer menu) --- */

  /* --- Hero Section --- */

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

  .hero p,
  .hero-subtitle {
    font-size: 1.05rem;
  }

  /* --- Grids: 2 columns maintained for values/target/pricing --- */
  .values-grid,
  .target-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

  /* Contact grid: single column */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Form row: single column */
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Headings use clamp() for fluid scaling */

  /* Reduce card padding */
  .card,
  .service-card,
  .pricing-card,
  .value-card,
  .target-card {
    padding: 24px;
  }
}

/* ==========================================================================
   BREAKPOINT: 480px - Mobile
   ========================================================================== */

@media screen and (max-width: 480px) {

  /* Container */
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Section padding */
  section,
  .section {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  /* --- All grids: single column --- */
  .values-grid,
  .target-grid,
  .services-grid,
  .pricing-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Form row stays single column */
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* --- Hero Section --- */

  .hero h1,
  .hero-title {
    font-size: 1.6rem;
    line-height: 1.25;
  }

  .hero p,
  .hero-subtitle {
    font-size: 0.95rem;
  }

  /* Headings use clamp() for fluid scaling */

  p {
    font-size: 0.95rem;
  }

  /* --- Cards: less padding --- */
  .card,
  .service-card,
  .pricing-card,
  .value-card,
  .target-card {
    padding: 18px;
  }

  /* --- Buttons: full width only in forms --- */
  .contact-form .btn,
  button[type="submit"],
  input[type="submit"] {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }

  /* --- Form inputs: full width with adequate touch size --- */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="url"],
  select,
  textarea {
    width: 100%;
    min-height: 44px;
    padding: 12px;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  .navbar .logo img {
    height: 48px;
  }

  /* Footer centered */
  /* Pricing card highlight adjustments */
  .pricing-card.featured,
  .pricing-card.popular {
    transform: none;
  }
}

/* ==========================================================================
   Utility: Smooth Scaling & Accessibility
   ========================================================================== */

/* Fluid typography uses clamp() in base styles — no breakpoint overrides needed */

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
