/* ============================================================
   БУДПРОФ — HEADER STYLES
   /assets/css/header.css
============================================================ */

/* ===== TOP BAR ===== */
.bp-topbar {
    background-color: rgba(87, 151, 238, 0.5) !important;
    padding: 7px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    font-family: var(--bp-font-main);
}
.bp-topbar-inner {
    max-width: 1560px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.bp-topbar-left  { display: flex; align-items: center; gap: 20px; }
.bp-topbar-right { display: flex; align-items: center; gap: 16px; }
.bp-topbar a {
    color: rgba(255,255,255,0.9); text-decoration: none;
    transition: color 0.2s; display: flex; align-items: center; gap: 6px;
}
.bp-topbar a:hover { color: #fff; }
.bp-topbar svg {
    width: 14px; height: 14px; stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.bp-topbar-phone { font-weight: 700; font-size: 14px; }

/* ===== MAIN HEADER ===== */
.bp-header {
    position: sticky; top: 0; left: 0; right: 0; z-index: 9999;
    background: var(--bp-color-white);
    box-shadow: var(--bp-header-shadow);
    transition: box-shadow 0.3s;
    font-family: var(--bp-font-main);
}
.bp-header.scrolled { box-shadow: var(--bp-header-shadow-scrolled); }

.bp-header-inner {
    max-width: 1560px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: var(--bp-header-height); gap: 16px;
}

/* Logo */
.bp-logo { display: flex; align-items: center; text-decoration: none !important; flex-shrink: 0; }
.bp-logo img { height: 95px; width: auto; display: block; }

/* Nav */
.bp-nav { flex: 1; display: flex; justify-content: center; }
.bp-nav-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; align-items: center; gap: 2px;
}
.bp-nav-list li { position: relative; }
.bp-nav-list li a {
    display: block; padding: 8px 13px; border-radius: 8px;
    font-size: 14px; font-weight: 600; color: #333;
    text-decoration: none !important; white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}
.bp-nav-list li a:hover,
.bp-nav-list li.current-menu-item > a { color: var(--bp-color-accent); background: #e8f1fb; }

/* Dropdown */
.bp-nav-list li {
    position: relative;
}

.bp-nav-list li ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--bp-dropdown-shadow);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.bp-nav-list li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bp-nav-list li ul li a {
    padding: 9px 14px;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
    display: block;
}

.bp-nav-list li ul li a:hover {
    background: #f5f7fa;
}

/* Місток між пунктом меню і підменю */
.bp-nav-list li.menu-item-has-children::before {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 14px;
}

/* Стрілка для пунктів з підменю */
.bp-nav-list li.menu-item-has-children > a {
    position: relative;
    padding-right: 18px;
}

.bp-nav-list li.menu-item-has-children > a::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-60%) rotate(45deg);
    transition: transform 0.2s ease;
}

.bp-nav-list li.menu-item-has-children:hover > a::after {
    transform: translateY(-30%) rotate(225deg);
}

/* Header right */
.bp-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.bp-header-phone {
    font-size: 15px; font-weight: 700; color: var(--bp-color-title);
    text-decoration: none !important; white-space: nowrap;
    transition: color 0.2s;
}
.bp-header-phone:hover { color: var(--bp-color-accent); }

/* Buttons */
.bp-btn-calc {
    display: inline-flex; align-items: center; gap: 6px;
    background: #e8f1fb; color: var(--bp-color-accent) !important;
    padding: 10px 18px; border-radius: var(--bp-radius-pill);
    font-size: 13px; font-weight: 700;
    border: 2px solid var(--bp-color-accent); cursor: pointer;
    text-decoration: none !important; white-space: nowrap;
    font-family: var(--bp-font-main); transition: all 0.2s;
}
.bp-btn-calc:hover { background: var(--bp-color-accent); color: #fff !important; }
.bp-btn-calc svg {
    width: 15px; height: 15px; stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.bp-btn-call {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bp-color-accent); color: #fff !important;
    padding: 11px 20px; border-radius: var(--bp-radius-pill);
    font-size: 13px; font-weight: 700; border: none;
    cursor: pointer; white-space: nowrap;
    font-family: var(--bp-font-main);
    box-shadow: var(--bp-shadow-accent);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
}
.bp-btn-call:hover {
    background: var(--bp-color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--bp-shadow-accent);
    color: #fff !important;
}
.bp-btn-call svg {
    width: 15px; height: 15px; stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Burger */
.bp-burger {
    display: none; flex-direction: column; gap: 5px;
    cursor: pointer; padding: 6px; background: none; border: none;
}
.bp-burger span {
    display: block; width: 24px; height: 2.5px;
    background: var(--bp-color-title); border-radius: 2px; transition: all 0.3s;
}
.bp-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.bp-burger.open span:nth-child(2) { opacity: 0; }
.bp-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.bp-mobile-nav {
    display: none; position: fixed; inset: 0; z-index: 9998;
    background: var(--bp-color-white); padding: 88px 28px 40px;
    flex-direction: column; overflow-y: auto;
    font-family: var(--bp-font-main);
}
.bp-mobile-nav.open { display: flex; }
.bp-mobile-nav a {
    display: block; padding: 14px 4px;
    font-size: 16px; font-weight: 600; color: var(--bp-color-title);
    border-bottom: 1px solid #f0f2f5; text-decoration: none !important;
    transition: color 0.2s;
}
.bp-mobile-nav a:hover { color: var(--bp-color-accent); }
.bp-mobile-nav-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.bp-mobile-nav-actions .bp-btn-call { text-align: center; justify-content: center; width: 100%; }

/* Modal */
.bp-modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 99999;
    background: var(--bp-overlay-dark); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 20px;
    font-family: var(--bp-font-main);
}
.bp-modal-overlay.active { display: flex; }
.bp-modal {
    background: #fff; border-radius: 20px; padding: 44px 40px;
    max-width: 460px; width: 100%; position: relative;
    animation: bpModalIn 0.3s ease;
}
@keyframes bpModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(16px); }
    to   { opacity: 1; transform: none; }
}
.bp-modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 34px; height: 34px; border-radius: 50%;
    background: #f2f4f8; border: none; cursor: pointer;
    font-size: 18px; color: #888;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.bp-modal-close:hover { background: #e0e4ea; }
.bp-modal h3 {
    font-size: 22px; font-weight: 800; margin-bottom: 6px; color: var(--bp-color-title);
}
.bp-modal > p {
    color: var(--bp-color-text-soft); font-size: 14px; line-height: 1.6; margin-bottom: 24px;
}
.bp-modal-field { margin-bottom: 14px; }
.bp-modal-field input,
.bp-modal-field textarea {
    width: 100%; padding: 13px 16px; border-radius: 10px;
    border: 1.5px solid #d8dce5; font-family: var(--bp-font-main);
    font-size: 14px; background: #f8f9fb; transition: border-color 0.2s;
    resize: none; color: var(--bp-color-title);
}
.bp-modal-field input:focus,
.bp-modal-field textarea:focus { border-color: var(--bp-color-accent); outline: none; background: #fff; }
.bp-modal-field input::placeholder,
.bp-modal-field textarea::placeholder { color: #aab0bb; }
.bp-modal-submit {
    width: 100%; padding: 14px; background: var(--bp-color-accent); color: #fff;
    border: none; border-radius: var(--bp-radius-pill); font-family: var(--bp-font-main);
    font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 4px;
    transition: background 0.2s;
}
.bp-modal-submit:hover { background: var(--bp-color-accent-hover); }
.bp-modal-note { text-align: center; font-size: 12px; color: #aaa; margin-top: 10px; }

/* Responsive */
@media (max-width: 1024px) {
    .bp-nav { display: none; }
    .bp-topbar-left { display: none; }
    .bp-burger { display: flex; }
    .bp-header-phone { display: none; }
}
@media (max-width: 600px) {
    .bp-topbar { display: none; }
    .bp-header-inner { height: var(--bp-header-height-mobile); }
    .bp-logo img { height: 44px; }
    .bp-btn-calc { display: none; }
}

/* Пункт меню з випадаючим списком */
.bp-nav-list li.menu-item-has-children {
    position: relative;
}

/* Посилання в пункті меню */
.bp-nav-list li.menu-item-has-children > a {
    position: relative;
    padding-right: 18px;
}

/* Стрілка вниз */
.bp-nav-list li.menu-item-has-children > a::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-60%) rotate(45deg);
    transition: transform 0.2s ease;
}

/* Поворот стрілки при наведенні */
.bp-nav-list li.menu-item-has-children:hover > a::after {
    transform: translateY(-30%) rotate(225deg);
}
.bp-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bp-mobile-nav-list li {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e9edf3;
}

.bp-mobile-nav-list li a {
    display: block;
    padding: 18px 6px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1f2e;
    text-decoration: none;
    line-height: 1.35;
}

.bp-mobile-nav-list li ul {
    list-style: none;
    margin: 0;
    padding: 0 0 0 18px;
}

.bp-mobile-nav-list li ul li {
    border-bottom: 1px solid #eef2f7;
}

.bp-mobile-nav-list li ul li a {
    font-size: 16px;
    font-weight: 600;
    padding: 14px 6px;
    color: #334155;
}

