/*
 * VrnTc Theme - Header Component
 */
.site-header {
  color: #000;
  background: #F6F6F6;
  /* Softer shadow, no visible band under the header. */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Remove extra vertical padding — the header content itself defines height. */
.header-top {
  padding-top: 0;
  padding-bottom: 0;
}

.top-item-title {
  border-left: 4px solid #f8bf0f;
  font-size: 15px;
  line-height: 1;
}

.top-item-title a {
  color: #000;
  text-decoration: none !important;
}

.top-item-title p {
  margin-bottom: 0.25rem !important;
  line-height: 1.2;
}

.top-item-title span {
  font-weight: 600;
  font-size: 25px;
  text-transform: uppercase;
  margin-top: 0.5rem;
  display: block;
  line-height: 1.1;
}

/* Phone block */
.tel {
  display: flex;
  align-items: center;
}

.tel > div {
  display: flex;
  align-items: center;
  min-width: 0;
}

.tel img {
  flex-shrink: 0;
  max-width: 38px;
  height: auto;
}

.tel a {
  font-weight: 600;
  font-size: 25px;
  line-height: 1;
  text-decoration: none;
  color: #000;
  white-space: nowrap;
}

.tel a:hover {
  color: #F8BF0F !important;
  -webkit-transition: all 0.2s linear;
  -o-transition: all 0.2s linear;
  transition: all 0.2s linear;
}

.top-item .tel a {
  color: #000 !important;
}

/* Login button — fixed height 41px, content vertically centered. */
.top-item-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 41px;
  padding: 0 16px;
  box-sizing: border-box;
  background: #fff;
  box-shadow: -3px 3px 9px rgba(0, 0, 0, 0.25);
  border-radius: 5px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  color: #000 !important;
  text-decoration: none !important;
  -webkit-transition: all 0.2s linear;
  -o-transition: all 0.2s linear;
  transition: all 0.2s linear;
}

.top-item-button i {
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  margin-right: 0.35rem;
}

.top-item-button:hover {
  color: #F8BF0F !important;
}

.top-item-button:active {
  box-shadow: 0 0 2px 0px rgba(0, 0, 0, 0.25);
}

/* Site header specific styles */
.site-header .container {
  /* Vertical padding is provided by the content itself (logo + text). */
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.site-header .col-1.col-md-2 {
  flex-shrink: 0;
}

.site-header .brand-logo img {
  height: auto;
  max-width: 100%;
}

.site-header .brand-text {
  padding-left: 0.5rem;
}

.site-header .site-slogan {
  margin-bottom: 0.25rem;
  font-size: 14px;
  color: #686868;
  line-height: 1.2;
}

.site-header .site-name {
  font-size: 25px;
  font-weight: 600;
  text-transform: uppercase;
  color: #000;
  line-height: 1.1;
}

.site-header .phone-link {
  font-weight: 600;
  font-size: 25px;
  line-height: 1;
  text-decoration: none;
  color: #000;
  white-space: nowrap;
}

.site-header .phone-link:hover {
  color: #F8BF0F;
}

.site-header .login-button {
  display: inline-flex;
  align-items: center;
  height: 41px;
  padding: 0 16px;
  box-sizing: border-box;
  background: #fff;
  box-shadow: -3px 3px 9px rgba(0, 0, 0, 0.25);
  border-radius: 5px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  color: #000;
  text-decoration: none;
}

.site-header .login-button i {
  font-size: 18px;
  margin-right: 0.35rem;
}

.site-header .login-button:hover {
  color: #F8BF0F;
}

/* Заголовок страницы (H1) — уменьшен в 1.5 раза от базовых 40px */
.block-page-title-block h1,
.page-title {
  font-size: 26px;
  line-height: 1.25;
}

/* Main navigation - standalone nav, above main content */
.main-nav {
  background: #494D4E;
  border-top: 3px solid #F8BF0F;
}

/* Закреплённая шапка: header + главное меню прилипают к верху при скролле */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #494D4E;
}

.main-nav .nav {
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav .nav-item {
  display: inline-block;
}

.main-nav .nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.2s ease;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active,
.main-nav .nav-item.active .nav-link {
  color: #F8BF0F;
}

.main-nav .nav-link.active {
  border-bottom: 2px solid #F8BF0F;
}

/* Responsive header */
@media (max-width: 991px) {
  .site-header .site-name {
    font-size: 22px;
  }

  .top-item-title span {
    font-size: 22px;
  }

  .tel a {
    font-size: 20px;
  }

  .site-header .phone-link {
    font-size: 20px;
  }

  .top-item-button {
    height: 38px;
    padding: 0 14px;
    font-size: 15px;
  }

  .top-item-button i {
    font-size: 17px;
  }

  .site-header .login-button {
    height: 38px;
    padding: 0 14px;
    font-size: 15px;
  }

  .site-header .login-button i {
    font-size: 17px;
  }
}

@media (max-width: 767px) {
  .site-header {
    position: relative;
  }

  .site-header .site-name {
    font-size: 20px;
  }

  .top-item-title span {
    font-size: 20px;
    margin-top: 0.25rem;
  }

  .top-item-title {
    font-size: 13px;
  }

  .tel a {
    font-size: 18px;
  }

  .site-header .phone-link {
    font-size: 18px;
  }

  .top-item-button {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }

  .top-item-button i {
    font-size: 16px;
  }

  .site-header .login-button {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }

  .site-header .login-button i {
    font-size: 16px;
  }

  .site-header .brand-text {
    margin-top: 0.25rem;
  }
}

@media (max-width: 575px) {
  .site-header .site-name {
    font-size: 18px;
  }

  .top-item-title span {
    font-size: 18px;
  }

  .tel a {
    font-size: 16px;
  }

  .site-header .phone-link {
    font-size: 16px;
  }

  .top-item-button {
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .top-item-button i {
    font-size: 14px;
  }

  .site-header .login-button {
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .site-header .login-button i {
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .site-header .site-name {
    font-size: 16px;
  }

  .top-item-title span {
    font-size: 16px;
  }

  .tel a {
    font-size: 15px;
  }

  .site-header .phone-link {
    font-size: 15px;
  }

  .top-item-button {
    height: 32px;
    padding: 0 8px;
    font-size: 11px;
  }

  .top-item-button i {
    font-size: 13px;
  }

  .site-header .login-button {
    height: 32px;
    padding: 0 8px;
    font-size: 11px;
  }

  .site-header .login-button i {
    font-size: 13px;
    margin-right: 0.25rem;
  }
}
/*
 * Главное меню с выпадающими подпунктами.
 *
 * Разметка (templates/menu.html.twig):
 *   <ul class="nav navbar-nav menu menu--level-1">
 *     <li class="nav-item menu-item--expanded">
 *       <a class="nav-link menu-link menu-link--expanded">
 *       <ul class="menu menu--level-2">
 *         <li class="nav-item"><a class="nav-link menu-link">…</a></li>
 *
 * Токены темы: акцент #F8BF0F (жёлтый), тёмная полоса меню.
 * Верхний уровень — горизонтальный ряд, вложенные уровни —
 * выпадающие панели. Правила верхнего уровня ограничены «>»,
 * чтобы display:flex не применялся к вложенным спискам.
 */

.navbar-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  /* Шрифт задаём явно, а не через inherit: Bootstrap подключён
     после index.css и перебивает body, поэтому inherit приводит
     к системному стеку вместо Source Sans Pro. */
  font-family: 'Source Sans Pro', sans-serif;
}

.navbar-nav > .nav-item {
  position: relative;
  margin: 0;
  list-style: none;
}

.navbar-nav > .nav-item > .nav-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0.85rem 1.15rem;
  font-size: 1rem;
  line-height: 1.4;
  /* Цвет задаём явно: фон полосы меню — #494D4E, а color: inherit
     тянул сюда тёмный #212529 от body (Bootstrap), и текст сливался
     с фоном (контраст около 1.3:1). */
  color: #f2f4f5;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar-nav > .nav-item > .nav-link:hover,
.navbar-nav > .nav-item:focus-within > .nav-link {
  color: #f8bf0f;
  background-color: rgba(255, 255, 255, 0.08);
}

.navbar-nav > .nav-item.active > .nav-link,
.navbar-nav > .nav-item.active > .nav-link:hover {
  color: #f8bf0f;
}

/* --- Индикатор наличия подменю --- */

.navbar-nav > .nav-item > .nav-link.menu-link--expanded::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.5rem;
  border-top: 4px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  vertical-align: middle;
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.navbar-nav > .nav-item.menu-item--expanded:hover > .nav-link.menu-link--expanded::after,
.navbar-nav > .nav-item.menu-item--expanded:focus-within > .nav-link.menu-link--expanded::after {
  transform: rotate(180deg);
}

/* --- Выпадающая панель --- */

.navbar-nav .menu {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-nav > .nav-item > .menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 17rem;
  padding: 0.3rem 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-top: 2px solid #f8bf0f;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.navbar-nav > .nav-item.menu-item--expanded:hover > .menu,
.navbar-nav > .nav-item.menu-item--expanded:focus-within > .menu {
  display: block;
  animation: vrn-tc-dropdown 0.14s ease-out;
}

@keyframes vrn-tc-dropdown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Пункты подменю: обязательно display:block, в теме есть
   .main-nav .nav-item { display: inline-block }, из-за которого
   подпункты встают в одну строку. */
.navbar-nav > .nav-item > .menu > .nav-item {
  display: block;
  float: none;
  margin: 0;
  list-style: none;
}

.navbar-nav > .nav-item > .menu > .nav-item > .nav-link {
  display: block;
  float: none;
  padding: 0.6rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #263238;
  text-decoration: none;
  white-space: nowrap;
  border-left: 3px solid transparent;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.navbar-nav > .nav-item > .menu > .nav-item > .nav-link:hover,
.navbar-nav > .nav-item > .menu > .nav-item > .nav-link:focus {
  background-color: #f5f6f7;
  color: #263238;
  border-left-color: #f8bf0f;
}

.navbar-nav > .nav-item > .menu > .nav-item.active > .nav-link {
  background-color: rgba(248, 191, 15, 0.12);
  border-left-color: #f8bf0f;
  font-weight: 600;
}

/* Уровень 3 и глубже — сдвиг вправо, если появится. */
.navbar-nav .menu .menu {
  padding-left: 1rem;
}

/* --- Клавиатурная доступность --- */

.navbar-nav > .nav-item > .nav-link:focus-visible,
.navbar-nav > .nav-item > .menu > .nav-item > .nav-link:focus-visible {
  outline: 2px solid #f8bf0f;
  outline-offset: -2px;
}

/* --- Мобильная раскладка --- */

@media (max-width: 768px) {
  .navbar-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .navbar-nav > .nav-item > .nav-link {
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar-nav > .nav-item > .menu {
    display: block;
    position: static;
    min-width: 0;
    padding: 0.25rem 0 0.5rem;
    background: rgba(0, 0, 0, 0.15);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .navbar-nav > .nav-item > .menu > .nav-item > .nav-link {
    padding-left: 1.75rem;
    color: #fff;
    white-space: normal;
  }
}
