/* ===================================================================
   Layout Utilities - Responsive Container, Grid, Flex
   =================================================================== */

/* ===================================================================
   CONTAINER
   =================================================================== */

.container {
  width: var(--container-width);
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ===================================================================
   SECTION SPACING
   =================================================================== */

.section {
  padding: var(--spacing-section) 0;
}

/* ===================================================================
   GRID UTILITIES
   =================================================================== */

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

/* Responsive grid - 2 columns */
.grid--2-col {
  grid-template-columns: 1fr;
}

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

/* Responsive grid - 3 columns */
.grid--3-col {
  grid-template-columns: 1fr;
}

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

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

/* ===================================================================
   FLEX UTILITIES
   =================================================================== */

.flex {
  display: flex;
  gap: var(--spacing-md);
}

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

.flex--between {
  align-items: center;
  justify-content: space-between;
}

.flex--wrap {
  flex-wrap: wrap;
}

/* ===================================================================
   ACCESSIBILITY UTILITIES
   =================================================================== */

/* Screen reader only - accessible but visually hidden */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Visually hidden but allows focus (for skip links) */
.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ===================================================================
   VISIBILITY UTILITIES
   =================================================================== */

.hidden {
  display: none;
}

/* Hide on mobile */
.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: initial;
  }
}

/* Hide on tablet and above */
.show-mobile-only {
  display: initial;
}

@media (min-width: 768px) {
  .show-mobile-only {
    display: none;
  }
}

/* Hide on tablet */
.hide-tablet {
  display: initial;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hide-tablet {
    display: none;
  }
}
