:root {
  --color-primary: #0f172a;
  --color-secondary: #38bdf8;
  --color-accent: #f97316;
  --color-bg: #020617;
  --color-surface: #020617;
  --color-text: #e5e7eb;
  --radius-base: Soft / Rounded-md;
  --layout-container-width: 1200px;
  --layout-gutter-x: 1.5rem;
  --font-main:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
}

/* Базовый контейнер, чтобы все страницы были визуально согласованы */
.site-container {
  max-width: var(--layout-container-width);
  margin-inline: auto;
  padding-inline: var(--layout-gutter-x);
}

/* Общие utility-классы, которые ИИ может использовать в Tailwind-окружении */
.site-card {
  border-radius: var(--radius-base);
  background-color: var(--color-surface);
}

/* Кнопки на всякий случай (если модель захочет использовать эти классы) */
.btn-primary-soft {
  border-radius: var(--radius-base);
  background: var(--color-primary);
  color: white;
}

.btn-primary-soft:hover {
  filter: brightness(1.05);
}

/* Минимальная адаптация шапки/футера, если модель захочет использовать */
.site-header,
.site-footer {
  backdrop-filter: blur(12px);
}

/* Утилитарные классы для доступности и взаимодействия */
.touch-target {
  min-width: 44px;
  min-height: 44px;
}

/* Стили для FAQ с details/summary */
details summary svg {
  transition: transform 0.2s ease;
}

details[open] summary svg {
  transform: rotate(180deg);
}

/* Активные ссылки навигации */
.activ_link {
  font-weight: 600;
  color: #183b6b;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #38bdf8;
}

.nav-link-active-mobile {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #38bdf8;
}

/* Кастомные grid классы */
@media (min-width: 1024px) {
  .lg-grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Стили для details/summary FAQ */
details summary svg {
  transition: transform 0.2s ease;
}

details[open] summary svg {
  transform: rotate(180deg);
}

/* History Grid Cards */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

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

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

.history-card {
  height: 100%;
}

.year-badge {
  transition: all 0.3s ease;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.history-card:hover .year-badge {
  transform: scale(1.1);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.history-card svg {
  transition: transform 0.3s ease;
}

.history-card:hover svg {
  transform: rotate(15deg);
}

/* CLS Prevention - Reserve space for images */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Prevent layout shifts from font loading */
* {
  font-display: swap;
}

/* Reserve space for hero content */
.hero-content {
  min-height: 400px;
}
a,
button {
  cursor: pointer;
  text-align: center;
}
.flex-wrap {
  flex-wrap: wrap;
}
