/* ===== Тёплый фон сайта (вместо стерильного белого) ===== */
body {
    background: #faf3e7 !important;
}

/* Секции, которые ранее были на белом — теперь на кремовом */
.tile,
.tab-block,
.posts_section,
.banner.other-banner + section,
main > section:not(.banner):not(.media-container) {
    background: transparent;
}

/* FAQ-аккордеон и карточки постов — белые, чтобы выделялись на кремовом */
.faq-item,
.recent-post .post {
    background: #ffffff !important;
}

/* Чередующиеся секции с тоном — чуть глубже кремовый */
.media-container.is-style-bg,
.unfolding-block {
    background: #f5ead5 !important;
}

/* ===== Fix nested submenu overflow (Бізнесу → Підбір персоналу → ...) ===== */

/* level-1 submenu container — keep visible & positioned right relative to parent */
.menu-ua .sub-menu-container {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
}

/* nested (level-2) submenu — open to the LEFT of its parent so it doesn't go off-screen */
.menu-ua .sub-menu li.menu-level-1 > .sub-menu-container {
    top: 0;
    left: auto;
    right: 100%;
    margin-right: 4px;
    min-width: 260px;
}

/* Убираем стрелку у "Підбір персоналу" — детей у него больше нет */
.menu-ua .sub-menu li.menu-level-1::after,
.menu-ua .sub-menu li.menu-level-1::before,
.menu-ua .sub-menu li.menu-level-1 > .menu-item-arrow-has-children {
    display: none !important;
    content: none !important;
}
.menu-ua .sub-menu li.menu-level-1 > a {
    background-image: none !important;
    padding-right: 20px !important;
}

/* ===== Submit-кнопка формы — гарантированный стиль ===== */
input[type="submit"].wpcf7-submit,
input[type="submit"].is-style-button--primary,
.wpcf7-form input[type="submit"] {
    display: block !important;
    padding: 14px 36px !important;
    background: #f97316 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: background .2s ease !important;
    margin: 18px auto 0 !important;
    width: auto !important;
    text-decoration: none !important;
    font-family: inherit !important;
}
input[type="submit"].wpcf7-submit:hover,
.wpcf7-form input[type="submit"]:hover {
    background: #ea580c !important;
}
input[type="submit"].wpcf7-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ===== Модалка "Дякую" — гарантированный показ через .is-open ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .65);
    padding: 20px;
}
.modal.is-open {
    display: flex !important;
}
.modal__wrapper {
    background: #ffffff !important;
    border-radius: 12px !important;
    max-width: 480px !important;
    width: 100% !important;
    margin: 0 auto !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25) !important;
    animation: modalPop .25s ease;
}
.modal__content {
    background: transparent !important;
    width: auto !important;
    max-width: 100% !important;
}
@keyframes modalPop {
    from { transform: translateY(20px) scale(.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal__content {
    padding: 40px 32px;
    position: relative;
    text-align: center;
}
.modal.thanks .modal__title {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
}
.modal.thanks .modal__title span {
    color: #f97316;
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
}

/* ===== Компактный футер: лого и контакты на одном уровне ===== */
.footer__content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 50px;
    padding-bottom: 18px !important;
}
.footer__logo {
    flex-shrink: 0;
}
.footer__logo .custom-logo {
    max-height: 150px !important;
    max-width: 320px !important;
    width: auto !important;
    height: auto !important;
}
.footer__contact-info {
    flex: 1;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 24px 30px !important;
}
.footer__item {
    margin: 0 !important;
}

.site-footer {
    padding: 22px 0 18px !important;
}

@media (max-width: 768px) {
    .footer__content {
        flex-direction: column !important;
        gap: 30px;
        align-items: flex-start;
    }
    .footer__contact-info {
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100%;
    }
}

/* Размер логотипа в шапке — фиксируем, чтобы PNG не разъезжался */
.site-header .custom-logo,
.header__logo .custom-logo,
.header__logo img {
    max-height: 120px !important;
    max-width: 320px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}
.header__logo {
    display: flex;
    align-items: center;
}
.header__logo .custom-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

/* Текст бренда рядом с лого */
.brand-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.brand-text .brand-line {
    display: block;
    white-space: nowrap;
}
.brand-text .brand-line:nth-child(1) {
    font-size: 28px;
    letter-spacing: 1.5px;
}
.brand-text .brand-line:nth-child(2) {
    font-size: 16px;
    margin-top: 4px;
    letter-spacing: 1px;
}

/* По умолчанию (на верху страницы) — белый текст + оранжевая 3D-тень */
.site-header .brand-text {
    color: #ffffff !important;
    text-shadow:
        1px 1px 0 #c2410c,
        2px 2px 0 #9a3412,
        3px 3px 0 #7c2d12,
        4px 4px 0 #5b1a08,
        5px 5px 10px rgba(0, 0, 0, .45);
    transition: color .3s ease, text-shadow .3s ease;
}

/* При скролле — графитовый текст + оранжевая 3D-тень */
.site-header.scrolled .brand-text {
    color: #1f2937 !important;
    text-shadow:
        1px 1px 0 #fdba74,
        2px 2px 0 #fb923c,
        3px 3px 0 #f97316,
        4px 4px 8px rgba(249, 115, 22, .4);
}

@media (max-width: 768px) {
    .brand-text .brand-line:first-child { font-size: 18px; }
    .brand-text .brand-line:last-child { font-size: 13px; letter-spacing: 1.5px; }
}

/* Шапка — прозрачная вверху, при скролле становится кремовой */
.site-header,
.header {
    background: transparent !important;
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background .3s ease, box-shadow .3s ease;
}

/* По умолчанию (на верху страницы) — белый текст меню и UA-переключателя */
.site-header .menu-ua > li > a,
.site-header .menu-ua > li > span.menu-item,
.site-header .lang_switch__active-lang {
    color: #ffffff !important;
}
.site-header .lang_switch__active-lang svg {
    fill: #ffffff !important;
}

/* При скролле — кремовая шапка с тёмными кнопками */
.site-header.scrolled,
.header.scrolled {
    background: #faf3e7 !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .1);
}
.site-header.scrolled .menu-ua > li > a,
.site-header.scrolled .menu-ua > li > span.menu-item,
.site-header.scrolled .lang_switch__active-lang {
    color: #1f2937 !important;
}
.site-header.scrolled .lang_switch__active-lang svg {
    fill: #1f2937 !important;
}

/* Hover в обоих состояниях — оранжевый */
.site-header .menu-ua > li > a:hover,
.site-header .menu-ua > li > span.menu-item:hover,
.site-header.scrolled .menu-ua > li > a:hover,
.site-header.scrolled .menu-ua > li > span.menu-item:hover {
    color: #f97316 !important;
}

/* Принудительная раскладка верхнего меню — все 3 пункта в одну строку */
.menu-ua {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.menu-ua > li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative;
    white-space: nowrap;
}
/* Унифицируем стиль текущего пункта со всеми остальными */
.menu-ua > li > a,
.menu-ua > li > span.menu-item,
.menu-ua > li.current-menu-item > a,
.menu-ua > li.current-menu-item > span,
.menu-ua > li.current_page_item > a,
.menu-ua > li.current_page_item > span {
    color: inherit !important;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    background: none !important;
}
.menu-ua > li > a:hover,
.menu-ua > li > span.menu-item:hover {
    color: #f97316 !important;
}

/* make sure nested level-2 items have enough width and don't wrap */
.menu-ua .sub-menu li.menu-level-1 > .sub-menu-container .sub-menu li {
    white-space: nowrap;
}

/* fallback if browser doesn't support right:100% override — at least cap right edge */
@media (min-width: 1024px) {
    .menu-ua-nav {
        position: relative;
    }
}

/* ===== FAQ accordion ===== */
.faq-section {
    padding: 80px 0;
    background: #fff7ed;
}
.faq-section__wrapper {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 32px;
}
.faq-section__title {
    margin-bottom: 36px;
    font-size: 32px;
    font-weight: 700;
    color: #111827;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-item {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(20, 30, 80, .05);
    overflow: hidden;
    transition: box-shadow .2s ease;
}
.faq-item[open] {
    box-shadow: 0 6px 20px rgba(20, 30, 80, .1);
}
.faq-item > summary {
    list-style: none;
    cursor: pointer;
    padding: 22px 56px 22px 24px;
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    position: relative;
    transition: color .2s ease;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: #f97316; }
.faq-item > summary::after {
    content: '';
    position: absolute;
    right: 24px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-right: 2px solid #f97316;
    border-bottom: 2px solid #f97316;
    transform: translateY(-70%) rotate(45deg);
    transition: transform .25s ease;
}
.faq-item[open] > summary::after {
    transform: translateY(-30%) rotate(-135deg);
}
.faq-item__answer {
    padding: 0 24px 22px;
    color: #475569;
    font-size: 15px;
    line-height: 1.65;
}
.faq-item__answer p { margin: 0; }

@media (max-width: 640px) {
    .faq-section { padding: 60px 0; }
    .faq-item > summary { font-size: 15px; padding: 18px 48px 18px 18px; }
    .faq-item__answer { padding: 0 18px 18px; font-size: 14px; }
}

/* ===== 3D headings ===== */

/* Hero H1 — самое мощное 3D, белый текст на фото */
.banner__heading {
    color: #ffffff !important;
    text-shadow:
        1px 1px 0 #c2410c,
        2px 2px 0 #9a3412,
        3px 3px 0 #7c2d12,
        4px 4px 0 #5b1a08,
        5px 5px 0 #3b1004,
        6px 6px 12px rgba(0, 0, 0, .5);
    letter-spacing: -.5px;
}

/* Заголовки секций — без 3D, акцент держит оранжевая черта (.title-border) */
.title-block,
.tile__title,
.faq-section__title,
.our-clients h2,
.posts_section h2,
.tab-heading h4 .text,
.tab-heading h4 {
    text-shadow: none;
}

/* Большие цифры — самый дерзкий 3D, оранжевый стек */
.info-banner__content--number {
    color: #ffffff !important;
    text-shadow:
        1px 1px 0 #c2410c,
        2px 2px 0 #9a3412,
        3px 3px 0 #7c2d12,
        4px 4px 0 #5b1a08,
        5px 5px 0 #3b1004,
        6px 6px 0 #1f0a02,
        7px 7px 16px rgba(0, 0, 0, .45);
}

/* Чтобы тени не обрезались родителями */
.banner__info,
.tile__wrapper,
.faq-section__wrapper,
.info-banner__wrapper,
.our-clients__inner {
    overflow: visible;
}

/* На мобилке — урезаем глубину, чтобы не вылазило за края */
@media (max-width: 768px) {
    .banner__heading {
        text-shadow:
            1px 1px 0 #c2410c,
            2px 2px 0 #9a3412,
            3px 3px 6px rgba(0, 0, 0, .5);
    }
    .info-banner__content--number {
        text-shadow:
            1px 1px 0 #c2410c,
            2px 2px 0 #9a3412,
            3px 3px 0 #7c2d12,
            4px 4px 8px rgba(0, 0, 0, .4);
    }
    .title-block,
    .tile__title,
    .faq-section__title,
    .our-clients h2,
    .posts_section h2 {
        text-shadow:
            1px 1px 0 #d1d5db,
            2px 2px 4px rgba(15, 23, 42, .2);
    }
}
