/* ============================================================
   AALIN — Layout CSS
   Grid system, sections, spacings
   ============================================================ */

/* ── Section Base ── */
.section {
  padding-block: var(--space-5xl);
  position: relative;
  overflow: hidden;
}

.section--sm  { padding-block: var(--space-3xl); }
.section--lg  { padding-block: var(--space-6xl); }
.section--flush { padding-block: 0; }

/* ── Grid System ── */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.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-sm { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--auto-md { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

/* Asymmetric grids */
.grid--60-40 { grid-template-columns: 60fr 40fr; }
.grid--40-60 { grid-template-columns: 40fr 60fr; }
.grid--55-45 { grid-template-columns: 55fr 45fr; }

/* ── 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-col    { display: flex; flex-direction: column; }
.gap-sm      { gap: var(--space-sm); }
.gap-md      { gap: var(--space-md); }
.gap-lg      { gap: var(--space-lg); }
.gap-xl      { gap: var(--space-xl); }

/* ── Fullscreen Helpers ── */
.full-height { min-height: 100vh; }
.full-width  { width: 100%; }
.cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Offset / Slipped Layouts (Webpage 34 style) ── */
.offset-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.offset-layout__media {
  position: relative;
  z-index: 1;
}

.offset-layout__content {
  position: relative;
  padding: var(--space-4xl) var(--space-3xl);
  margin-top: var(--space-4xl);
  z-index: 2;
}

/* Right version — content left, image right, image slides UP */
.offset-layout--reverse .offset-layout__media {
  order: 2;
  margin-top: calc(var(--space-4xl) * -1);
}

.offset-layout--reverse .offset-layout__content {
  order: 1;
  margin-top: 0;
}

/* ── Pinned Horizontal Scroll ── */
.h-scroll-wrapper {
  position: relative;
  overflow: hidden;
}

.h-scroll-track {
  display: flex;
  gap: var(--space-xl);
  width: max-content;
  will-change: transform;
}

/* ── Marquee ── */
.marquee {
  display: flex;
  overflow: hidden;
  gap: var(--space-3xl);
  white-space: nowrap;
}

.marquee__inner {
  display: flex;
  gap: var(--space-3xl);
  animation: marquee-scroll 30s linear infinite;
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee:hover .marquee__inner {
  animation-play-state: paused;
}

/* ── Text Alignment ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid--60-40,
  .grid--40-60,
  .grid--55-45,
  .offset-layout {
    grid-template-columns: 1fr;
  }

  .offset-layout__content {
    margin-top: 0;
    padding: var(--space-2xl) 0;
  }

  .offset-layout--reverse .offset-layout__media {
    order: 1;
    margin-top: 0;
  }
  .offset-layout--reverse .offset-layout__content {
    order: 2;
  }
}

@media (max-width: 768px) {
  .section        { padding-block: var(--space-3xl); }
  .section--lg    { padding-block: var(--space-4xl); }
  .grid--2        { grid-template-columns: 1fr; }
  .grid--3        { grid-template-columns: 1fr; }
  .grid--4        { grid-template-columns: repeat(2, 1fr); }
}

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