/* ==========================================================================
   Base Layout
   Общие стили сайта: header, footer, базовые секции, типографика, кнопки.
   Подключается на всех основных страницах.
   ========================================================================== */

html {
  overflow-x: hidden;
}

/* Фиксированная шапка сайта: верхняя сервисная строка и контейнер навигации */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #222;
  background: #fff;
  padding-top: 126px;
  overflow-x: hidden;
  transition: padding-top 0.25s ease;
}

a {
  color: #111;
  text-decoration: none;
}

a:hover {
  color: #666;
}

/* Верхняя техническая полоса с контактами и подписью проекта */
.header-top {
  padding: 10px 0;
  border-bottom: 1px solid #d9e1ec;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f4f8fd;
  transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease, border-color 0.25s ease;
  max-height: 60px;
  overflow: hidden;
}

.header-note {
  color: #555;
}

.header-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.header-meta a {
  color: #4a5f7c;
}

.header-meta a.header-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-meta a.header-social i {
  font-size: 15px;
}

/* Основная синяя панель меню */
.main-navbar {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #164075;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(8, 28, 56, 0.24);
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}

.site-header .main-navbar.fixed-top {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
}

body.is-scrolled .header-top {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
}

body.is-scrolled .main-navbar {
  padding: 1px 0;
  box-shadow: 0 14px 32px rgba(8, 28, 56, 0.32);
}

/* Единый breadcrumb-паттерн для внутренних страниц */
.page-breadcrumbs {
  margin-bottom: 22px;
}

.page-breadcrumbs .breadcrumb-item,
.page-breadcrumbs .breadcrumb-item a {
  color: #6b819f;
  font-size: 13px;
}

.page-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
  color: #9bb0c8;
}

/* Логотип и главное меню */
.navbar-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 40px;
}

.image-logo-wrap {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  background: #164075;
  text-decoration: none;
}

.navbar-nav {
  gap: 22px;
}

.nav-link {
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #eaf4ff;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link.active,
.nav-item.active > .nav-link,
.nav-item.current > .nav-link,
.nav-item.here > .nav-link,
.nav-link[aria-current="page"],
.nav-link:hover,
.nav-link:focus {
  color: #8fd5ff;
}

.nav-link.active::after,
.nav-item.active > .nav-link::after,
.nav-item.current > .nav-link::after,
.nav-item.here > .nav-link::after,
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: #59b5e8;
}

/* Выпадающий список выбора языка */
.lang-dropdown {
  margin-left: 32px;
}

.lang-dropdown-toggle {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #f3f9ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-dropdown-toggle:hover,
.lang-dropdown-toggle:focus,
.lang-dropdown-toggle.show {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

.lang-dropdown .dropdown-menu {
  min-width: 84px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #164075;
  padding: 8px 0;
  box-shadow: 0 12px 26px rgba(8, 28, 56, 0.26);
}

.lang-dropdown .dropdown-item {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #eaf4ff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  font-size: 15px;
  line-height: 1;
}

/* Состояния пунктов выпадающего меню и мобильная кнопка раскрытия навигации */
.lang-dropdown .dropdown-item:hover,
.lang-dropdown .dropdown-item:focus,
.lang-dropdown .dropdown-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.18);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.18);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28243, 249, 255, 0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.mobile-nav-meta {
  display: none;
}

/* Главный hero-блок и общие заголовки секций */
.hero-slider {
  padding: 0;
  border-bottom: 1px solid #dfe7f2;
  background: #fff;
}


.section-label {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #777;
}

.section-label.light {
  color: rgba(255, 255, 255, 0.76);
}

.hero-slide h1,
.section-heading h2 {
  margin: 0 0 24px;
  font-weight: 800;
  line-height: 1.15;
  color: #111;
}

.hero-slide h1 {
  font-size: clamp(34px, 5vw, 58px);
  max-width: 760px;
}

.hero-slide p {
  max-width: 650px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.84);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-slide {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(135deg, #164075 0%, #20589d 100%);
  color: #fff;
  min-height: calc(78vh - 40px);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 31, 57, 0.72) 0%, rgba(11, 31, 57, 0.48) 45%, rgba(11, 31, 57, 0.18) 100%);
}

.hero-slide-bg {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-carousel-full,
.hero-carousel-full .carousel-inner,
.hero-carousel-full .carousel-item {
  min-height: calc(78vh - 40px);
}

.hero-slide-container {
  display: flex;
  align-items: center;
  min-height: calc(78vh - 40px);
}

.hero-content {
  max-width: 700px;
  padding: 40px 0 58px;
  position: relative;
  z-index: 1;
}

.hero-slide h1 {
  font-size: clamp(30px, 4.4vw, 50px);
  max-width: 680px;
}

.hero-slide p {
  max-width: 620px;
  font-size: 16px;
}

.slider-indicators {
  bottom: 22px;
  margin-bottom: 0;
}

.slider-indicators [data-bs-target] {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.slider-control {
  width: 7%;
}

.slider-control .carousel-control-next-icon,
.slider-control .carousel-control-prev-icon {
  width: 2rem;
  height: 2rem;
}

.btn-light-blue {
  color: #164075;
  background: #ffffff;
  border: 1px solid #ffffff;
}

.btn-light-blue:hover {
  color: #164075;
  background: #dce8f7;
  border-color: #dce8f7;
}

.custom-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.custom-outline-light:hover {
  color: #164075;
  background: #fff;
  border-color: #fff;
}

/* Базовые карточки проекта: переиспользуются на разных страницах */
.hero-box,
.aside-card,
.simple-card,
.news-card,
.partner-item,
.contact-card,
.form-card {
  padding: 28px;
  border: 1px solid #dfe7f2;
  background: #fff;
}

.hero-box-title {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Универсальные секции и анимация появления при скролле */
.page-section {
  padding: 80px 0;
  border-bottom: 1px solid #e8edf4;
}

.simple-card,
.news-card,
.aside-card,
.contact-card,
.form-card,
.partner-item {
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(22, 64, 117, 0.05);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Заголовки секций и дополнительные ссылки "смотреть все" */
.section-gray {
  background: #f7faff;
}

.section-heading {
  margin-bottom: 38px;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  color: #12345e;
}

.section-more {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #164075;
}

.lead-block {
  max-width: 980px;
}

.lead-block p:last-child {
  margin-bottom: 0;
}

.text-block p:last-child {
  margin-bottom: 0;
}

/* Текстовые списки и базовые карточки с контентом */
.aside-card h3,
.simple-card h3,
.news-card h3 {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
}

.plain-list li + li {
  margin-top: 10px;
}

.simple-card {
  height: 100%;
}

.news-card {
  height: 100%;
}

.news-card a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #164075;
}

/* Базовые кнопки проекта */
.btn {
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn-dark {
  background: #164075;
  border-color: #164075;
}

.btn-dark:hover {
  background: #1d518f;
  border-color: #1d518f;
}

.site-footer {
  padding: 56px 0 24px;
  background: #164075;
  color: #fff;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #164075;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 14px 28px rgba(10, 25, 44, 0.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 1035;
}

.back-to-top:hover {
  background: #1d4f89;
  color: #ffffff;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-brand-block p {
  margin: 18px 0 0;
  max-width: 360px;
  color: rgba(255, 255, 255, 0.78);
}

.footer-logo {
  width: 200px;
  height: auto;
  display: block;
}

.footer-title {
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.footer-links li + li {
  margin-top: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
}

.footer-links a:hover {
  color: #fff;
}

.footer-contacts {
  color: rgba(255, 255, 255, 0.82);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 991.98px) {
  .header-meta {
    justify-content: flex-start;
  }

  .navbar-brand {
    margin-right: 16px;
    max-width: calc(100% - 72px);
  }

  .site-logo {
    width: 168px;
    max-width: 100%;
  }

  .main-navbar .navbar-collapse {
    padding-top: 14px;
    padding-bottom: 18px;
  }

  .lang-dropdown {
    margin-left: 0;
    margin-top: 16px;
  }

  .lang-dropdown .dropdown-menu {
    left: 0;
    right: auto;
    min-width: 96px;
  }

  .mobile-nav-meta {
    display: block;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(22, 64, 117, 0.12);
    color: #50657f;
    font-size: 13px;
  }

  .mobile-nav-meta a {
    color: #d8efff;
    font-weight: 700;
  }

  .mobile-nav-meta div + div {
    margin-top: 6px;
  }

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

}

@media (max-width: 767.98px) {
  .header-top,
  .nav-link,
  .lang-dropdown-toggle,
  .section-label,
  .section-more,
  .news-card a,
  .footer-bottom {
    letter-spacing: 0.08em;
  }

  .section-heading-row,
  .footer-bottom {
    display: block;
  }

  .hero-box,
  .aside-card,
  .simple-card,
  .news-card {
    padding: 22px;
  }

  .page-section {
    padding: 60px 0;
  }

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

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
  }

  .site-logo,
  body.is-scrolled .site-logo,
  .footer-logo {
    width: 150px;
  }
}

.site-logo {
  width: 180px;
  height: auto;
  display: block;
  transition: width 0.25s ease;
}

body.is-scrolled .site-logo {
  width: 126px;
}

body.is-scrolled .image-logo-wrap {
  padding: 4px 8px;
  border-radius: 7px;
}

body.is-scrolled .nav-link {
  font-size: 10px;
}

body.is-scrolled .lang-dropdown-toggle {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 10px;
}
