/* ==========================================================================
   Фирменный стиль в цветах логотипа: чёрный / белый / жёлто-оранжевый, красный точечно.
   Подключается после style.css на всех страницах (header.tpl).
   ========================================================================== */
:root {
  --brand-black: #121212;
  --brand-black-2: #1d1d1d;
  --brand-ink: #151515;
  --brand-text: #5f6170;
  --brand-yellow: #f5b800;
  --brand-yellow-dark: #e0a200;
  --brand-yellow-soft: #fff4d1;
  --brand-red: #d81800;
  --brand-bg: #f5f6fa;
  --brand-line: #e8e9ee;
  --brand-radius: 14px;
}

/* --------------------------------------------------------------------------
   Общие перекраски зелёного (#426731 / bootstrap success) по всему сайту
   -------------------------------------------------------------------------- */
.btn-success, .btn-success:not(:disabled):not(.disabled) {
  background-color: var(--brand-yellow); border-color: var(--brand-yellow); color: var(--brand-ink);
}
.btn-success:hover, .btn-success:focus, .btn-success:not(:disabled):not(.disabled):active {
  background-color: var(--brand-yellow-dark); border-color: var(--brand-yellow-dark); color: var(--brand-ink);
  box-shadow: none;
}
.text-success { color: var(--brand-ink) !important; }
.button-green-bordered, .button-green-bordered:focus { color: var(--brand-ink); border-color: var(--brand-yellow); background-color: transparent; }
.button-green-bordered:hover, .button-green-bordered:active { color: var(--brand-ink); border-color: var(--brand-yellow); background-color: var(--brand-yellow); }
.modal-header { background-color: var(--brand-black); }
.border-green { border-color: var(--brand-yellow) !important; }
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before { background-color: var(--brand-yellow); border-color: var(--brand-yellow); }
.loadingProgressG { background: var(--brand-yellow); }
.inner-content table tr th { background: var(--brand-black) !important; }

/* оранжевые кнопки шаблона (модалки заявки и т.п.) — в фирменный жёлтый */
.button-orange, .button-orange:focus { background-color: var(--brand-yellow) !important; /* в style.css стоит !important */ border-color: var(--brand-yellow); color: var(--brand-ink); }
.button-orange:hover, .button-orange:active { background-color: var(--brand-yellow-dark) !important; border-color: var(--brand-yellow-dark); color: var(--brand-ink); }

/* --------------------------------------------------------------------------
   Шапка (.sh-)
   -------------------------------------------------------------------------- */
.sh { position: sticky; top: 0; z-index: 1030; background: var(--brand-black); color: #fff;
  border-bottom: 3px solid var(--brand-yellow); font-family: 'Site Roboto', 'Roboto', sans-serif; letter-spacing: 0; }
.sh a { text-decoration: none; }
.sh-wrap { display: flex; align-items: center; gap: 16px; max-width: 1440px; margin: 0 auto; padding: 8px 16px; min-height: 64px; }

.sh-logo { flex: none; display: block; line-height: 0; }
.sh-logo img { display: block; height: 52px; width: auto; }

.sh-nav { display: none; }
.sh-nav a { position: relative; display: block; padding: 10px 2px; color: #fff; font-size: 15px; font-weight: 500; white-space: nowrap; transition: color .2s; }
.sh-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--brand-yellow);
  transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.sh-nav a:hover, .sh-nav a:focus, .sh-nav a.is-active { color: var(--brand-yellow); }
.sh-nav a:hover::after, .sh-nav a.is-active::after { transform: scaleX(1); }

.sh-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sh-phone { display: none; color: #fff; line-height: 1.2; text-align: right; }
.sh-phone b { display: block; font-size: 18px; font-weight: 700; color: #fff; white-space: nowrap; }
.sh-phone small { display: block; font-size: 12px; color: rgba(255, 255, 255, .6); }
.sh-phone:hover b { color: var(--brand-yellow); }

.sh-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); color: #fff; transition: background .2s, color .2s; }
.sh-icon svg { width: 22px; height: 22px; fill: currentColor; }
.sh-icon:hover, .sh-icon:focus { background: var(--brand-yellow); color: var(--brand-ink); }
.sh-icon--call { background: var(--brand-yellow); color: var(--brand-ink); }

.sh-btn { display: none; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 10px;
  background: var(--brand-yellow); color: var(--brand-ink); font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap; transition: background .2s; }
.sh .sh-btn:hover, .sh .sh-btn:focus { background: var(--brand-yellow-dark); color: var(--brand-ink); }

/* бургер */
.sh-burger { flex: none; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 0 9px;
  border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); cursor: pointer; }
.sh-burger span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.sh.is-open .sh-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sh.is-open .sh-burger span:nth-child(2) { opacity: 0; }
.sh.is-open .sh-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* верхняя полоса (адрес, часы, почта) — только десктоп */
.sh-top { display: none; background: var(--brand-black-2); color: rgba(255, 255, 255, .65); font-size: 13px; }
.sh-top__wrap { display: flex; gap: 24px; align-items: center; max-width: 1440px; margin: 0 auto; padding: 6px 16px; }
.sh-top a { color: rgba(255, 255, 255, .8); }
.sh-top a:hover { color: var(--brand-yellow); }
.sh-top__item { display: inline-flex; align-items: center; gap: 6px; }
.sh-top__item svg { width: 14px; height: 14px; fill: var(--brand-yellow); }
.sh-top__right { margin-left: auto; }

/* мобильное меню */
.sh-menu { display: none; background: var(--brand-black); border-top: 1px solid rgba(255, 255, 255, .08);
  max-height: calc(100vh - 67px); overflow-y: auto; }
.sh.is-open .sh-menu { display: block; }
.sh-menu__list { list-style: none; margin: 0; padding: 8px 16px; }
.sh-menu__list a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff; font-size: 16px; font-weight: 500; }
.sh-menu__list a:hover { color: var(--brand-yellow); }
.sh-menu__list li:last-child a { border-bottom: 0; }
.sh-menu__foot { padding: 16px; background: var(--brand-black-2); }
.sh-menu__phone { display: block; margin-bottom: 4px; color: #fff; font-size: 20px; font-weight: 700; }
.sh-menu__meta { margin: 0 0 16px; font-size: 14px; color: rgba(255, 255, 255, .6); }
.sh-menu__foot .sh-btn { display: flex; width: 100%; }
.sh-menu__msg { display: flex; gap: 10px; margin-top: 12px; }
.sh-menu__msg a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 15px; font-weight: 500; }
.sh-menu__msg a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.sh-menu__msg svg { width: 20px; height: 20px; fill: currentColor; }

@media (min-width: 576px) {
  .sh-phone { display: block; }
}
@media (min-width: 1200px) {
  .sh-top { display: block; }
  .sh-wrap { gap: 32px; padding: 10px 24px; min-height: 80px; }
  .sh-top__wrap { padding: 6px 24px; }
  .sh-logo img { height: 64px; }
  .sh-burger, .sh-menu, .sh.is-open .sh-menu { display: none; }
  .sh-nav { display: flex; gap: 24px; }
  .sh-btn { display: inline-flex; }
  .sh-icon--call { display: none; }
}
@media (min-width: 1440px) {
  .sh-nav { gap: 32px; }
}

/* --------------------------------------------------------------------------
   Футер (.sf-)
   -------------------------------------------------------------------------- */
.sf { background: var(--brand-black); color: rgba(255, 255, 255, .7); border-top: 3px solid var(--brand-yellow);
  font-family: 'Site Roboto', 'Roboto', sans-serif; font-size: 15px; line-height: 1.6; letter-spacing: 0; }
.sf a { color: rgba(255, 255, 255, .8); text-decoration: none; transition: color .2s; }
.sf a:hover, .sf a:focus { color: var(--brand-yellow); }
.sf-main { display: grid; grid-template-columns: 1fr; gap: 32px; max-width: 1440px; margin: 0 auto; padding: 48px 16px 32px; }
.sf-brand img { display: block; height: 88px; width: auto; margin-bottom: 16px; }
.sf-brand p { margin: 0 0 20px; max-width: 320px; }
.sf-title { margin: 0 0 16px; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.sf-title::after { content: ''; display: block; width: 32px; height: 3px; margin-top: 10px; background: var(--brand-red); border-radius: 2px; }
.sf-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.sf-links li { break-inside: avoid; margin-bottom: 8px; }
.sf-contact { list-style: none; margin: 0; padding: 0; }
.sf-contact li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.sf-contact svg { flex: none; width: 20px; height: 20px; margin-top: 2px; fill: var(--brand-yellow); }
.sf-phone { font-size: 18px; font-weight: 700; color: #fff !important; }
.sf-phone:hover { color: var(--brand-yellow) !important; }
.sf-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: 10px;
  background: var(--brand-yellow); color: var(--brand-ink) !important; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sf .sf-btn:hover, .sf .sf-btn:focus { background: var(--brand-yellow-dark); color: var(--brand-ink) !important; }
.sf-msg { display: flex; gap: 10px; margin-top: 12px; }
.sf-msg a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 14px; font-weight: 500; }
.sf-msg a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.sf-msg svg { width: 18px; height: 18px; fill: currentColor; }
.sf-bottom { border-top: 1px solid rgba(255, 255, 255, .08); }
.sf-bottom__wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; max-width: 1440px; margin: 0 auto; padding: 16px; font-size: 13px; color: rgba(255, 255, 255, .45); }
@media (min-width: 768px) {
  .sf-main { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .sf-main { grid-template-columns: 1.1fr 1.3fr 1fr; gap: 48px; padding: 64px 24px 40px; }
  .sf-bottom__wrap { padding: 16px 24px; }
}

/* плавающая кнопка чата — в фирменный цвет */
.whatsapp-widget-timelines .ww-icon { background-color: var(--brand-black) !important; border-color: var(--brand-yellow) !important; }

/* модуль «Пришлите фото шильдика» — кнопка в фирменный жёлтый */
body .np-block { --np-accent: var(--brand-yellow); }
body .np-block .np-btn, body .np-block .np-btn:hover { color: var(--brand-ink); }
.np-block .np-btn svg { fill: currentColor; }

/* --------------------------------------------------------------------------
   Модалка заявки (#phoneModal → Telegram) и прочие модалки шаблона
   -------------------------------------------------------------------------- */
.modal-content { border: 0; border-radius: var(--brand-radius); overflow: hidden; }
.modal-header { border-bottom: 3px solid var(--brand-yellow); }
.modal-header .modal-title { color: #fff; font-weight: 700; letter-spacing: 0; }
.modal-header .close { color: #fff; opacity: .8; text-shadow: none; }
.modal-header .close:hover { color: var(--brand-yellow); opacity: 1; }
#phoneModal .modal-body { background: #fff; color: var(--brand-ink); }
#phoneModal .modal-body a[href^="tel:"] { color: var(--brand-ink); }
#phoneModal .modal-body a[href*="t.me"] { color: var(--brand-ink) !important; text-decoration: none !important;
  display: inline-flex !important; width: auto; padding: 8px 16px; border-radius: 10px; background: var(--brand-bg); }
#phoneModal .modal-body a[href*="t.me"]:hover { background: var(--brand-yellow-soft); }
#phoneModal .modal-footer { background: #fff; border-top: 0; padding-top: 0; }
#phoneModal .form-input { border: 1px solid var(--brand-line); border-radius: 10px; background: #fff; }
#phoneModal .form-input:focus { border-color: var(--brand-yellow); box-shadow: 0 0 0 3px var(--brand-yellow-soft); }
#callMeButton, #callMeButton:focus { min-height: 48px; margin-bottom: 16px !important; border: 0; border-radius: 10px; background: var(--brand-yellow) !important;
  color: var(--brand-ink); font-size: 14px; font-weight: 700; letter-spacing: .04em; box-shadow: none; }
#callMeButton:hover { background: var(--brand-yellow-dark) !important; color: var(--brand-ink); }
#callMeButton::before, #callMeButton::after { display: none; } /* эффект button-winona */

/* --------------------------------------------------------------------------
   Кнопка «наверх» — внизу по центру, полупрозрачная
   -------------------------------------------------------------------------- */
.to-top { position: fixed; z-index: 1020; left: 50%; bottom: 20px; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%;
  background: rgba(18, 18, 18, .55); color: #fff; cursor: pointer; opacity: 0; visibility: hidden;
  transform: translate(-50%, 12px); transition: opacity .25s, visibility .25s, transform .25s, background .2s;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.to-top.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.to-top:hover, .to-top:focus-visible { background: rgba(18, 18, 18, .85); color: var(--brand-yellow); outline: 0; }
.to-top:focus-visible { box-shadow: 0 0 0 3px rgba(245, 184, 0, .6); }
.to-top svg { width: 24px; height: 24px; fill: currentColor; }
@media (max-width: 575.98px) { .to-top { bottom: 16px; width: 44px; height: 44px; } }

/* меню «по приоритету»: строка занимает свободное место, лишние пункты — в «Ещё» */
@media (min-width: 1200px) {
  .sh-nav { flex: 1 1 auto; min-width: 0; overflow: hidden; }   /* overflow — только для замера; выпадашка вынесена ниже */
}
.sh-more { position: relative; flex: none; }
.sh-more[hidden] { display: none; }
.sh-more__btn { display: inline-flex; align-items: center; gap: 2px; padding: 10px 2px; border: 0; background: none; color: #fff;
  font: inherit; font-size: 15px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.sh-more__btn svg { width: 20px; height: 20px; fill: currentColor; transition: transform .2s; }
.sh-more__btn:hover, .sh-more.is-open .sh-more__btn, .sh-more.has-active .sh-more__btn { color: var(--brand-yellow); }
.sh-more.is-open .sh-more__btn svg { transform: rotate(180deg); }
.sh-more__menu { position: fixed; z-index: 1040; display: none; min-width: 200px; padding: 8px; border-radius: 0 0 12px 12px;
  background: var(--brand-black); border: 1px solid rgba(255, 255, 255, .1); border-top: 3px solid var(--brand-yellow); box-shadow: 0 16px 30px rgba(0, 0, 0, .35); }
.sh-more.is-open .sh-more__menu { display: block; }
.sh .sh-more__menu a { display: block; padding: 10px 12px; border-radius: 8px; white-space: nowrap; }
.sh .sh-more__menu a::after { display: none; }
.sh .sh-more__menu a:hover, .sh .sh-more__menu a.is-active { background: rgba(255, 255, 255, .06); color: var(--brand-yellow); }
