/* ArchMEP – Responsive Styles */

@media (max-width: 1280px) {
  .container {
    max-width: 100%;
  }
}

@media (max-width: 1024px) {
  .section {
    padding: 56px 0;
  }

  .page-home .section {
    padding: 44px 0;
  }

  .page-home .why-grid {
    gap: 28px;
  }

  .why-grid,
  .story-grid,
  .service-detail,
  .industry-detail,
  .contact-grid,
  .project-content-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .service-detail:nth-of-type(even),
  .industry-detail:nth-of-type(even) {
    direction: ltr;
  }

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

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

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .stat-item:nth-child(odd):not(:nth-last-child(1))::after {
    display: block;
    right: 0;
    top: auto;
    bottom: -12px;
    left: 20%;
    width: 60%;
    height: 1px;
    transform: none;
  }

  .values-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .why-features {
    grid-template-columns: 1fr;
  }

  .page-home .why-features--quad {
    grid-template-columns: 1fr;
  }

  .page-home .why-content {
    min-width: 0;
  }

  .why-grid > * {
    min-width: 0;
  }

  .hero {
    min-height: 72vh;
    padding: calc(var(--header-height) + 56px) 0 56px;
  }

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

  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .header-actions {
    gap: 10px;
    flex-shrink: 0;
  }

  .header-inner .logo {
    min-width: 0;
    flex-shrink: 1;
  }

  .header-inner .logo-img {
    max-width: min(140px, 38vw);
    height: auto;
    max-height: 40px;
  }

  .header-cta {
    display: inline-flex;
    padding: 8px 14px;
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .header-cta .cta-full {
    display: none;
  }

  .header-cta .cta-short {
    display: inline;
  }

  .project-sidebar {
    position: static;
  }

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

@media (max-width: 768px) {
  .logo-img {
    height: 38px;
  }
  :root {
    --header-height: 70px;
  }

  .header-cta {
    padding: 7px 12px;
    font-size: 0.6875rem;
  }

  .section {
    padding: 60px 0;
  }

  .page-home .section {
    padding: 40px 0;
  }

  .page-home .section-header {
    margin-bottom: 24px;
  }

  .page-home .cta-banner {
    padding: 36px 24px;
  }

  .page-home .footer {
    padding-top: 40px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .hero {
    min-height: 70vh;
    align-items: center;
    padding: calc(var(--header-height) + 40px) 0 48px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.78) 100%);
  }

  .hero-brand {
    font-size: 1.25rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.35rem);
  }

  .hero-desc {
    font-size: 0.975rem;
    margin-bottom: 28px;
  }

  .hero .btn-group {
    flex-wrap: wrap;
  }

  .capability-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .capability-card span {
    font-size: 0.8125rem;
    padding: 12px 14px;
  }

  .services-grid,
  .projects-grid,
  .industries-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .values-grid,
  .team-grid,
  .team-grid--single {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }

  .footer-bottom > p:first-child,
  .footer-credit,
  .footer-social {
    justify-self: center;
  }

  .cta-banner {
    padding: 48px 28px;
  }

  .contact-form,
  .contact-info-card {
    padding: 32px 24px;
  }

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

  .projects-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box input {
    width: 100%;
  }

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

  .page-hero {
    padding: calc(var(--header-height) + 48px) 0 48px;
  }

  .project-hero {
    height: 50vh;
    min-height: 300px;
  }

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

  .gallery-lightbox {
    padding: 12px;
  }

  .gallery-lightbox-close {
    top: 12px;
    right: 12px;
  }

  .gallery-lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .gallery-lightbox-prev {
    left: 8px;
  }

  .gallery-lightbox-next {
    right: 8px;
  }

  .gallery-lightbox-image {
    max-height: calc(88vh - 40px);
  }

  .global-map {
    padding: 32px 24px;
  }

  .software-grid {
    gap: 32px;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
  }

  .hero .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .testimonial-quote {
    font-size: 1.125rem;
  }
}

@media (max-width: 375px) {
  .container {
    padding: 0 16px;
  }

  body {
    font-size: 16px;
  }

  .hero-desc {
    font-size: 1.0625rem;
  }

  .why-image-stats {
    flex-direction: column;
  }

  .why-image-stats span {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}
