/* Psych Global Navbar */

.site-header,
#masthead,
.ast-header-break-point .main-header-bar-wrap,
.main-header-bar-wrap,
#page-mobile {
    display: none !important;
}

.entry-header,
.ast-page-title-wrap,
.ast-page-title-area,
.page-title-area,
.ast-above-header-wrap,
.ast-breadcrumbs-wrap {
    display: none !important;
}

.psych-navbar-wrap {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

body.admin-bar .psych-navbar-wrap { top: 32px !important; }
@media screen and (max-width: 782px) {
    body.admin-bar .psych-navbar-wrap { top: 46px !important; }
}

/* JS-fallback: если sticky не работает, используем fixed */
.psych-navbar-wrap--fixed {
    position: fixed !important;
    left: 0;
    right: 0;
}
.psych-navbar-spacer {
    display: none;
}
.psych-navbar-spacer--active {
    display: block;
}

body { scroll-padding-top: 160px; }
body.admin-bar { scroll-padding-top: 192px; }

/* Topbar */
.psych-topbar {
    display: none;
    background: #ffffff;
    color: #242c40;
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    padding: 10px 0;
    border-bottom: 1px solid #dbe1f2;
}
.psych-topbar__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.psych-topbar__left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.psych-topbar__contact {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #242c40;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}
.psych-topbar__contact:hover { color: #6b7cb8; }
.psych-topbar__social {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid #dbe1f2;
    padding-left: 16px;
    margin-left: 4px;
}
.psych-topbar__social a {
    color: #6b7cb8;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.psych-topbar__social a:hover { color: #5f6fae; }
.psych-topbar__btn {
    background: #eef1fb;
    color: #6b7cb8;
    text-decoration: none;
    padding: 7px 18px;
    border-radius: 6px;
    border: 1px solid #dbe1f2;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.psych-topbar__btn:hover { background: #6b7cb8; color: #fff; border-color: #6b7cb8; }

/* Navbar */
.psych-nav {
    background: linear-gradient(to bottom, rgba(255,255,255,1.00) 0%, rgba(255,255,255,0.75) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(203,214,240,0.5);
    transition: box-shadow 0.25s;
}
.psych-nav--scrolled { box-shadow: 0 4px 24px rgba(107,124,184,0.13); }
.psych-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 72px;
}

/* Logo */
.psych-nav__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.psych-nav__logo-img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.psych-nav__logo-wrap { display: flex; flex-direction: column; line-height: 1.1; }
.psych-nav__logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #0a0f1e;
    white-space: nowrap;
    letter-spacing: -0.01em;
}
.psych-nav__logo-sub {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #646e88;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Menu */
.psych-nav__menu { flex: 1; display: flex; justify-content: center; }
.psych-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.psych-nav__list li { margin: 0; padding: 0; }
.psych-nav__list li a {
    display: block;
    padding: 10px 16px;
    color: #6b7cb8;
    text-decoration: none;
    font-size: 17px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    border-radius: 10px;
    white-space: nowrap;
    border: 2px solid transparent;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.psych-nav__list li a:hover {
    color: #6b7cb8;
    border-color: #6b7cb8;
    background: rgba(107,124,184,0.06);
    box-shadow: inset 0 2px 5px rgba(107,124,184,0.2), inset 0 1px 2px rgba(107,124,184,0.15);
}
.psych-nav__list li.current-menu-item > a { color: #6b7cb8; }
.psych-nav__list li.menu-item-type-custom > a {
    border: 2px solid transparent;
    outline: none;
    box-shadow: none;
    background: transparent;
}
.psych-nav__list li.menu-item-type-custom > a:hover {
    border-color: #6b7cb8;
    background: rgba(107,124,184,0.06);
}

/* Language picker */
.psych-lang-picker { position: relative; }

.psych-lang-toggle {
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; padding: 2px; cursor: pointer;
    border-radius: 4px; line-height: 0;
    box-shadow: 0 0 0 1.5px rgba(0,0,0,0.45);
    opacity: 0.75;
    transition: opacity .15s, box-shadow .15s;
}
.psych-lang-toggle:hover { opacity: 1; }
.psych-lang-toggle svg { display: block; border-radius: 2px; }

.psych-lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%; transform: translateX(-50%) translateY(-8px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
    padding: 10px 8px;
    display: flex; flex-direction: column; gap: 8px; align-items: center;
    z-index: 9999;
    min-width: 52px;
    opacity: 0; visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    pointer-events: none;
}
.psych-lang-dropdown::before {
    content: '';
    position: absolute;
    top: -10px; left: 0; right: 0;
    height: 10px;
}
.psych-lang-dropdown.is-open {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.psych-lang-opt {
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; line-height: 0;
    border-radius: 4px; overflow: hidden;
    box-shadow: 0 0 0 1.5px rgba(0,0,0,0.3);
    opacity: 0.6;
    transition: opacity .15s, box-shadow .15s;
}
.psych-lang-opt:hover { opacity: 1; }
.psych-lang-opt svg { display: block; }
.psych-lang-opt.psych-lang--active { opacity: 1; box-shadow: 0 0 0 2px #6b7cb8; }

/* CTA buttons */
#psych-register-btn,
#psych-register-btn-mobile { display: none !important; }
.psych-nav__cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.psych-nav__btn-outline {
    background: #7abf52;
    color: #fff;
    border: 2px solid #7abf52;
    padding: 13px 22px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
    -webkit-appearance: none;
}
.psych-nav__btn-outline:hover { background: #69aa42; border-color: #69aa42; transform: translateY(-1px); }
.psych-nav__btn-primary {
    background: #a4b4e3;
    color: #fff;
    border: none;
    padding: 13px 24px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}
.psych-nav__btn-primary:hover { background: #6b7cb8; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(107,124,184,0.3); }

/* Burger */
.psych-nav__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.psych-nav__burger span { display: block; height: 2px; background: #6b7cb8; border-radius: 2px; transition: transform 0.25s, opacity 0.25s; width: 100%; }
.psych-nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.psych-nav__burger.is-open span:nth-child(2) { opacity: 0; }
.psych-nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.psych-nav__mobile { display: none; flex-direction: column; background: #fff; border-top: 1px solid #eef1fb; padding: 12px 24px 20px; }
.psych-nav__mobile.is-open { display: flex; }
.psych-nav__mobile-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.psych-nav__mobile-list li { margin: 0; }
.psych-nav__mobile-list li a { display: block; padding: 12px 0; color: #242c40; text-decoration: none; font-size: 16px; font-family: 'Inter', sans-serif; font-weight: 500; border-bottom: 1px solid #eef1fb; transition: color 0.18s; }
.psych-nav__mobile-list li a:hover { color: #6b7cb8; }
.psych-nav__mobile-btn { display: block; margin-top: 16px; background: #a4b4e3; color: #fff; text-align: center; padding: 13px; border-radius: 8px; text-decoration: none; font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 700; transition: background 0.2s; border: none; cursor: pointer; }
.psych-nav__mobile-btn:hover { background: #6b7cb8; color: #fff; }
.psych-nav__mobile-btn--register { background: #a4b4e3; color: #fff; border: none; cursor: pointer; font-family: 'Montserrat', sans-serif; font-weight: 700; }

/* Modal */
.psych-modal-overlay { position: fixed; inset: 0; background: rgba(36,44,64,0.55); backdrop-filter: blur(3px); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.psych-modal-overlay.is-open { opacity: 1; pointer-events: all; }
.psych-modal { background: #fff; border-radius: 20px; padding: 40px; max-width: 480px; width: 100%; box-shadow: 0 24px 80px rgba(36,44,64,0.2); position: relative; transform: scale(0.94) translateY(12px); transition: transform 0.25s; }
.psych-modal-overlay.is-open .psych-modal { transform: scale(1) translateY(0); }
.psych-modal__close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; background: #eef1fb; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #646e88; transition: background 0.15s, color 0.15s; padding: 6px; }
.psych-modal__close:hover { background: #dbe1f2; color: #242c40; }
.psych-modal__close svg { width: 16px; height: 16px; display: block; }
.psych-modal__title { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 22px; color: #242c40; margin: 0 0 22px; padding-right: 32px; }
.psych-modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.psych-modal__group { display: flex; flex-direction: column; margin-bottom: 14px; }
.psych-modal__label { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; color: #242c40; margin-bottom: 6px; }
.psych-modal__req { color: #e74c3c; }
.psych-modal__input { border: 1.5px solid #dbe1f2; border-radius: 10px; padding: 11px 14px; font-family: 'Inter', sans-serif; font-size: 14px; color: #242c40; background: #f9faff; outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%; box-sizing: border-box; resize: none; }
.psych-modal__input:focus { border-color: #a4b4e3; box-shadow: 0 0 0 3px rgba(164,180,227,0.2); background: #fff; }
.psych-modal__input--error { border-color: #e74c3c !important; }
.psych-modal__textarea { min-height: 90px; resize: vertical; }
.psych-modal__err { font-family: 'Inter', sans-serif; font-size: 12px; color: #e74c3c; margin-top: 4px; min-height: 16px; display: block; }
.psych-modal__submit { width: 100%; background: #6b7cb8; color: #fff; border: none; border-radius: 10px; padding: 14px; font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 6px; transition: background 0.2s, transform 0.15s; }
.psych-modal__submit:hover { background: #5f6fae; transform: translateY(-1px); }
.psych-modal__submit:disabled { background: #cdd6f0; cursor: not-allowed; transform: none; }
.psych-modal__note { font-family: 'Inter', sans-serif; font-size: 12px; color: #646e88; text-align: center; margin: 10px 0 0; }
.psych-modal__alert { border-radius: 8px; padding: 10px 14px; font-family: 'Inter', sans-serif; font-size: 13.5px; margin-bottom: 12px; }
.psych-modal__alert--error  { background: #fdecea; color: #c0392b; border: 1px solid #e74c3c; }
.psych-modal__alert--success { background: #eafaf1; color: #1e8449; border: 1px solid #27ae60; }
.psych-modal__divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: #cdd6f0; font-family: 'Inter', sans-serif; font-size: 13px; }
.psych-modal__divider::before, .psych-modal__divider::after { content: ''; flex: 1; height: 1px; background: #dbe1f2; }
.psych-modal__social { display: flex; gap: 12px; }
.psych-modal__social-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid #dbe1f2; border-radius: 10px; padding: 11px 16px; background: #fff; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; color: #242c40; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.psych-modal__social-btn:hover { border-color: #a4b4e3; background: #eef1fb; }
.psych-modal__social-btn--google:hover  { border-color: #4285F4; }
.psych-modal__social-btn--facebook:hover { border-color: #1877F2; }

/* Selection card pencil */
.psych-selection-card--clickable { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; position: relative; overflow: visible; }
.psych-selection-card--clickable:hover { border-color: #6b7cb8; box-shadow: 0 2px 12px rgba(107,124,184,0.18); background: #eef1fb; }
.psych-selection-card--clickable::after { content: ''; position: absolute; top: -10px; right: -10px; width: 24px; height: 24px; background: #6b7cb8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E") center/14px no-repeat; border-radius: 50%; opacity: 0; transform: scale(0.7); transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 10; }
.psych-selection-card--clickable:hover::after { opacity: 1; transform: scale(1); }

/* Responsive */
@media (max-width: 900px) {
    .psych-nav__menu { display: none; }
    .psych-nav__cta { margin-left: auto; }
    .psych-nav__cta .psych-nav__btn-outline { display: none; }
    .psych-nav__burger { display: flex; margin-left: 0; }
}
@media (max-width: 640px) {
    .psych-topbar__inner { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 16px; }
    .psych-topbar__btn { align-self: stretch; text-align: center; }
    .psych-nav__inner { padding: 0 16px; }
    .psych-nav__mobile { padding: 12px 16px 20px; }
}
@media (max-width: 480px) {
    .psych-topbar__left { flex-direction: column; align-items: flex-start; gap: 6px; }
    .psych-topbar__social { border-left: none; padding-left: 0; margin-left: 0; }
    .psych-modal__row { grid-template-columns: 1fr; }
    .psych-modal { padding: 28px 20px; border-radius: 14px; }
}
