/* QA Pass: 2026-02-26 — Fixed breakpoint structure and mobile behavior */
/* ===== MOBILE FIRST (default styles in style.css are for mobile) ===== */

/* Small phones (320px - 480px) — default */

/* Large phones / Small tablets (481px+) */
@media screen and (min-width: 481px) {
  .container {
    width: min(100% - 2.2rem, var(--container-max-width));
  }

  .hero-logo {
    max-width: 240px;
  }

  .hero-actions {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: auto;
  }

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

/* Tablets (769px+) */
@media screen and (min-width: 769px) {
  :root {
    --section-padding: 64px 0;
  }

  .section-title {
    font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  }

  .about-preview-grid {
    grid-template-columns: 1.2fr minmax(300px, 400px);
  }

  .about-story-grid {
    grid-template-columns: 1.1fr minmax(340px, 500px);
    gap: 2rem;
    align-items: start;
  }

  .photo-carousel {
    max-width: 550px;
  }

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

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .consulting-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-detail-list p {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-logo {
    max-width: 320px;
  }

  .hero-kicker {
    letter-spacing: 2px;
    font-size: 0.9rem;
  }
}

/* Desktop (1025px+) */
@media screen and (min-width: 1025px) {
  :root {
    --section-padding: 80px 0;
  }

  .mobile-header,
  .nav-overlay,
  .sidebar-close {
    display: none;
  }

  .sidebar {
    -webkit-transform: translateX(0);
    -ms-transform: translateX(0);
    transform: translateX(0);
    padding: 2rem 1.25rem;
  }

  .site-main,
  .site-footer {
    margin-left: 240px;
  }

  .site-main {
    padding-top: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

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

  .feature-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-logo {
    max-width: 350px;
  }

  .hero-kicker {
    letter-spacing: 3px;
    font-size: 0.82rem;
  }

  .carousel-arrow {
    top: 50%;
    bottom: auto;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
  }

  .carousel-arrow.prev {
    left: -0.7rem;
    margin-left: 0;
  }

  .carousel-arrow.next {
    right: -0.7rem;
    margin-right: 0;
  }

  .carousel-dots {
    margin-top: 1rem;
  }
}

/* Large desktop (1441px+) */
@media screen and (min-width: 1441px) {
  .container {
    width: min(100% - 4rem, 1320px);
  }

  .section-title {
    font-size: clamp(2.2rem, 3vw, 3.2rem);
  }

  .hero-heading {
    font-size: clamp(2.8rem, 5vw, 4.3rem);
  }
}

/* Hero section on mobile */
@media screen and (max-width: 768px) {
  .hero,
  .home-hero {
    min-height: 100svh;
    padding: 40px 20px;
    text-align: center;
  }

  .hero-logo {
    max-width: 200px;
  }

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

  .hero .tagline,
  .hero-kicker {
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .hero .cta-buttons,
  .hero-actions {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 12px;
  }

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

/* Photo carousel full-width on mobile */
@media screen and (max-width: 768px) {
  .photo-carousel {
    max-width: 100%;
  }
}

/* Stat cards on mobile */
@media screen and (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

/* Service cards stack on mobile */
@media screen and (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

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

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

/* Testimonial carousel on mobile */
@media screen and (max-width: 768px) {
  .testimonial-carousel {
    padding: 0 20px;
  }

  .testimonial-card {
    padding: 30px 20px;
  }

  .testimonials-preview .testimonial-quote,
  .testimonials-preview .testimonial-text {
    font-size: 1rem;
  }

  /* Arrows below the card on mobile so they don't overlap the CTA button */
  .carousel-arrow {
    position: static;
    -webkit-transform: none;
    -ms-transform: none;
    transform: none;
  }

  .testimonial-carousel {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
  }

  .carousel-viewport {
    width: 100%;
    -webkit-box-ordinal-group: 1;
    -ms-flex-order: 1;
    order: 1;
  }

  .carousel-arrow.prev {
    -webkit-box-ordinal-group: 2;
    -ms-flex-order: 2;
    order: 2;
  }

  .carousel-arrow.next {
    -webkit-box-ordinal-group: 3;
    -ms-flex-order: 3;
    order: 3;
  }

  .carousel-dots {
    margin-top: 20px;
    width: 100%;
    -webkit-box-ordinal-group: 4;
    -ms-flex-order: 4;
    order: 4;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }
}

/* Contact form full-width on mobile */
@media screen and (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  .phoenix-grid {
    flex-direction: column;
  }
  .phoenix-media {
    flex: none;
    width: 100%;
  }
  .phoenix-section video {
    max-width: 300px;
  }
}
