/**
 * @file
 * Layout styles
 */

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

@media (min-width: 640px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--spacing-xl);
  }
}

/* Page Layout */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
  flex: 1;
}

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

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) 0;
  gap: var(--spacing-md);
}

.header__branding {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.header__logo {
  width: 40px;
  height: 40px;
}

.header__site-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.header__site-name a {
  color: inherit;
  text-decoration: none;
}

/* Navigation */
.main-nav {
  display: none;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
  }
}

.main-nav__list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--spacing-md);
}

.main-nav__link {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--color-text);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.main-nav__link:hover,
.main-nav__link.is-active {
  color: var(--color-primary);
  text-decoration: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  padding: var(--spacing-sm);
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* Main Content Area */
.main-content {
  padding: var(--spacing-xl) 0;
}

/* Two Column Layout */
.layout-two-column {
  display: grid;
  gap: var(--spacing-xl);
}

@media (min-width: 1024px) {
  .layout-two-column {
    grid-template-columns: 1fr 300px;
  }
}

.layout-two-column--sidebar-left {
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .layout-two-column--sidebar-left {
    grid-template-columns: 300px 1fr;
  }
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.sidebar__block {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
}

.sidebar__block-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--color-border);
}

/* Footer */
.footer {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer__inner {
  padding: var(--spacing-2xl) 0;
}

.footer__grid {
  display: grid;
  gap: var(--spacing-xl);
  grid-template-columns: 1fr;
}

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

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

.footer__section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.footer__menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__menu li {
  margin-bottom: var(--spacing-xs);
}

.footer__menu a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer__menu a:hover {
  color: var(--color-primary);
}

.footer__bottom {
  padding: var(--spacing-lg) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

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

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

.grid--3 {
  grid-template-columns: repeat(1, 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);
  }
}

.grid--4 {
  grid-template-columns: repeat(1, 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);
  }
}

/* Hero Section */
.hero {
  padding: var(--spacing-2xl) 0;
  background-color: var(--color-bg-secondary);
}

.hero--large {
  padding: 4rem 0;
}

.hero__content {
  max-width: 800px;
}

.hero__title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 3rem;
  }
}

.hero__description {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
}

.hero__actions {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}
