/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet landscape */
@media (max-width: 1199px) {
  .ps-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet portrait */
@media (max-width: 991px) {
  :root {
    --nav-height: 64px;
  }

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

  .ps-grid--2 {
    grid-template-columns: 1fr;
  }

  .ps-section {
    padding: clamp(3rem, 6vw, 5rem) 0;
  }

  .ps-container {
    padding: 0 var(--space-lg);
  }

  /* Hero adjustments handled in hero.php inline styles */

  /* About section */
  .ps-about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .ps-about__image {
    order: -1;
    max-height: 400px;
  }

  /* Stats */
  .ps-about__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact grid */
  .ps-contact__grid {
    grid-template-columns: 1fr;
  }

  .ps-contact__map {
    height: 400px;
    aspect-ratio: auto;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .ps-grid--4,
  .ps-grid--3 {
    grid-template-columns: 1fr;
  }

  .ps-card {
    padding: var(--space-xl);
  }

  .ps-btn--lg {
    padding: 14px 28px;
    width: 100%;
    justify-content: center;
  }

  .ps-section-header {
    margin-bottom: var(--space-2xl);
  }

  /* Hero mobile handled in hero.php inline styles */

  /* Features */
  .ps-features__grid {
    gap: var(--space-md);
  }

  /* CTA banner */
  .ps-cta__title {
    font-size: var(--fs-h3);
  }

  /* Gallery preview → 2-col grid on mobile */
  .ps-gallery-preview__grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: 180px 180px 180px !important;
  }

  .ps-gallery-preview__grid .ps-gallery-item:nth-child(n) {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .ps-gallery-preview__grid .ps-gallery-item:nth-child(n+5) {
    display: none;
  }

  /* Filters scroll */
  .ps-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
  }

  .ps-filter-btn {
    flex-shrink: 0;
  }

  /* Accordion */
  .ps-accordion__header {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--fs-body);
  }

  .ps-accordion__content {
    padding: 0 var(--space-lg) var(--space-lg);
  }
}

/* Small mobile */
@media (max-width: 479px) {
  .ps-container {
    padding: 0 var(--space-md);
  }

  /* Hero small mobile handled in hero.php inline styles */

  .ps-about__stats {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .ps-stat__number {
    font-size: var(--fs-h2);
  }

  .ps-gallery-preview__grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(3, 200px) !important;
  }

  .ps-gallery-preview__grid .ps-gallery-item:nth-child(n+4) {
    display: none;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .ps-reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
