/*
Theme Name: JupiterX Child
Theme URI: https://fskpk.ru/
Description: Child theme for JupiterX customizations.
Author: FSKPK
Template: jupiterx
Version: 1.0.0
Text Domain: jupiterx-child
*/

/* Header like reference layout */
.fsk-custom-header-wrap {
    background: #0a0d12c7;
    border-bottom: 1px solid #1b2230;
}

.fsk-custom-header__inner {
    min-height: 74px;
    padding: 20px 0px;
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 1440px;
}
.jupiterx-site {
    background-color: #000;
}

.fsk-custom-header__brand {
    flex: 0 0 auto;
}

.fsk-custom-header__logo-link {
    display: inline-flex;
    align-items: center;
}

.fsk-custom-header__logo {
    width: clamp(3.125rem, 1.611rem + 6.73vw, 7.5rem);    
    display: block;
}

.fsk-custom-header__site-name {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.fsk-custom-header__nav {
    flex: 1 1 auto;
}

.fsk-custom-header__menu,
.fsk-custom-header__menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fsk-custom-header__menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.625rem, 0.192rem + 1.92vw, 1.875rem);
}

.fsk-custom-header__menu > li {
    position: relative;
}

.fsk-custom-header__menu > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    position: relative;
    padding: 20px 0px;
    color: #f2f4f9;
    font-size: clamp(1rem, 0.827rem + 0.77vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
}

.fsk-custom-header__menu > li > a::before {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 10px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(33, 197, 99, 0), #60a9c7, rgba(33, 197, 99, 0));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.24s ease;
}

.fsk-custom-header__menu > li > a:hover,
.fsk-custom-header__menu > .current-menu-item > a,
.fsk-custom-header__menu > .current-menu-parent > a {
    color: #ffffff;
    transform: translateY(-1px);
    text-shadow: 0 0 12px rgba(33, 197, 99, 0.18);
}

.fsk-custom-header__menu > li > a:hover::before,
.fsk-custom-header__menu > .current-menu-item > a::before,
.fsk-custom-header__menu > .current-menu-parent > a::before {
    transform: scaleX(1);
}

.fsk-custom-header__menu .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-right: 2px solid #9ba6b8;
    border-bottom: 2px solid #9ba6b8;
    background: transparent;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.2s ease;
}

.fsk-custom-header__menu .menu-item-has-children:hover > a::after {
    transform: rotate(225deg) translateY(-1px);
}

.fsk-custom-header__menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: rgba(17, 23, 34, 0.98);
    border: 1px solid #273248;
    border-radius: 12px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.98);
    box-shadow: 0 18px 30px rgba(5, 8, 14, 0.35);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    z-index: 30;
}

.fsk-custom-header__menu .sub-menu .sub-menu {
    top: -10px;
    left: calc(100% - 6px);
}

.fsk-custom-header__menu .sub-menu a {
    display: block;
    color: #d9e1ee;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    padding: 8px 14px;
    text-decoration: none;
}

.fsk-custom-header__menu .sub-menu a:hover,
.fsk-custom-header__menu .sub-menu .current-menu-item > a {
    color: #ffffff;
    background: #1a2436;
}

.fsk-custom-header__menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.fsk-custom-header__menu .sub-menu > li {
    position: relative;
}

.fsk-custom-header__menu .sub-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.fsk-custom-header__actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.fsk-custom-header__phone {
    color: #f3f6fb;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fsk-custom-header__phone:hover {
    color: #ffffff;
}

.fsk-custom-header__cta {
    min-height: 34px;
    padding: 8px 22px;
    background: linear-gradient(180deg, #00b3ff 0%, #6ec1e4 100%);
    color: #000000;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 14px rgba(33, 197, 99, 0.28);
}

.fsk-custom-header__cta:hover {
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(33, 197, 99, 0.35);
}

.fsk-custom-header__toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #2b3953;
    border-radius: 10px;
    background: #101725;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
}

.fsk-custom-header__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #eef2fb;
    transform-origin: center;
    transition: transform 0.24s ease, opacity 0.2s ease;
}

.fsk-custom-header__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.fsk-custom-header__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.3);
}

.fsk-custom-header__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1100px) {
    .fsk-custom-header__menu > li > a::before {
        display: none;
    }
    .fsk-custom-header__menu {
        gap: 18px;
    }

    .fsk-custom-header__menu > li > a {
        font-size: 16px;
    }
    .fsk-custom-header__menu > li > a::after {
        display: none;
    }
}

@media (max-width: 991px) {
    .fsk-custom-header__inner {
        min-height: 70px;
        flex-wrap: wrap;
        gap: 12px;
        padding: 15px 10px;      
    }

    /* Показываем бургер и размещаем его справа */
    .fsk-custom-header__toggle {
        display: inline-flex;
        order: 2; /* после бренда */
        margin-left: auto; /* отталкиваем вправо */
        z-index: 60;
    }

    /* Навигация скрывается с плавным раскрытием */
    .fsk-custom-header__nav {
        display: block; /* позволяем анимировать через max-height */
        width: 100%;
        order: 4;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.36s cubic-bezier(.2,.9,.2,1), opacity 0.28s ease;
        will-change: max-height, opacity;
    }

    .fsk-custom-header__nav.is-open {
        max-height: 1000px; /* достаточно для всех пунктов */
        opacity: 1;
    }

    /* .fsk-custom-header__nav display handled above to allow animated open/close */

    .fsk-custom-header__menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        /* background: #0f1520;
        border: 1px solid #273248; */
        border-radius: 10px;
        /* padding: 10px; */
    }

    .fsk-custom-header__menu > li {
        width: 100%;
    }

    .fsk-custom-header__menu > li > a {
        width: 100%;
        min-height: 40px;
    }

    .fsk-custom-header__menu .menu-item-has-children > a {
        padding-right: 22px;
    }

    .fsk-custom-header__menu .sub-menu {
        position: static;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: none;
        min-width: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        padding: 0 0 0 14px;
        transition: max-height 0.28s ease, opacity 0.2s ease, padding 0.28s ease, visibility 0s linear 0.28s;
    }

    .fsk-custom-header__menu .menu-item-has-children.is-open > .sub-menu {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        padding: 2px 0 8px 14px;
        transition: max-height 0.3s ease, opacity 0.22s ease, padding 0.3s ease, visibility 0s;
    }

    .fsk-custom-header__menu .sub-menu a {
        padding: 6px 0;
    }

    .fsk-custom-header__menu .sub-menu .sub-menu {
        top: auto;
        left: auto;
    }

    .fsk-custom-header__menu .menu-item-has-children > a::after {
        position: absolute;
        left: auto;
        right: 6px;
        top: 50%;
        bottom: auto;
        margin-left: 0;
        width: 7px;
        height: 7px;
        border-right: 2px solid #9ba6b8;
        border-bottom: 2px solid #9ba6b8;
        background: transparent;
        border-radius: 0;
        transform: translateY(-50%) rotate(45deg);
    }

    .fsk-custom-header__menu .menu-item-has-children:hover > a::after,
    .fsk-custom-header__menu .menu-item-has-children.is-open > a::after {
        transform: translateY(-50%) rotate(225deg);
    }

    .fsk-custom-header__actions {
        margin-left: auto;
        align-items: flex-end;
    }
}

@media (max-width: 640px) {
    .fsk-custom-header__logo {
        max-height: 42px;
    }

    .fsk-custom-header__phone {
        font-size: 13px;
    }

    .fsk-custom-header__cta {
        min-height: 32px;
        padding: 7px 14px;
        font-size: 12px;
    }
}

/* Keep default JupiterX mode clean when selected in customizer */
.jupiterx-navbar-description {
    display: none !important;
}

.jupiterx-navbar-brand-link {
    display: inline-flex;
    align-items: center;
}

.jupiterx-navbar-brand-img {
    max-height: 56px;
    width: auto;
    display: block;
}

.jupiterx-navbar-brand-text {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

/* -------------------------------------------------------
   Плавающий виджет соц. сетей (правый нижний угол)
------------------------------------------------------- */
.fsk-social-widget {
    position: fixed;
    bottom: 65px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.fsk-social-widget__toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #00b3ff 0%, #0077cc 100%);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 119, 204, 0.45);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.fsk-social-widget__toggle:hover {  
    transform: scale(1.07);
}
.grecaptcha-badge {
    display: none;
}
.fsk-social-widget__toggle .social-widget__icon {
    width: 24px;
    height: 24px;
    display: block;
    transition: opacity 0.25s ease, transform 0.32s cubic-bezier(.34,1.56,.64,1);
    transform-origin: center;
    position: absolute;
}

/* иконка «открыть» — видна по умолчанию */
.social-widget__icon--default {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* иконка «закрыть» — скрыта по умолчанию */
.social-widget__icon--close {
    opacity: 0;
    transform: scale(0.4) rotate(-90deg);
}

/* когда виджет открыт — меняем иконки местами */
.fsk-social-widget.is-open .social-widget__icon--default {
    opacity: 0;
    transform: scale(0.4) rotate(90deg);
}

.fsk-social-widget.is-open .social-widget__icon--close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.fsk-social-widget__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.32s cubic-bezier(.2,.9,.2,1), opacity 0.24s ease;
}

.fsk-social-widget.is-open .fsk-social-widget__list {
    max-height: 200px;
    opacity: 1;
    pointer-events: auto;
}

.fsk-social-widget__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;   
    color: #9ba6b8;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.fsk-social-widget__link:hover {
    background: #1a2f4a;
    color: #ffffff;
    transform: scale(1.08);
}

.fsk-social-widget__link svg {
    width: 40px;
    height: 40px;
    fill: currentColor;
    display: block;
}

@media (max-width: 640px) {
    .fsk-social-widget {
        bottom: 65px;
        right: 20px;
    }

    .fsk-social-widget__toggle {
        width: 46px;
        height: 46px;
    }

    .fsk-social-widget__link {
        width: 40px;
        height: 40px;
    }
}
