/* === GLOBAL VARIABLES === */
:root {
    --accent: #3cbeb3;
    --accent-rgb: 60, 190, 179;
    --accent-red: #a51310;
    --accent-red-rgb: 165, 19, 16;
    --white: #ffffff;
    --bg-dark: rgba(12, 35, 60, 0.88);
    --bg-darker: rgba(5, 20, 35, 0.82);
}

/* === GLOBAL BG & OVERLAY === */
.page-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('/static/client/tpl/rmavo/img/bg-lkvo.jpg') no-repeat center center/cover;
    z-index: -2;
}
.page-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgb(21 32 44 / 88%), rgb(10 30 50 / 82%));
    z-index: -1;
}
.content-wrapper {
    position: relative; z-index: 1; min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.modal{
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* === HEADER === */
.custom-header {
    padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.15); margin-bottom: 0;
}
.nav-link-custom {
    color: rgba(255, 255, 255, 0.85); font-weight: 500; transition: color 0.2s ease; text-decoration: none;
}
.nav-link-custom:hover {color: var(--accent); 
}
.logo-img {height: 60px; width: auto; filter: brightness(0) invert(1); 
}

/* === HERO BLOCK === */
/*.hero-section {
    padding-top: 3rem; padding-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .hero-section { padding-top: 4.5rem; padding-bottom: 1.5rem; }
}*/
.small-title {
    letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.9rem;
    color: var(--accent); font-weight: 700;
}
.heading-border-end {
    border-right: 5px solid var(--accent); padding-right: 2rem; display: inline-block;
}
.heading-border-start {
    border-left: 5px solid var(--accent); padding-left: 2rem; display: inline-block;
}

/* Кнопки Hero: плавный переход*/
.hero-btn {
    border-color: var(--white);
    color: #fff;
    transition: 
        background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-btn:hover {
    background-color: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.hero-btn:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

@keyframes slideInLeft {from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); }}
@keyframes slideInRight {from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); }}
@media (min-width: 768px) {
    .col-md-6:first-child .text-md-end {animation: slideInLeft 0.8s ease-out forwards;}
    .col-md-6:last-child .text-md-start {animation: slideInRight 0.8s ease-out forwards; animation-delay: 0.2s;}
}
@media (max-width: 767px) {
    .display-4 {font-size: 2.5rem !important;}
    .heading-border-end, .heading-border-start {border: none !important; padding: 0 !important;}
}

/* === AUTH SECTION === */
.auth-section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}
.auth-divider {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  text-align: center;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}
.auth-divider-text {
  padding: 0 1rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;  
}
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-red);
  border: 2px solid var(--accent-red);
  color: #fff;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 12px rgba(var(--accent-red-rgb), 0.3);
}
.auth-btn:hover {
  background-color: #8b100d;
  border-color: #8b100d;
  box-shadow: 0 8px 20px rgba(var(--accent-red-rgb), 0.45);
}
.auth-btn:active {
  box-shadow: 0 2px 8px rgba(var(--accent-red-rgb), 0.25);
  transition-duration: 0.1s;
}

/* === STEPS SECTION === */
.steps-section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
.steps-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}
.steps-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
a.steps-card {
    display: block;
    text-decoration: none;
    cursor: pointer;
}
a.steps-card:hover { 
  text-decoration: none; 
}
a.steps-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 5px;
}
a.steps-card .text-white,
a.steps-card .text-white-50,
a.steps-card h3 { color: inherit; }

.step-badge {
  width: 48px; height: 48px;
  border-left: 5px solid var(--accent);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 3rem; margin-bottom: 1rem;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.steps-card:hover .step-badge {
  background: var(--accent); 
  color: var(--white); 
  border-color: var(--accent);
}
.steps-card h3 { 
  margin-bottom: 0.5rem; 
  font-size: 1.25rem; 
}
.steps-card p { 
  font-size: 0.9rem; 
  line-height: 1.5; 
}

/* === Accent Link === */
.link-accent {
  color: var(--accent); 
  text-decoration: none; 
  font-weight: 500;
  transition: color 0.3s ease, opacity 0.3s ease; display: inline;
}
.link-accent:hover { 
  color: var(--accent); 
  opacity: 0.85; 
  text-decoration: none; 
}
.link-accent:active { 
  opacity: 0.7; 
  transition-duration: 0.1s; 
}

/* === RESULT/PROFILE CARDS (скрытый блок) === */
.info-card {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: border-color 0.2s ease;
}
.info-card:hover { border-color: var(--accent); }

/* === FOOTER SECTION === */
.footer-section {
  padding: 3rem 0 2rem;
  background: rgba(1, 10, 19, 0.4);
  backdrop-filter: blur(3px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-logo { 
  height: 48px; 
  width: auto; 
  filter: brightness(0) invert(1); 
}
.footer-address { 
  color: rgba(255, 255, 255, 0.65); 
  font-size: 0.9rem; 
  line-height: 1.5; 
  margin-bottom: 1rem; 
}
.footer-heading { 
  color: var(--white); 
  font-weight: 600; 
  font-size: 0.85rem; 
  text-transform: uppercase; 
  letter-spacing: 0.05em; 
  margin-bottom: 1rem; 
}

.footer-section a {
  text-decoration: none; 
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.3s ease, opacity 0.3s ease;
}
.footer-section a:hover {
 color: var(--accent); 
 text-decoration: none !important; 
}

a.footer-phone { 
  font-weight: 600; 
  white-space: nowrap; 
  color: var(--white); 
  text-decoration: none; 
  transition: color 0.3s ease; 
}
a.footer-phone:hover { 
  color: var(--accent); 
  text-decoration: none; 
}
a.footer-email { 
  color: var(--accent); 
  font-weight: 500; 
  text-decoration: none; 
}
a.footer-email:hover { 
  color: var(--accent); 
  opacity: 0.85; 
  text-decoration: none; 
}

.contact-desc { 
  color: rgba(255, 255, 255, 0.6); 
  font-size: 0.85rem; 
  display: block; 
  margin-top: 0.15rem; 
}
.contact-row { 
  display: flex; 
  align-items: baseline; 
  gap: 0.5rem; 
  flex-wrap: wrap; 
}

.footer-branches { 
  border-top: 1px solid rgba(255, 255, 255, 0.08); 
  padding-top: 1.5rem; 
}
.branch-item { 
  display: flex; 
  align-items: flex-start; 
  gap: 0.75rem; 
}
.branch-info { 
  display: flex; 
  flex-direction: column; 
  gap: 0.15rem; 
}
.branch-logo {
  width: 50px; 
  height: 50px; 
  object-fit: contain;
  filter: brightness(0) invert(1); 
  flex-shrink: 0; 
  margin-top: 2px;
}

/* === WELLCOME SECTION === */        
/* === Статичная плашка (отключаем наследуемый ховер .steps-card) === */
.info-plaque:hover {
  transform: none !important;
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Ссылка редактирования профиля */
.edit-profile-link {
  display: inline-flex; 
  align-items: center; 
  gap: 0.35rem;
  color: var(--accent); 
  font-size: 0.85rem; 
  font-weight: 500;
  text-decoration: none; 
  opacity: 0.85;
  transition: color 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.edit-profile-link:hover { 
  color: var(--accent); 
  opacity: 1; 
  text-decoration: none; 
}
.edit-profile-link svg { 
  flex-shrink: 0; 
  stroke: currentColor; 
}

/* Основной текст */
.welcome-text {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Подпись под кнопкой */
.btn-caption {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* Красная кнопка результатов (единая анимация с системой) */
.btn-results-red {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.45rem 2.5rem;
  background-color: var(--accent-red);
  border: 2px solid var(--accent-red);
  color: #fff; 
  font-weight: 600; 
  font-size: 0.95rem;
  border-radius: 4px; 
  text-decoration: none;   
  transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-results-red:hover { 
  background-color: #8b100d; 
  border-color: #8b100d; 
  color: #fff; }
.btn-results-red:active { 
  transform: scale(0.98); 
  transition-duration: 0.1s; 
}

/* === STEPS SECTION — обновлённая вёрстка карточек === */
/* ============================================
   SCOPED STYLES: Новая раскладка шагов
   Работает ТОЛЬКО при наличии .steps-layout-menu
   ============================================ */
.steps-layout-menu.steps-section {
    padding-top: 0;
}
.steps-layout-menu .steps-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.steps-layout-menu .steps-card:hover,
.steps-layout-menu .steps-card.active {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

/* Кликабельная ссылка-обёртка */
.steps-layout-menu a.steps-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  cursor: pointer;
}
.steps-layout-menu a.steps-card:hover,.steps-layout-menu a.steps-card.avtive { text-decoration: none; }
.steps-layout-menu a.steps-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 5px;
}

/* Строка: бейдж + заголовок */
.steps-layout-menu .step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Бейдж (только внутри новой секции) */
.steps-layout-menu .step-badge {
  width: 48px;
  height: 48px;
  border-left: 5px solid var(--accent);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  margin-bottom: 0;
}
.steps-layout-menu .steps-card:hover .step-badge,
.steps-layout-menu .steps-card.active .step-badge {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* Заголовок в строку */
.steps-layout-menu .step-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}

/* Описание */
.steps-layout-menu .steps-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* === АККОРДЕОН АНКЕТЫ (Нутро ЛК) === */
.anketaAccordion .accordion-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: visible;
  transition: border-color 0.3s ease;
}

.anketaAccordion .accordion-button {
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1rem 1.25rem;
  box-shadow: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 🔓 ОТКРЫТОЕ СОСТОЯНИЕ */
.anketaAccordion .accordion-button:not(.collapsed) {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  box-shadow: none;
}

/* Фокус для доступности */
.anketaAccordion .accordion-button:focus {
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.4);
  z-index: 2;
}

/* Иконка-шеврон (переопределение Bootstrap) */
.anketaAccordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transition: transform 0.3s ease;
}

/* Шеврон в открытом состоянии */
.anketaAccordion .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233cbeb3'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transform: rotate(-180deg);
}

/* Тело аккордеона */
.anketaAccordion .accordion-body {
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.85);
  padding: 1.5rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Плавное раскрытие */
.anketaAccordion .accordion-collapse {
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === ANKETA WRAPPER === */
.anketa-wrapper {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 5px; /* В одном стиле с .steps-card */
  padding: 2.5rem 2rem;
  margin-top: 2rem;
  backdrop-filter: blur(8px); /* Мягкое размытие фона под блоком */
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.anketa-title {
  color: #1a252f;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* === АДАПТАЦИЯ АККОРДЕОНА ПОД СВЕТЛЫЙ ФОН === */
.anketa-wrapper .accordion-button {
  background: rgba(0, 0, 0, 0.04);
  color: #2c3e50;
  font-weight: 600;
  box-shadow: none;
}
.anketa-wrapper .accordion-button:hover {
  background: rgba(0, 0, 0, 0.06);
}
.anketa-wrapper .accordion-button:not(.collapsed) {
  background: rgba(var(--accent-rgb), 0.12);
  color: #0b5e58; /* Чуть темнее для контраста на белом */
}
.anketa-wrapper .accordion-body {
  background: rgba(255, 255, 255, 0.7);
  color: #333;
}

/* === ПОЛЯ И ТЕКСТЫ === */
.anketa-wrapper .form-control,
.anketa-wrapper .form-select {
  background: #fff;
  border: 1px solid #ced4da;
  color: #212529;
}
.anketa-wrapper .form-control:focus,
.anketa-wrapper .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem rgba(var(--accent-rgb), 0.2);
  color: #212529;
}
.anketa-wrapper label,
.anketa-wrapper legend,
.anketa-wrapper .form-check-label,
.anketa-wrapper .form-text {
  color: #343a40;
}
.anketa-wrapper .alert {
  border-radius: 4px;
  font-size: 0.9rem;
}

/* === Адаптив === */
@media (max-width: 991.98px) {
  .footer-section > .container > .row > [class*="col-"] { text-align: center; margin-bottom: 1.5rem; }
  .contact-row { justify-content: center; }
  .branch-item { justify-content: center; }
}
@media (max-width: 575.98px) {
  .footer-section > .container > .row > [class*="col-"] { margin-bottom: 1.25rem; }
  .contact-row { flex-direction: column; align-items: center; gap: 0.2rem; }
  .contact-row a { white-space: normal; }
  .branch-item { flex-direction: column; align-items: center; gap: 0.25rem; }
  .footer-branches { margin-top: 1.5rem !important; }
  .branch-logo { margin-top: 0; }
}
@media (max-width: 576px) {
  .custom-header .container { 
    flex-direction: column; 
    gap: 12px; 
    text-align: center;     
  }
  .logo-img {
    height: 40px;        
  }
  .custom-header_title {
    font-size: 0.75rem !important;
    color: var(--accent);
    font-weight: 500;
  }
  .welcome-text_desription {
    display: none;
  }
}
 /* === МОБИЛЬНАЯ БОКОВАЯ ПАНЕЛЬ ШАГОВ === */
.offcanvas-steps {
    background: var(--bg-dark);
    backdrop-filter: blur(12px);
    width: 85%;
    max-width: 360px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}
.offcanvas-steps .offcanvas-body {
    background: transparent;
    padding: 1.25rem 1rem;
}
/* Адаптация карточек внутри панели */
.offcanvas-steps .steps-card {
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
}
.offcanvas-steps .step-badge {
    width: 40px;
    height: 40px;
    font-size: 2.4rem;
    border-left-width: 4px;
}
.offcanvas-steps .step-title {
    font-size: 1rem;
}
.offcanvas-steps .steps-card p {
    font-size: 0.85rem;
    line-height: 1.4;
}
/* Тактильный отклик при нажатии в панели */
.offcanvas-steps .steps-card:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

.footer-section .d-flex{
  align-items: initial;
}

/*.anketaAccordion .accordion-button::after{
  display: none;
}*/

.accordion-button::after {
    position: relative;
}

@media screen and (max-width: 600px) {
    .container {
        padding-right: 15px;
        padding-left: 15px;
    }
    .auth-section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .anketa-wrapper {
  padding: 2.5rem 1rem;  
  }
}
