/* ============================================
   АМИСТ — Layout System
   Container, Grid, Sections
   ============================================ */

/* ── Container ───────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

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

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

/* ── Section ─────────────────────────────── */

.section {
  padding-block: var(--section-py);
}

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

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

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

.section--dark .section-subtitle {
  color: var(--color-text-on-dark-muted);
}

.section--dark .section-label {
  color: var(--color-primary-200);
}

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

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

/* VIP-секция с gold-акцентом */
.section--vip {
  background: linear-gradient(135deg, var(--color-primary-800) 0%, var(--color-primary-700) 100%);
  color: var(--color-text-on-dark);
  position: relative;
  overflow: hidden;
}

.section--vip::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(201, 168, 76, 0.05) 100%);
  pointer-events: none;
}

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

.section--vip .section-label {
  color: var(--color-gold-500);
}

/* Section header */
.section__header {
  margin-bottom: var(--space-10);
}

.section__header--center {
  text-align: center;
}

.section__header--center .section-title,
.section__header--center .section-subtitle {
  margin-inline: auto;
}

@media (min-width: 768px) {
  .section__header {
    margin-bottom: var(--space-12);
  }
}

/* ── Grid System ─────────────────────────── */

.grid {
  display: grid;
  gap: var(--space-6);
}

/* 2 колонки */
.grid--2 {
  grid-template-columns: 1fr;
}

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

/* 3 колонки */
.grid--3 {
  grid-template-columns: 1fr;
}

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

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

/* 4 колонки */
.grid--4 {
  grid-template-columns: 1fr;
}

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

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

/* Gap варианты */
.grid--gap-sm { gap: var(--space-4); }
.grid--gap-lg { gap: var(--space-8); }
.grid--gap-xl { gap: var(--space-10); }

/* ── Flex утилиты ────────────────────────── */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ── Hero Section ────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background-color: var(--color-primary-800);
  color: var(--color-text-on-dark);
  overflow: hidden;
}

.hero--medium {
  min-height: 60vh;
  min-height: 60svh;
}

.hero--small {
  min-height: 40vh;
  min-height: 40svh;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(4, 13, 26, 0.4) 0%,
    rgba(4, 13, 26, 0.6) 50%,
    rgba(4, 13, 26, 0.85) 100%
  );
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-block: var(--space-32) var(--space-16);
}

.hero h1 {
  color: var(--color-white);
  font-size: var(--text-3xl);
  max-width: 800px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .hero h1 { font-size: var(--text-5xl); }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: var(--text-6xl); }
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-primary-100);
  max-width: 600px;
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

@media (min-width: 768px) {
  .hero__subtitle { font-size: var(--text-xl); }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-white);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.hero__stat-label {
  font-size: var(--text-sm);
  color: var(--color-primary-200);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* ── Two-column layouts ──────────────────── */

.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 {
  direction: ltr;
}

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

/* ── Spacing utilities ───────────────────── */

.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* ── Display utilities ───────────────────── */

.hidden { display: none; }

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

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

/* ── Overflow ────────────────────────────── */

.overflow-hidden { overflow: hidden; }

/* ── Relative positioning ────────────────── */

.relative { position: relative; }
