/* ============================================
   Layout: Grid, Containers, Sections
   ============================================ */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-8);
  }
}

@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-10);
  }
}

.container--narrow {
  max-width: var(--container-md);
}

.container--wide {
  max-width: var(--container-max);
}

/* Sections */
.section {
  padding: var(--space-16) 0;
}

.section--sm {
  padding: var(--space-10) 0;
}

.section--lg {
  padding: var(--space-24) 0;
}

.section--dark {
  background-color: var(--navy);
  color: var(--white);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--white);
}

.section--alt {
  background-color: var(--off-white);
}

.section--gold {
  background-color: var(--gold);
  color: var(--navy);
}

.section--gold h2,
.section--gold h3 {
  color: var(--navy);
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-12);
}

.section-header__label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

.section-header__title {
  margin-bottom: var(--space-4);
}

.section-header__subtitle {
  font-size: var(--fs-md);
  color: var(--gray-500);
  line-height: var(--lh-relaxed);
}

.section--dark .section-header__subtitle {
  color: var(--gray-300);
}

/* Grid system */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

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

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

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

@media (min-width: 768px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid { gap: var(--space-8); }
}

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

/* Flex 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--column {
  display: flex;
  flex-direction: column;
}

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

.flex--gap-sm { gap: var(--space-3); }
.flex--gap { gap: var(--space-6); }
.flex--gap-lg { gap: var(--space-8); }

/* Split layout */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 768px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

.split--reverse > :first-child {
  order: 2;
}

.split--reverse > :last-child {
  order: 1;
}

@media (max-width: 767px) {
  .split--reverse > :first-child {
    order: 1;
  }
  .split--reverse > :last-child {
    order: 2;
  }
}

/* Overlay */
.overlay {
  position: relative;
}

.overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(27, 42, 74, 0.92), rgba(27, 42, 74, 0.82));
  z-index: 1;
}

.overlay > * {
  position: relative;
  z-index: 2;
}

/* Parallax-style bg section */
.bg-cover {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-fixed {
  background-attachment: scroll;
}

@media (min-width: 768px) {
  .bg-fixed {
    background-attachment: fixed;
  }
}
