/* 
   raiting.kz — Единая визуальная дизайн-система премиум-класса (Тренды 2026 года)
   Концепция: Сверхширокая сетка, воздушный минимализм, геометрическая эстетика
   Шрифт: Finlandica Text
*/

/* 1. Шрифты Finlandica Text и Iosevka Charon Mono */
@import url('https://fonts.googleapis.com/css2?family=Finlandica+Text:ital,wght@0,400..700;1,400..700&family=Iosevka+Charon+Mono:wght@400..700&display=swap');

/* 2. Дизайн-токены */
:root {
  /* Цветовая палитра */
  --color-primary: #F51B24;
  --color-primary-hover: #E01018;
  --color-primary-active: #C40B12;
  --color-primary-soft: rgba(245, 27, 36, 0.04);
  --color-primary-soft-hover: rgba(245, 27, 36, 0.08);
  
  --color-title: #0D0E12;
  --color-text: #4B5162;
  --color-muted: #8E95A5;
  --color-border: rgba(226, 230, 240, 0.6);
  --color-border-hover: rgba(245, 27, 36, 0.15);
  
  --color-bg: #FFFFFF;
  --color-bg-soft: #F9F9FB;
  --color-bg-soft-hover: #F2F2F6;
  
  --color-success: #10B981;
  --color-success-soft: rgba(16, 185, 129, 0.06);
  --color-error: #EF4444;
  --color-error-soft: rgba(239, 68, 68, 0.06);
  --color-warning: #F59E0B;
  --color-warning-soft: rgba(245, 158, 11, 0.06);
  
  /* Глобальный шрифт Finlandica Text */
  --font-title: 'Finlandica Text', sans-serif;
  --font-body: 'Finlandica Text', sans-serif;
  
  /* Современная Сверхширокая Сетка 2026 */
  --container-padding: 64px;
  
  /* Радиусы скругления */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-full: 9999px;
  
  /* Мягкие Тени */
  --shadow-sm: 0 2px 12px rgba(13, 14, 18, 0.02);
  --shadow-md: 0 16px 40px rgba(13, 14, 18, 0.04), 0 2px 10px rgba(13, 14, 18, 0.02);
  --shadow-lg: 0 40px 80px rgba(13, 14, 18, 0.05), 0 8px 24px rgba(13, 14, 18, 0.02);
  --shadow-primary: 0 16px 32px rgba(245, 27, 36, 0.12);
  
  /* Анимации и переходы */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 3. Сброс стилей */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

main {
  padding-top: 0;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

/* 4. Типографика (Строго на Inter) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--color-title);
  font-weight: 700;
  line-height: 1.15;
}

h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

h1 span.thin {
  font-weight: 300;
}

h2 {
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--color-title);
}

h3 {
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

p {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.6;
}

/* Хелперы */
.text-muted { color: var(--color-muted); }
.text-primary { color: var(--color-primary); }
.text-center { text-align: center; }
.text-bold { font-weight: 700; }
.text-medium { font-weight: 500; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

/* 5. Сетка (100% ширины) */
.container {
  width: 100%;
  max-width: none;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section-padding {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.section-header {
  margin-bottom: 64px;
  text-align: left;
}

.eyebrow {
  font-family: 'Iosevka Charon Mono', monospace !important;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
  display: block;
}

.display {
  font-family: 'Finlandica Text', sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--color-title);
}

.h-md {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
}

.section-em {
  font-family: 'Finlandica Text', sans-serif !important;
  font-style: italic !important;
  font-weight: 300 !important;
  color: var(--color-primary);
}

.cta-title {
  font-family: 'Finlandica Text', sans-serif !important;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 500 !important;
  line-height: 1.15;
  color: var(--color-title);
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.bg-light {
  background-color: var(--color-bg-soft);
}

.flex {
  display: flex;
  gap: 16px;
}

.flex-center {
  align-items: center;
  justify-content: center;
}

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

.grid {
  display: grid;
  gap: 32px;
}

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

/* 6. Кнопки (Размер строго 17px medium по ТЗ) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500; /* Medium */
  font-size: 1.0625rem; /* Строго 17px */
  padding: 14px 28px;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  text-align: center;
  user-select: none;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.btn-primary:active {
  background-color: var(--color-primary-active);
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-title);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-bg-soft);
  border-color: var(--color-title);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-soft {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

.btn-soft:hover {
  background-color: var(--color-primary-soft-hover);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 1.0625rem; /* Тоже 17px для единообразия */
  border-radius: var(--radius-xs);
}

/* 7. Элементы форм */
.form-input {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  background-color: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-title);
  transition: all var(--transition-fast);
}

.form-input::placeholder {
  color: var(--color-muted);
}

.form-input:focus {
  background-color: #FFFFFF;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(245, 27, 36, 0.08);
}

/* 8. Карточки */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  transition: all var(--transition-normal);
  position: relative;
  z-index: 2;
}

.card-hover:hover {
  transform: translateY(-6px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-lg);
}

/* 9. Бейджи */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  line-height: 1;
}

.badge-verified {
  background-color: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.08);
}

.badge-featured {
  background-color: var(--color-warning-soft);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.08);
}

.badge-primary {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid rgba(245, 27, 36, 0.08);
}

/* ---------------------------------------------------- */
/* Hero Секция (Спецификация по референсу Arianna)       */
/* ---------------------------------------------------- */
.hero-section {
  height: 100vh;
  min-height: 620px;
  background-image: url('/assets/images/hero_home.png');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding-top: 140px;
  padding-bottom: 48px;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

.hero-top-info {
  max-width: 800px;
  text-align: left;
}

.hero-desc {
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text);
}

.hero-title-badge {
  display: inline-flex;
  align-items: center;
  background-color: rgba(13, 14, 18, 0.06);
  border: 1px solid rgba(13, 14, 18, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-family: var(--font-title);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-title);
  margin-left: 16px;
  vertical-align: middle;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Единая поисковая плашка (по ТЗ) */
.unified-search-bar {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  height: 60px;
  width: 100%;
  max-width: 680px;
  display: flex;
  align-items: center;
  box-shadow: none;
  overflow: hidden;
  transition: all var(--transition-fast);
  margin-bottom: 16px;
}

.unified-search-bar:focus-within {
  border-color: var(--color-primary);
  box-shadow: none;
}

.search-city-select-wrapper {
  position: relative;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-city-select {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-title);
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  padding-right: 20px;
  appearance: none;
  -webkit-appearance: none;
}

.search-city-select-wrapper::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 55%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-top-color: var(--color-title);
  pointer-events: none;
}

.search-divider {
  width: 1px;
  height: 24px;
  background-color: var(--color-border);
}

.search-input-field-wrapper {
  flex-grow: 1;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.search-input-field {
  width: 100%;
  height: 100%;
  padding: 0 20px 0 44px;
  font-size: 0.9375rem;
  color: var(--color-title);
  border: none;
  background: none;
  outline: none;
}

.search-input-field::placeholder {
  color: var(--color-muted);
}

.search-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
}

.unified-search-btn {
  height: 60px;
  padding: 0 32px;
  border-radius: 0;
  font-family: 'Inter', sans-serif !important;
  font-weight: 700;
  font-size: 0.9375rem;
  background-color: var(--color-primary);
  color: #FFFFFF;
  transition: background-color var(--transition-fast);
}

.unified-search-btn:hover {
  background-color: var(--color-primary-hover);
}

/* Композиционное разведение карточек по углам */
.hero-bottom-cards {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  width: 100%;
  margin-top: auto;
}

.hero-metrics-left {
  display: flex;
  gap: 20px;
}

.hero-metrics-right {
  margin-left: auto;
  width: 420px;
}

.hero-card-white {
  background-color: rgba(255, 255, 255, 0.65);
  border: none;
  box-shadow: none;
  border-radius: var(--radius-md);
  padding: 24px;
  color: #0D0E12;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  width: 160px;
  position: relative;
}



.hero-card-white .card-num {
  font-family: var(--font-title);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #0D0E12;
}

.hero-card-white .card-label {
  font-size: 0.8125rem;
  color: rgba(13, 14, 18, 0.75);
  line-height: 1.4;
  font-weight: 500;
}

.hero-card-dark {
  background-color: #FFFFFF;
  border: none;
  box-shadow: none;
  border-radius: var(--radius-md);
  padding: 24px;
  color: #0D0E12;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  width: 160px;
  position: relative;
}



.hero-card-dark .card-num {
  font-family: var(--font-title);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #0D0E12;
}

.hero-card-dark .card-label {
  font-size: 0.8125rem;
  color: rgba(13, 14, 18, 0.75);
  line-height: 1.4;
  font-weight: 500;
}

.hero-card-light {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--color-title);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
}

.hero-card-light::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 4px;
  height: 4px;
  background-color: var(--color-primary);
  border-radius: 50%;
}

.hero-card-light .card-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: 12px;
}

/* Корректировка контрастности для вторичных кнопок на Hero и карточках */
.hero-section .btn-secondary,
.hero-card-light .btn-secondary {
  border-color: rgba(13, 14, 18, 0.4) !important;
  color: var(--color-title) !important;
}

.hero-section .btn-secondary:hover,
.hero-card-light .btn-secondary:hover {
  background-color: rgba(13, 14, 18, 0.05) !important;
  border-color: var(--color-title) !important;
}

/* ---------------------------------------------------- */
/* Тонкая бизнес инфографика в стандартах                */
/* ---------------------------------------------------- */
.trust-infographic-premium {
  margin-top: 24px;
  position: relative;
  width: 100%;
}

.schema-line-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 8px 0;
}

.schema-line-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-title);
}

.schema-line-bar {
  flex-grow: 1;
  height: 1px;
  background-color: var(--color-border);
  margin: 0 16px;
}

.schema-line-val {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-title);
}

.schema-flow-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.schema-flow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--color-text);
}

.schema-flow-step .step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schema-flow-step .step-num.verified {
  background-color: var(--color-success-soft);
  color: var(--color-success);
}

.schema-flow-step .step-text {
  font-weight: 500;
}

/* Стили для спойлера SEO-текста внизу */
.seo-accordion-spoiler {
  margin-top: 48px;
  border-top: 1px solid var(--color-border);
  padding-top: 48px;
}

.spoiler-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
}

.spoiler-content.is-open {
  max-height: 2000px;
}

.btn-spoiler-trigger {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-spoiler-trigger svg {
  transition: transform var(--transition-fast);
}

.btn-spoiler-trigger.is-active svg {
  transform: rotate(180deg);
}

/* ---------------------------------------------------- */
/* Адаптивность для сверхширокой сетки                  */
/* ---------------------------------------------------- */
@media (max-width: 1400px) {
  :root {
    --container-padding: 32px;
  }
}

@media (max-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
  .hero-section {
    height: auto;
    padding: 60px 0;
  }
  .hero-bottom-cards {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin-top: 40px;
  }
  .hero-metrics-left {
    width: 100%;
    justify-content: space-between;
  }
  .hero-metrics-right {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: 80px 0;
  }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.375rem; }
  .display.h-md { font-size: 1.75rem !important; }
  :root {
    --container-padding: 24px;
  }
  .hero-metrics-left {
    flex-direction: column;
    gap: 16px;
  }
  .hero-card-dark {
    width: 100%;
  }
}
