/* =============================================
   HERYERPARKOUR — Layout System
   Container, grid utilities, spacing helpers
   ============================================= */

/* ===== CONTAINER ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ===== SECTION SPACING ===== */
section {
  position: relative;
}

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

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

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

.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;
}

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* ===== GRID — 12 Column (Aktivite kartları için) ===== */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

/* Standart gridler */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* ===== GAP UTILITIES ===== */
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* ===== SPACING UTILITIES ===== */
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

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

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

/* ===== SECTION BACKGROUNDS ===== */
.bg-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.bg-bej {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.bg-bej-alt {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.bg-wall {
  background: var(--bg-wall);
  color: var(--text-on-dark);
}

/* ===== SECTION DIVIDERS — Gradient geçişler ===== */
.section-transition-dark-to-bej {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(15, 15, 15, 0.6) 30%, rgba(15, 15, 15, 0.2) 60%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.section-transition-bej-to-dark {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 15, 15, 0.15) 30%, rgba(15, 15, 15, 0.5) 60%, var(--bg-dark) 100%);
  pointer-events: none;
}

.section-transition-dark-to-wall {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, var(--bg-dark), var(--bg-wall));
  pointer-events: none;
  z-index: 1;
}

.section-transition-wall-to-bej {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, var(--bg-wall) 0%, rgba(42, 37, 32, 0.6) 30%, rgba(42, 37, 32, 0.15) 60%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.section-transition-bej-to-bej-alt {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(15, 15, 15, 0.6) 30%, rgba(15, 15, 15, 0.2) 60%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ===== MAX WIDTH UTILITIES ===== */
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 780px; }
.max-w-xl { max-width: 900px; }

/* ===== RESPONSIVE GRID ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

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

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

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