/* responsive.css — Responsive Layout and Breakpoint Overrides */

/*
   Breakpoint reference (not valid as CSS custom properties inside @media,
   listed here for developer reference only):
     --bp-sm:  480px
     --bp-md:  768px
     --bp-lg:  1024px
     --bp-xl:  1200px
*/

/* ============================================================
   Testimonials Section: Subtle Background Texture (image 6)
   ============================================================ */

#testimonials {
  position: relative;
  isolation: isolate;
}

#testimonials::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/6.jpeg');
  background-size: cover;
  background-position: center;
  opacity: 0.07;
  z-index: -1;
  pointer-events: none;
}

/* ============================================================
   Below 1024px
   Collapse two-column layouts and show the hamburger.
   ============================================================ */

@media (max-width: 1024px) {

  /* Hero: single column, image below */
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-content { order: 1; text-align: center; }
  .hero-visual  { order: 2; }

  .hero-content .lead {
    max-width: 560px;
    margin-inline: auto;
  }

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

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

  /* About: single column, image above */
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-visual  { order: 1; }
  .about-content { order: 2; }

  .about-image-wrap {
    max-width: 500px;
    margin-inline: auto;
  }

  .about-image-frame {
    min-height: 420px;
  }

  /* Credentials: single column */
  .credentials-grid {
    grid-template-columns: 1fr;
  }

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

  /* Nav: hide desktop links, show toggle */
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Mobile nav: slide-down dropdown */
  .nav-mobile {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--color-gold-light);
    box-shadow: var(--shadow-card);
    padding-inline: var(--space-md);
    padding-block: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 350ms ease, padding-block 350ms ease;
  }

  .nav-mobile.open {
    max-height: 600px;
    padding-block: 1.25rem 1.75rem;
  }

  .nav-mobile a {
    font-size: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(245, 238, 227, 0.55);
    width: 100%;
    display: block;
  }

  .nav-mobile a:last-child {
    border-bottom: none;
    margin-top: 1rem;
    width: 100%;
    text-align: center;
    padding: 0;
  }

}

/* ============================================================
   Below 768px
   Grid collapses, font reductions, layout adjustments.
   ============================================================ */

@media (max-width: 768px) {

  /* Section padding reduction */
  .section,
  .section-alt,
  .hero-section,
  .mission-section {
    padding-block: var(--space-lg);
  }

  /* Container breathing room */
  .container,
  .container-narrow {
    padding-inline: 1.25rem;
  }

  /* All grids collapse to single column */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Hero display font clamp */
  .hero-content .display {
    font-size: clamp(2.2rem, 9vw, 2.6rem);
  }

  /* Hero buttons: full width stacked column */
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-outline {
    width: 100%;
    text-align: center;
  }

  /* Hero image */
  .hero-image-frame {
    min-height: 340px;
  }

  /* Floating card: bottom center of image frame */
  .hero-floating-card {
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Mission quote */
  .mission-quote {
    font-size: 1.5rem;
  }

  /* Credentials cert grid: two columns on mid-mobile */
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer top: stacked and centered */
  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-sm);
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
  }

}

/* ============================================================
   Below 480px
   Touch-friendly adjustments, further font reduction.
   ============================================================ */

@media (max-width: 480px) {

  /* Nav height reduction */
  .nav-inner {
    height: 60px;
  }

  /* Hero badges: single-row horizontal scroll */
  .hero-badges {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding-bottom: 0.3rem;
    scroll-snap-type: x mandatory;
  }

  .hero-badges .badge {
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  /* About stat grid stays 2 columns */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact form: larger touch targets */
  .form-input,
  .form-select,
  .form-textarea {
    padding: 1rem 1.1rem;
  }

  /* Service card padding reduction */
  .card.service-card {
    padding: 1.25rem;
  }

  /* Service card image: account for reduced padding */
  .service-card-img {
    margin-inline: -1.25rem;
    margin-top: -1.25rem;
  }

  /* Cert grid: single column on very small screens */
  .cert-grid {
    grid-template-columns: 1fr;
  }

  /* Section header tighter */
  .section-header {
    margin-bottom: var(--space-md);
  }

}
