/* Основные стили для шапки */

.site-header {
  height: 200px;
  background-image: url("../images/irpo-background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.site-header__inner {
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
}

/* Сетка внутри шапки */
.header-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-items: center;
}

.col {
  /* минимальная высота чтобы колонки были кликабельны/видимы при необходимости */
  min-height: 200px;
}

/* Позиционирование отдельных колонок (span) */
.col-1 { grid-column: 1 / 2; position: relative; }
.col-2-7 { grid-column: 2 / 8; }
.col-6 { grid-column: 6 / 7; }
.col-7 { grid-column: 7 / 8; }
.col-8 { grid-column: 8 / 9; }
.col-9 { grid-column: 9 / 10; }
.col-10-11 { 
  grid-column: 10 / 12; 
  display: flex;
  align-items: center;
  justify-content: center;
}
.col-12 { grid-column: 12 / 13; }

/* Изображения */
.gerb {
   padding-top:40px;
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
  position: absolute;
  top: 0;
  right: 0;
}

.logo {
  display: block;
  /* сохраняем пропорции: не искажаем; задаём максимальную высоту, которая будет уменьшаться в медиазапросах */
  height: auto;
  width: auto;
  max-height: 200px;
  max-width: 100%;
  margin: 0 auto;
}

/* Обёртка логотипа: отрицательный отступ вниз и центрирование содержимого */
.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -35px; /* отрицательный margin вниз */
  margin-right: -30px;
}

/* Текст внутри колонок 2-5 */
.header-text {
  padding-top: 40px;
  color: #fff;
  line-height: 1.15;
  font-weight: 600;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; /* шрифт Arial */
  /* тень убрана */
}

/* Адаптивные размеры текста: используем clamp для пропорционального изменения */
.header-text > div:nth-child(1),
.header-text > div:nth-child(2) {
  font-size: clamp(16px, 1.8vw, 20px); /* от 16 до 20px, растёт с шириной окна */
  font-weight: 300; /* тонкие */
}

.header-text > div:nth-child(4),
.header-text > div:nth-child(5) {
  font-size: clamp(22px, 3.2vw, 32px); /* от 22 до 32px */
}

/* Дополнительные медиаправила для более плавной адаптивности */
@media (max-width: 1024px) {
  .header-text > div:nth-child(1),
  .header-text > div:nth-child(2) {
    font-size: clamp(15px, 2.2vw, 14px);
  }
  .header-text > div:nth-child(4),
  .header-text > div:nth-child(5) {
    font-size: clamp(20px, 3.6vw, 16px);
  }
  .logo { max-height: 160px; }
}

@media (max-width: 768px) {
  .header-text > div:nth-child(1),
  .header-text > div:nth-child(2) {
    font-size: clamp(14px, 3.2vw, 12px);
  }
  .header-text > div:nth-child(4),
  .header-text > div:nth-child(5) {
    font-size: clamp(18px, 4.0vw, 14px);
  }
  /* На узких экранах уменьшаем логотип пропорционально, не сжимая его по ширине */
  .logo { max-height: 120px; max-width: 90%; }
  .logo-wrap { margin-bottom: -20px; }
  .gerb { width: 36px; height: 36px; }
}

@media (max-width: 420px) {
  .header-text > div:nth-child(1),
  .header-text > div:nth-child(2) { font-size: 10px; }
  .header-text > div:nth-child(4),
  .header-text > div:nth-child(5) { font-size: 12px; }
  .logo { max-height: 90px; }
  .gerb { width: 32px; height: 32px; }
}

/* Уточнение: при необходимости можно отключить фон/outline */

/* Полоса под шапкой */
.top-stripe {
  height: 40px;
  background-color: #1C2B55;
  width: 100%;
}

.site-title {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}

/* Если фон тёмный/светлый — можно подправить цвет текста позже */

/* --- Стили для cookie-баннера --- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none; /* чтобы клики блокировались только карточкой */
  z-index: 9999;
}

.cookie-card {
  pointer-events: auto;
  max-width: 980px;
  width: min(96%, 980px);
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(6,21,48,0.18);
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 260ms ease, opacity 260ms ease;
}

.cookie-banner.visible .cookie-card { transform: translateY(0); opacity: 1; }

.cookie-content { flex: 1 1 auto; }
.cookie-title { font-weight: 700; color: #0f2340; font-size: 16px; margin-bottom: 6px; }
.cookie-text { color: #233455; font-size: 14px; line-height: 1.3; }

.cookie-actions { display: flex; gap: 10px; align-items: center; }
.cookie-accept {
  background: #1C2B55;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.cookie-close {
  background: transparent;
  color: #1C2B55;
  border: 1px solid rgba(28,43,85,0.12);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* Адаптивность для cookie-карточки */
@media (max-width: 520px) {
  .cookie-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; }
  .cookie-actions { justify-content: flex-end; }
  .cookie-text { font-size: 13px; }
}

/* --- Стили карточки авторизации --- */
.auth-card-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  /* Оставляем достаточно пространства под шапкой, пропорционально её высоте */
  margin: calc(0.25 * 200px) 0 0; /* примерно 50px */
  padding: 0 16px;
}

.auth-card {
  width: min(720px, 100%);
  background: rgba(255,255,255,0.98);
  border-radius: 16px;
  padding: 36px 36px;
  box-shadow: 0 12px 36px rgba(6,21,48,0.18);
  color: #0f233f;
}

.auth-title {
  margin: 0 0 10px 0;
  font-size: clamp(22px, 2.4vw, 32px); /* крупнее и пропорционально растёт */
  font-weight: 700;
  color: #1C2B55;
}

.auth-subtitle {
  margin: 0 0 18px 0;
  font-size: clamp(15px, 1.6vw, 20px);
  color: #374a72;
  font-weight: 600;
}

.auth-form { display: grid; gap: 18px; }
.auth-label { font-size: clamp(22px, 1.2vw, 16px); color: #1C2B55; font-weight: 600; }
.auth-input {
  width: 100%;
  padding: clamp(14px, 1.2vw, 18px) clamp(14px, 1.2vw, 20px);
  border: 1px solid rgba(20,40,80,0.12);
  border-radius: 12px;
  background: #fff;
  font-size: clamp(16px, 1.6vw, 18px);
}
.auth-input:focus { outline: 3px solid rgba(28,43,85,0.10); border-color: rgba(28,43,85,0.25); }
.auth-btn {
  margin-top: 6px;
  background: #1C2B55;
  color: #fff;
  border: none;
  padding: clamp(12px, 1.2vw, 16px) clamp(16px, 1.4vw, 22px);
  border-radius: 12px;
  font-size: clamp(16px, 1.8vw, 18px);
  font-weight: 700;
  cursor: pointer;
}
.auth-btn:hover { background: #162244; }

/* Адаптивность карточки */
@media (max-width: 420px) {
  .auth-card { padding: 14px; border-radius: 10px; }
  .auth-title { font-size: 18px; }
  .auth-subtitle { font-size: 13px; }
  .auth-input { padding: 9px 10px; font-size: 13px; }
  .auth-btn { font-size: 14px; padding: 9px 12px; }
}
