/* ============================================================
   LAYOUT — Container, Grid System, Spacing Utilities
   Dr. Arndt Schwaiger Website V.5.00
   ============================================================ */


/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--raw-space-6);
  padding-right: var(--raw-space-6);
}

.container--narrow {
  max-width: 800px;
}

.container--wide {
  max-width: 1400px;
}


/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.section--sm {
  padding-top: var(--raw-space-12);
  padding-bottom: var(--raw-space-12);
}

.section--lg {
  padding-top: var(--raw-space-32);
  padding-bottom: var(--raw-space-32);
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--raw-space-12);
    padding-bottom: var(--raw-space-12);
  }

  .section--lg {
    padding-top: var(--raw-space-16);
    padding-bottom: var(--raw-space-16);
  }

  .section__header {
    margin-bottom: var(--raw-space-8);
  }
}

.section--warm {
  background-color: var(--color-surface-warm);
}

.section--muted {
  background-color: var(--color-surface-muted);
}

.section--dark {
  background-color: var(--color-surface-dark);
  color: var(--color-text-inverse);
}

.section__header {
  text-align: center;
  margin-bottom: var(--raw-space-12);
}

.section__header .eyebrow {
  margin-bottom: var(--raw-space-3);
}

.section__header h2 {
  margin-bottom: var(--raw-space-4);
}

.section__header p {
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text-secondary);
}


/* ============================================================
   CSS GRID SYSTEM
   ============================================================ */
.grid {
  display: grid;
  gap: var(--raw-space-8);
}

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

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

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

.grid--auto {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid--auto-sm {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Responsive grid breakpoints */
@media (max-width: 992px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

@media (max-width: 480px) {
  .grid--4 {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   FLEXBOX UTILITIES
   ============================================================ */
.flex {
  display: flex;
}

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

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

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

.flex--col {
  flex-direction: column;
}

.flex--gap-sm {
  gap: var(--raw-space-3);
}

.flex--gap {
  gap: var(--raw-space-4);
}

.flex--gap-lg {
  gap: var(--raw-space-8);
}


/* ============================================================
   SPACING UTILITIES
   ============================================================ */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--raw-space-4); }
.mb-4 { margin-bottom: var(--raw-space-4); }
.mt-8 { margin-top: var(--raw-space-8); }
.mb-8 { margin-bottom: var(--raw-space-8); }
.mt-12 { margin-top: var(--raw-space-12); }
.mb-12 { margin-bottom: var(--raw-space-12); }
.mt-16 { margin-top: var(--raw-space-16); }
.mb-16 { margin-bottom: var(--raw-space-16); }


/* ============================================================
   TEXT ALIGNMENT
   ============================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }


/* ============================================================
   DISPLAY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}


/* ============================================================
   VIDEO EMBED (responsive 16:9)
   ============================================================ */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--raw-radius-xl);
  box-shadow: var(--raw-shadow-md);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
