/* ==========================================================================
   BunnyHop — современный слой оформления
   Подключается последним и только переопределяет внешний вид.
   Палитра сохранена: чёрный / графит / фирменный оранжевый #e93f1a.
   ========================================================================== */

:root {
    --bh-accent: #e93f1a;
    --bh-accent-2: #e9621a;
    --bh-accent-light: #ff7a45;
    --bh-dark: #0b0b0b;
    --bh-dark-2: #202020;
    --bh-gray-bg: #f5f5f7;
    /* Оранжевый — сплошной (без перехода цвета); записан как gradient, чтобы работать в background-image и многослойных фонах */
    --bh-gradient: linear-gradient(var(--bh-accent), var(--bh-accent));
    --bh-gradient-text: linear-gradient(var(--bh-accent), var(--bh-accent));
    --bh-gradient-dark: linear-gradient(135deg, #000000 0%, #1a1a1a 60%, #262626 100%);
    --bh-glow: 0 10px 30px rgba(233, 63, 26, 0.35);
    --bh-glow-strong: 0 16px 40px rgba(233, 63, 26, 0.5);
    --bh-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --bh-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.18);
    --bh-radius: 20px;
    --bh-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

body {
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--bh-accent);
    color: #ffffff;
}

/* ---------- Ключевые кадры ---------- */

@keyframes bhRise {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bhFadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bhPop {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bhKenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}


@keyframes bhFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes bhPulseRing {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}


/* ---------- Появление при скролле (классы ставит modern.js) ---------- */

.bh-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s ease, transform 0.8s var(--bh-ease);
}

.bh-reveal.bh-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Полоса прогресса прокрутки ---------- */

.bh-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: var(--bh-gradient-text);
    box-shadow: 0 0 10px rgba(233, 63, 26, 0.6);
    z-index: 100005;
    pointer-events: none;
}

/* ==========================================================================
   Шапка
   ========================================================================== */

header.header_section {
    position: relative;
    /* Шапка (и выпадающее меню пользователя) всегда поверх контента страницы */
    z-index: 1000;
    background: var(--bh-gradient-dark);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    /* backwards: после анимации transform не остаётся и не создаёт лишний слой */
    animation: bhFadeDown 0.6s var(--bh-ease) backwards;
}

header.header_section::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--bh-accent);
}

.navbar-brand img {
    transition: transform 0.5s var(--bh-ease);
}

.navbar-brand:hover img {
    transform: rotate(-15deg) scale(1.15);
}

.navbar-brand span {
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.navbar-brand:hover span {
    background: var(--bh-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.25s ease;
}

/* ::before — потому что ::after занят стрелкой dropdown в Bootstrap */
.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link::before {
    content: "";
    position: absolute;
    left: 30px;
    right: 30px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: var(--bh-gradient-text);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.35s var(--bh-ease);
}

.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link:hover,
.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link.bh-current,
.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link.show {
    color: #ffffff;
}

.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link:hover::before,
.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link.bh-current::before,
.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link.show::before {
    transform: scaleX(1);
}

.header_section .dropdown-menu {
    background: rgba(20, 20, 20, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--bh-shadow-lg);
    overflow: hidden;
}

.header_section .dropdown-menu.show {
    animation: bhFadeDown 0.25s var(--bh-ease) both;
}

.header_section .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 8px 14px;
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.header_section .dropdown-item:hover,
.header_section .dropdown-item:focus {
    background: var(--bh-gradient);
    color: #ffffff;
    padding-left: 18px;
}

/* ==========================================================================
   Общие элементы
   ========================================================================== */

.heading_container h2 {
    position: relative;
    border-bottom: none;
    padding-bottom: 14px;
    letter-spacing: 0.3px;
}

.heading_container h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 64px;
    height: 4px;
    margin-left: -32px;
    border-radius: 4px;
    background: var(--bh-gradient-text);
    transform-origin: center;
    transition: transform 0.8s var(--bh-ease) 0.3s;
}

.about_section .heading_container h2::after {
    left: 10px;
    margin-left: 0;
    transform-origin: left;
}

.bh-reveal .heading_container h2::after,
.heading_container.bh-reveal h2::after {
    transform: scaleX(0);
}

.bh-visible .heading_container h2::after,
.heading_container.bh-visible h2::after {
    transform: scaleX(1);
}

/* Основные кнопки-ссылки: градиент + блик */
.slider_section .detail-box .btn-box a,
.about_section .detail-box a,
.quote_section .box .btn-box a,
.contact_section .contact_form button {
    position: relative;
    overflow: hidden;
    background: var(--bh-gradient);
    border: none;
    border-radius: 50px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: var(--bh-glow);
    transition: transform 0.3s var(--bh-ease), box-shadow 0.3s ease;
}

.slider_section .detail-box .btn-box a::after,
.about_section .detail-box a::after,
.quote_section .box .btn-box a::after,
.contact_section .contact_form button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.slider_section .detail-box .btn-box a:hover,
.about_section .detail-box a:hover,
.quote_section .box .btn-box a:hover,
.contact_section .contact_form button:hover {
    background: var(--bh-gradient);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: var(--bh-glow-strong);
}

.slider_section .detail-box .btn-box a:hover::after,
.about_section .detail-box a:hover::after,
.quote_section .box .btn-box a:hover::after,
.contact_section .contact_form button:hover::after {
    left: 125%;
}

.slider_section .detail-box .btn-box a:active,
.about_section .detail-box a:active {
    transform: translateY(0) scale(0.97);
}

/* ==========================================================================
   Главная — Hero
   ========================================================================== */

.hero_area {
    position: relative;
    overflow: hidden;
    background-image: none;
    background-color: var(--bh-dark);
}

.hero_area::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url(../images/hero-bg.jpg) center / cover no-repeat;
    animation: bhKenBurns 22s ease-in-out infinite alternate;
}

.hero_area::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.15) 100%);
    pointer-events: none;
}

.hero_area .slider_section {
    z-index: 1;
}

.slider_section .text-container {
    padding: 36px 36px 36px 40px;
    border-radius: 24px;
    overflow: hidden;
}

.slider_section .background-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.32) 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
}

.slider_section .text-container::before {
    content: "";
    position: absolute;
    left: 0;
    top: 24px;
    bottom: 24px;
    width: 4px;
    border-radius: 4px;
    background: var(--bh-gradient-text);
    z-index: 2;
}

.slider_section .detail-box h1 {
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.slider_section .detail-box h1 span {
    display: inline-block;
    margin-top: 6px;
    background: var(--bh-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.slider_section .detail-box p {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

/* Анимация контента слайда при смене */
/* --- Смена слайдов ---
   JS карусели — Bootstrap 4 (классы carousel-item-left/right), а CSS Bootstrap 5 подключён позже
   и знает только start/end, из-за чего штатный сдвиг ломался. Поэтому позиции задаём явно. */

/* Hero: сдвиг. «Вперёд» — текущая карточка уходит влево, следующая въезжает справа; «назад» — наоборот */
.slider_section .carousel-item {
    transform: none !important;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1) !important;
}

.slider_section .carousel-item-next:not(.carousel-item-left) {
    transform: translateX(100%) !important;
}

.slider_section .carousel-item-prev:not(.carousel-item-right) {
    transform: translateX(-100%) !important;
}

.slider_section .carousel-item-next.carousel-item-left,
.slider_section .carousel-item-prev.carousel-item-right {
    transform: translateX(0) !important;
}

.slider_section .carousel-item.active.carousel-item-left {
    transform: translateX(-100%) !important;
}

.slider_section .carousel-item.active.carousel-item-right {
    transform: translateX(100%) !important;
}

/* Отзывы: плавное растворение */
.client_section .carousel-item {
    transform: none !important;
    opacity: 0;
    transition: opacity 0.7s ease !important;
}

.client_section .carousel-item.active,
.client_section .carousel-item-next.carousel-item-left,
.client_section .carousel-item-prev.carousel-item-right,
.client_section .carousel-item-next.carousel-item-start,
.client_section .carousel-item-prev.carousel-item-end {
    z-index: 1;
    opacity: 1;
}

.client_section .carousel-item.active.carousel-item-left,
.client_section .carousel-item.active.carousel-item-right,
.client_section .carousel-item.active.carousel-item-start,
.client_section .carousel-item.active.carousel-item-end {
    z-index: 0;
    opacity: 0;
    transition: opacity 0s 0.7s !important;
}

/* Стрелки и индикаторы должны быть выше слайдов (у слайдов z-index: 1) */
.slider_section .custom_carousel-control,
.slider_section .carousel-indicators,
.client_section .carousel-indicators {
    z-index: 5;
}

/* Содержимое въезжающей карточки слегка «догоняет» её — эффект глубины */
.slider_section .carousel-item-next.carousel-item-left .content > *,
.slider_section .carousel-item-prev.carousel-item-right .content > * {
    animation: bhSlideContent 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.slider_section .carousel-item-prev.carousel-item-right .content > * {
    animation-name: bhSlideContentBack;
}

.slider_section .carousel-item .content > *:nth-child(2) { animation-delay: 0.08s; }
.slider_section .carousel-item .content > *:nth-child(3) { animation-delay: 0.16s; }

@keyframes bhSlideContent {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: none; }
}

@keyframes bhSlideContentBack {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: none; }
}

/* Стрелки и индикаторы */
.slider_section .custom_carousel-control .carousel-control-prev,
.slider_section .custom_carousel-control .carousel-control-next {
    background-color: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s var(--bh-ease), background-color 0.3s ease, box-shadow 0.3s ease;
}

.slider_section .custom_carousel-control .carousel-control-prev:hover,
.slider_section .custom_carousel-control .carousel-control-next:hover {
    transform: scale(1.1);
    box-shadow: var(--bh-glow);
}

.slider_section .carousel-indicators li {
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s var(--bh-ease);
    cursor: pointer;
}

.slider_section .carousel-indicators li:hover {
    color: var(--bh-accent-light);
}

.slider_section .carousel-indicators li.active {
    font-weight: 700;
    transform: scale(1.25);
}

/* ==========================================================================
   Главная — О нас
   ========================================================================== */

.about_section .detail-box p {
    line-height: 1.8;
    color: #3a3a3a;
    margin-top: 18px;
}

.about_section .img-box img {
    animation: bhFloat 7s ease-in-out infinite;
    filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.18));
}

/* ==========================================================================
   Главная — Сервис
   ========================================================================== */

/* Плавно растворяем верх и низ фоновой текстуры в белый, чтобы не было резкой границы */
.body_bg {
    position: relative;
    background-image:
        linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0) 160px, rgba(255, 255, 255, 0) calc(100% - 160px), #ffffff 100%),
        url(../images/body_bg.jpg);
    background-size: 100% 100%, cover;
    background-position: center, center;
    background-repeat: no-repeat;
}

.service_section .box,
.service_section .btn_box_link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: calc(100% - 30px);
    margin: 15px 0;
    padding: 28px 30px;
    border-radius: var(--bh-radius);
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--bh-shadow);
    overflow: hidden;
    transition: transform 0.35s var(--bh-ease), box-shadow 0.35s ease;
}

.service_section .box::before,
.service_section .btn_box_link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bh-gradient-text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--bh-ease);
}

.service_section .box:hover,
.service_section .btn_box_link:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 45px rgba(233, 63, 26, 0.18);
}

.service_section .box:hover::before,
.service_section .btn_box_link:hover::before {
    transform: scaleX(1);
}

.service_section .img-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 18px;
    background: var(--bh-gradient);
    box-shadow: var(--bh-glow);
    transition: transform 0.4s var(--bh-ease);
}

.service_section .img-box img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

.service_section .box:hover .img-box,
.service_section .btn_box_link:hover .img-box {
    transform: rotate(-8deg) scale(1.08);
}

.service_section h4 {
    font-weight: 600;
    margin-top: 5px;
}

.service_section p {
    color: #4a4a4a;
    line-height: 1.7;
    margin-bottom: 0;
}

/* ==========================================================================
   Главная — Отзывы
   ========================================================================== */

.client_section {
    font-family: 'Poppins', sans-serif;
}

/* Индикаторы под каруселью, а не поверх неё */
.client_section .carousel {
    display: flex;
    flex-direction: column;
}

.client_section .carousel-inner {
    padding: 16px 12px 36px;
}

/* Карточка отзыва */
.client_section .client_container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 760px;
    min-height: 320px;
    margin: 0 auto;
    padding: 40px 48px 36px;
    text-align: center;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--bh-shadow-lg);
    overflow: hidden;
}

.client_section .client_container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bh-gradient-text);
}

/* Большая декоративная кавычка */
.client_section .client_container::after {
    content: "\201C";
    position: absolute;
    top: -18px;
    right: 28px;
    font-family: Georgia, serif;
    font-size: 180px;
    line-height: 1;
    background: var(--bh-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.15;
    pointer-events: none;
}

.client_section .client-id {
    flex-direction: column;
    gap: 12px;
}

/* Круглый аватар с градиентным кольцом */
.client_section .img-box {
    min-width: 0;
    max-width: none;
    width: 96px;
    height: 96px;
    padding: 4px;
    border-radius: 50%;
    background: var(--bh-gradient);
    box-shadow: var(--bh-glow);
}

.client_section .img-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid #ffffff;
    border-radius: 50%;
}

.client_section .client_name {
    padding-left: 0;
    text-align: center;
}

.client_section .client_name h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--bh-dark);
}

.client_section .client_detail {
    padding: 0;
    margin-top: 18px;
    background: transparent;
}

.client_section .client_text p,
.client_section .client_text blockquote {
    color: #444444;
    font-size: 16px;
    line-height: 1.75;
}

.client_section .client_text blockquote {
    padding: 0 34px;
}

.client_section .client_text blockquote::before,
.client_section .client_text blockquote::after {
    color: var(--bh-accent);
    font-size: 18px;
}

.client_section .client_text blockquote::before {
    top: 0;
    left: 0;
}

.client_section .client_text blockquote::after {
    right: 0;
    bottom: 0;
}

/* Индикаторы: сбрасываем прозрачные рамки Bootstrap 4, из-за которых точки были неровными */
.client_section .carousel-indicators {
    position: static;
    order: 2;
    gap: 10px;
    margin: 4px 0 0;
    padding: 0;
}

.client_section .carousel-indicators li {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background-color: rgba(233, 63, 26, 0.25);
    background-clip: border-box;
    opacity: 1;
    overflow: hidden;
    transition: width 0.35s var(--bh-ease), background-color 0.3s ease;
}

.client_section .carousel-indicators li:hover {
    background-color: rgba(233, 63, 26, 0.5);
}

.client_section .carousel-indicators li.active {
    width: 34px;
    background-color: var(--bh-accent);
    background-image: var(--bh-gradient);
}

/* ==========================================================================
   Главная — Контакты и соцсети
   ========================================================================== */

/* Карточка контактов и карта под ней — единый блок шириной с карту */
#contacts {
    padding: 70px 16px 0;
}

#contacts .footer_contact {
    position: relative;
    width: 800px;
    max-width: 100%;
    padding: 34px 36px 30px;
    border-radius: 24px 24px 0 0;
    background: #ffffff;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

#contacts .footer_contact::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bh-gradient-text);
}

#contacts .contact-text {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 32px;
    margin-top: 26px;
}

#contacts .contact-text p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #2a2a2a;
    text-align: left;
}

/* Иконки FontAwesome 4: телефон и метка */
#contacts .contact-text p:not(.map-link-wrap)::before {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bh-gradient);
    box-shadow: var(--bh-glow);
    color: #ffffff;
    font-family: "FontAwesome";
    font-size: 18px;
    font-weight: normal;
}

#contacts .contact-text p:nth-child(1)::before {
    content: "\f095";
}

#contacts .contact-text p:nth-child(2)::before {
    content: "\f041";
    font-size: 20px;
}

#contacts .contact-text p:nth-child(1) {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
}

#contacts .contact-text .map-link-wrap {
    flex-basis: 100%;
    justify-content: center;
    margin-top: 6px;
}

.contact-text .yandex-map-link {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid rgba(233, 63, 26, 0.35);
    border-radius: 50px;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--bh-ease);
}

.contact-text .yandex-map-link:hover {
    background: var(--bh-gradient);
    border-color: transparent;
    color: #ffffff;
    box-shadow: var(--bh-glow);
    transform: translateY(-2px);
}

.contact-map {
    padding: 0 16px;
}

.contact-map > :not(script) {
    width: 800px;
    max-width: 100%;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.15);
}

/* Соцсети под картой */
.info_section .footer_contact .box {
    gap: 18px;
    padding-top: 30px;
}

.info_section .footer_contact .box .img-box {
    display: inline-block;
    transition: transform 0.35s var(--bh-ease), filter 0.35s ease;
}

.info_section .footer_contact .box .img-box:hover {
    transform: translateY(-6px) scale(1.1);
    filter: drop-shadow(0 10px 14px rgba(233, 63, 26, 0.35));
}

.comunity_tg {
    color: var(--bh-accent);
}

/* ==========================================================================
   Футер и кнопка «наверх»
   ========================================================================== */

.footer_section {
    position: relative;
    background: linear-gradient(180deg, #1a1a1a 0%, var(--bh-dark) 100%);
}

.footer_section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bh-accent);
}

.footer_section p {
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    font-size: 14px;
}

.scroll-to-top {
    background: var(--bh-gradient);
    border: none;
    box-shadow: var(--bh-glow);
    z-index: 1000;
    animation: bhPop 0.35s var(--bh-ease) both;
    transition: transform 0.3s var(--bh-ease), box-shadow 0.3s ease;
}

.scroll-to-top::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--bh-accent);
    animation: bhPulseRing 2s ease-out infinite;
    pointer-events: none;
}

.scroll-to-top:hover {
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow: var(--bh-glow-strong);
}

/* ==========================================================================
   Страницы с формами (вход, админка, восстановление)
   ========================================================================== */

.hero_area_non_img:not(:has(.background-slideshow)) {
    background: var(--bh-gray-bg);
}

/* Всплывающие ошибки */
.error-message div {
    background: rgba(15, 15, 15, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--bh-accent);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --- Авторизация --- */

#auth .container {
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.22), 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: bhRise 0.7s var(--bh-ease) both;
}

#auth .form-container h1 {
    color: var(--bh-dark);
    padding-bottom: 4px;
}

#auth .form-container span {
    color: #888;
    margin: 6px 0 10px;
}

#auth .form-container input {
    background: #f3f3f5;
    border: 1.5px solid transparent;
    border-radius: 12px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

#auth .form-container input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--bh-accent);
    box-shadow: 0 0 0 4px rgba(233, 63, 26, 0.15);
}

#auth button {
    border-radius: 50px;
    transition: transform 0.25s var(--bh-ease), box-shadow 0.25s ease, background 0.25s ease;
}

#auth button:not(.ghost) {
    background: var(--bh-gradient);
    border-color: transparent;
    box-shadow: var(--bh-glow);
    margin-top: 10px;
}

#auth button:not(.ghost):hover {
    transform: translateY(-2px);
    box-shadow: var(--bh-glow-strong);
}

#auth button.ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

#auth button:active {
    transform: scale(0.95);
}

#auth .overlay {
    background: var(--bh-gradient-dark);
    overflow: hidden;
}

#auth .overlay-panel h1 {
    color: #ffffff;
}

#auth .overlay-panel p {
    color: rgba(255, 255, 255, 0.8);
}

/* --- Восстановление пароля / новый пароль --- */

.auth_content:not(#auth) > #container {
    position: relative;
    border-radius: 24px;
    border: none;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.auth_content:not(#auth) > #container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bh-gradient-text);
}

.auth_content:not(#auth) > #container input {
    border-radius: 12px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.auth_content:not(#auth) > #container input:focus {
    outline: none;
    border-color: var(--bh-accent);
    box-shadow: 0 0 0 4px rgba(233, 63, 26, 0.15);
}

.auth_content:not(#auth) > #container button {
    background: var(--bh-gradient);
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--bh-glow);
    transition: transform 0.25s var(--bh-ease), box-shadow 0.25s ease;
}

.auth_content:not(#auth) > #container button:hover {
    transform: translateY(-2px);
    box-shadow: var(--bh-glow-strong);
}

/* --- Админ-панель --- */

#adminTabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#adminTabs .nav-link {
    color: #555555;
    border: none;
    border-bottom: 3px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

#adminTabs .nav-link:hover {
    color: var(--bh-accent);
}

#adminTabs .nav-link.active {
    color: var(--bh-accent);
    font-weight: 600;
    background: transparent;
    border-bottom-color: var(--bh-accent);
}

.hero_area_non_img .card {
    border: none;
    border-radius: var(--bh-radius);
    box-shadow: var(--bh-shadow-lg);
    overflow: hidden;
    animation: bhRise 0.5s var(--bh-ease) both;
}

.hero_area_non_img .card-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 18px 20px;
}

/* ==========================================================================
   Модальные окна Bootstrap (FAQ, админка)
   ========================================================================== */

.modal.fade .modal-dialog {
    transform: translateY(30px) scale(0.96);
    transition: transform 0.35s var(--bh-ease);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal.fade .modal-content {
    border: none;
    border-radius: var(--bh-radius);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.modal.fade .modal-header {
    position: relative;
    background: var(--bh-gradient-dark);
    color: #ffffff;
    border-bottom: none;
}

.modal.fade .modal-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--bh-gradient-text);
}

.modal.fade .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    transition: transform 0.3s var(--bh-ease);
}

.modal.fade .modal-header .btn-close:hover {
    transform: rotate(90deg);
}

.modal.fade .modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.modal.fade .modal-footer .btn {
    border-radius: 50px;
    padding: 8px 24px;
}

.faq-item {
    padding-left: 16px;
    border-left: 3px solid rgba(233, 63, 26, 0.18);
    transition: border-color 0.3s ease, transform 0.3s var(--bh-ease);
}

.faq-item:hover {
    border-left-color: var(--bh-accent);
    transform: translateX(4px);
}

/* ==========================================================================
   Тренировки
   ========================================================================== */

.bg-slide {
    animation: bhKenBurns 20s ease-in-out infinite alternate;
}

.background-slideshow::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

#selected_period {
    margin-top: 10px;
    padding: 20px;
    border-radius: var(--bh-radius);
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: bhFadeDown 0.6s var(--bh-ease) both;
}

#selected_period label {
    font-weight: 500 !important;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9) !important;
}

#selected_period input,
#selected_period select {
    border-radius: 12px !important;
    border: 1.5px solid transparent !important;
    background-color: rgba(255, 255, 255, 0.95);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#selected_period input:focus,
#selected_period select:focus {
    outline: none;
    border-color: var(--bh-accent) !important;
    box-shadow: 0 0 0 4px rgba(233, 63, 26, 0.25);
}

#bookButton,
#faqButton {
    border-radius: 12px !important;
    transition: transform 0.25s var(--bh-ease), box-shadow 0.25s ease, background-color 0.25s ease;
}

/* background-color выставляет traningScripts.js — градиент рисуется поверх только у активной кнопки */
#bookButton:not(:disabled) {
    background-image: var(--bh-gradient);
    box-shadow: var(--bh-glow);
}

#bookButton:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--bh-glow-strong);
}

#faqButton {
    background-color: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

#faqButton:hover {
    background-color: rgba(255, 255, 255, 0.24) !important;
    transform: translateY(-2px);
}

.layout_padding_bikes > .container > h5 {
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 15px;
    margin-top: 10px;
}

/* Карточки тренажёров */
.bike-cards-container {
    gap: 32px;
}

.bike-card {
    opacity: 1;
    border-radius: 18px;
    border: 2px solid transparent;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    animation: bhRise 0.6s var(--bh-ease) backwards;
    transition: transform 0.35s var(--bh-ease), box-shadow 0.35s ease, border-color 0.35s ease;
}

.bike-card:nth-child(2) { animation-delay: 0.08s; }
.bike-card:nth-child(3) { animation-delay: 0.16s; }
.bike-card:nth-child(4) { animation-delay: 0.24s; }
.bike-card:nth-child(5) { animation-delay: 0.32s; }
.bike-card:nth-child(6) { animation-delay: 0.4s; }
.bike-card:nth-child(7) { animation-delay: 0.48s; }
.bike-card:nth-child(n+8) { animation-delay: 0.56s; }

.bike-card img {
    border-bottom: none;
    transition: transform 0.5s var(--bh-ease);
}

.bike-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 45px rgba(233, 63, 26, 0.3);
}

.bike-card:hover img {
    transform: scale(1.06);
}

.bike-card h3 {
    font-weight: 600;
}

.bike-card.selected {
    transform: translateY(-6px) scale(1.06);
    border: 2px solid transparent;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        var(--bh-gradient) border-box;
    box-shadow: 0 0 0 4px rgba(233, 63, 26, 0.25), 0 22px 50px rgba(233, 63, 26, 0.45);
}

.bike-number {
    z-index: 1;
    background: var(--bh-gradient);
    box-shadow: 0 4px 12px rgba(233, 63, 26, 0.5);
}

/* Таблица записей */
#schedule {
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--bh-radius) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    animation: bhRise 0.5s var(--bh-ease) both;
}

#table-body th {
    color: var(--bh-accent-light);
    padding-top: 14px;
    letter-spacing: 0.5px;
}

#table-body tr {
    transition: background-color 0.2s ease;
}

#table-body tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.delete-icon {
    transition: transform 0.25s var(--bh-ease), filter 0.25s ease;
}

.delete-icon:hover {
    transform: scale(1.15) rotate(8deg);
    filter: drop-shadow(0 4px 8px rgba(233, 63, 26, 0.5));
}

/* ==========================================================================
   Профиль
   ========================================================================== */

.profileMain {
    gap: 24px;
    padding: 24px;
    background: var(--bh-gray-bg);
}

.profileMain .profile-container {
    padding-top: 50px;
    border-radius: 24px;
    box-shadow: var(--bh-shadow-lg);
    overflow: hidden;
    align-self: flex-start;
    animation: bhRise 0.6s var(--bh-ease) both;
}

.profileMain .profile-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--bh-gradient-dark);
}

.profileMain .badge {
    z-index: 2;
    top: 14px;
    left: 14px;
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.profileMain .avatar-container {
    position: relative;
    z-index: 1;
}

.profileMain #avatarImg {
    border: 4px solid #ffffff;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.profileMain .user-info h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.profileMain .content {
    padding: 4px 0;
    animation: bhRise 0.6s var(--bh-ease) 0.15s both;
}

.profileMain .content h2 {
    font-weight: 600;
    margin-bottom: 18px;
}

.profileMain table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--bh-radius);
    overflow: hidden;
    box-shadow: var(--bh-shadow-lg);
}

.profileMain th {
    background: var(--bh-gradient-dark);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-bottom: none;
    padding: 14px 12px;
}

.profileMain td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: middle;
}

.profileMain tbody tr {
    transition: background-color 0.2s ease;
    animation: bhRise 0.45s var(--bh-ease) both;
}

.profileMain tbody tr:nth-child(2) { animation-delay: 0.05s; }
.profileMain tbody tr:nth-child(3) { animation-delay: 0.1s; }
.profileMain tbody tr:nth-child(4) { animation-delay: 0.15s; }
.profileMain tbody tr:nth-child(5) { animation-delay: 0.2s; }
.profileMain tbody tr:nth-child(n+6) { animation-delay: 0.25s; }

.profileMain tbody tr:hover {
    background-color: rgba(233, 63, 26, 0.05);
}

.profileMain tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 992px) {
    .custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link::before {
        left: 50%;
        right: auto;
        width: 40px;
        margin-left: -20px;
    }
}

@media (max-width: 768px) {
    .slider_section .text-container {
        padding: 26px 22px;
    }

    .slider_section .text-container::before {
        display: none;
    }

    .service_section .box,
    .service_section .btn_box_link {
        height: auto;
    }

    .profileMain {
        padding: 12px;
        gap: 16px;
    }

    .profileMain .profile-container {
        align-self: stretch;
    }

    #selected_period {
        padding: 16px;
    }

    .client_section .client_container {
        min-height: 0;
        padding: 32px 20px 28px;
    }

    .client_section .client_text blockquote {
        padding: 0 26px;
    }

    #contacts {
        padding-top: 50px;
    }

    #contacts .footer_contact {
        padding: 30px 20px 26px;
    }

    #contacts .contact-text {
        flex-direction: column;
        align-items: flex-start;
    }

    #contacts .contact-text .map-link-wrap {
        align-self: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
