/* =================================================================
   RESPONSIVE LAYOUT — Mobile-first reusable layout patterns
   Loaded after tokens.css, before page-specific CSS.
   ================================================================= */

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* --- Sidebar + Content --- */
.layout-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .layout-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-8);
  }
}

/* --- Hero (generic) --- */
.hero-layout {
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.hero-layout__image {
  order: -1;
}

@media (min-width: 768px) {
  .hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: left;
    gap: var(--space-8);
    align-items: center;
  }

  .hero-layout__image {
    order: 0;
  }
}

/* --- Full-screen section --- */
.section-fullscreen {
  min-height: 100vh;
  min-height: 100svh;
}

/* --- Image wrappers --- */
.image-wrapper {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.image-wrapper--square {
  aspect-ratio: 1 / 1;
}

.image-wrapper--4-3 {
  aspect-ratio: 4 / 3;
}

/* --- Video embed --- */
.video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Orientation handling --- */

/* Phone landscape */
@media (max-width: 767px) and (orientation: landscape) {
  .section-fullscreen {
    min-height: auto;
    padding: var(--space-6) var(--space-4);
  }
}

/* Tablet landscape */
@media (min-width: 768px) and (orientation: landscape) and (max-width: 1023px) {
  .section-fullscreen {
    min-height: auto;
    padding: var(--space-8) var(--space-4);
  }
}
