/* ==========================================================================
   layout.css — Sections, Grid, Container
   ========================================================================== */

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

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

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

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

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

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

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

.section__header p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--color-text-muted);
}

/* --- Header Bar --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

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

.header__brand {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header__brand img {
  height: 32px;
  width: auto;
}

/* --- Hero --- */
.hero {
  padding: var(--space-16) 0 var(--space-20);
  background-color: var(--color-bg);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero__tag {
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: 20px;
  margin-bottom: var(--space-6);
}

.hero__title {
  margin-bottom: var(--space-6);
  font-size: var(--font-size-4xl);
  line-height: 1.2;
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  max-width: 540px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.hero__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

/* --- Grid Layouts --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.grid-2--reverse {
  direction: rtl;
}

.grid-2--reverse > * {
  direction: ltr;
}

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

/* --- Footer --- */
.footer {
  background-color: var(--color-footer-bg);
  padding: var(--space-12) 0 var(--space-8);
  color: var(--color-footer-text);
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-8);
}

.footer__brand {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--space-2);
}

.footer__links {
  display: flex;
  gap: var(--space-8);
}

.footer__links a {
  color: var(--color-footer-text-muted);
  font-size: var(--font-size-sm);
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: #FFFFFF;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-6);
  font-size: var(--font-size-xs);
  color: var(--color-footer-text-muted);
  display: flex;
  justify-content: space-between;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__subtitle {
    margin: 0 auto var(--space-8);
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__image {
    max-width: 500px;
    margin: 0 auto;
  }

  .grid-2, .grid-2--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

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

@media (max-width: 768px) {
  :root {
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
  }

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

  .container {
    padding: 0 var(--space-4);
  }

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

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

  .footer__content {
    flex-direction: column;
    gap: var(--space-6);
  }

  .footer__links {
    flex-direction: column;
    gap: var(--space-3);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-2);
  }
}
