/*
|--------------------------------------------------------------------------
| Femida Justice - Custom styles
|--------------------------------------------------------------------------
| Все доработки проекта.
| Автор: Михаил (https://codercraft.ru/)
| Не изменять существующие файлы стилей.
| Все новые стили добавлять только в custom.css.
|--------------------------------------------------------------------------
*/

/* ==========================================================================
   Header — NEW CONCEPT
   ========================================================================== */

/* ─── Top Bar ─── */
.fj-topbar {
    background: #0f0f16;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0;
    font-size: 13px;
    transition: all 0.3s ease;
}

.fj-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 230px;
    min-height: 34px;
}

.fj-topbar__info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.fj-topbar__link {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.fj-topbar__link i {
    font-size: 12px;
    color: #2c5096;
}

.fj-topbar__link:hover {
    color: #fff;
    text-decoration: none;
}

.fj-topbar__social {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fj-topbar__social-link {
    color: rgba(255,255,255,0.5);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
}

.fj-topbar__social-link:hover {
    color: #fff;
    background: #2c5096;
    text-decoration: none;
}

/* ─── Main Header ─── */
.fj-header__main {
    background: #1c1b23;
    padding: 0 230px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s ease;
}

.fj-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

.fj-header__logo {
    flex-shrink: 0;
}

.fj-header__logo img {
    max-height: 42px;
    width: auto;
    display: block;
}

/* ─── Desktop Navigation ─── */
.fj-nav__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.fj-nav__item {
    position: relative;
    margin: 0;
}

.fj-nav__link {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    font-size: 13px;
    padding: 24px 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: color 0.3s ease, background 0.3s ease;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.fj-nav__link:hover,
.fj-nav__item:hover > .fj-nav__link {
    color: #fff;
    background: rgba(255,255,255,0.04);
    text-decoration: none;
    border-bottom-color: #2c5096;
}

.fj-nav__arrow {
    font-size: 9px;
    transition: transform 0.3s ease;
}

.fj-nav__item:hover .fj-nav__arrow {
    transform: rotate(180deg);
}

/* Arrow via CSS for items with dropdowns (fallback when haschildren template fails) */
.fj-nav__item:has(> .fj-nav__dropdown--simple) > .fj-nav__link::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 9px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.fj-nav__item:has(> .fj-nav__dropdown--simple):hover > .fj-nav__link::after {
    transform: rotate(180deg);
}

/* ─── Dropdown Simple ─── */
.fj-nav__dropdown--simple {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    max-width: 420px;
    background: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    padding: 0;
    margin: 0;
    list-style: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.25s ease;
    z-index: 1000;
    border-top: 3px solid #2c5096;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
}

.fj-nav__item:hover > .fj-nav__dropdown--simple {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.fj-nav__dropdown--simple li {
    display: block;
    margin: 0;
}

.fj-nav__dropdown--simple .fj-nav__dropdown-link {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    line-height: 1.4;
}

.fj-nav__dropdown--simple .fj-nav__dropdown-link:hover {
    background: #f5f5f8;
    color: #1c1b23;
    border-left-color: #2c5096;
}


/* Remove bottom border from last item */
.fj-nav__dropdown--simple li:last-child .fj-nav__dropdown-link {
    border-bottom: none;
}

/* Fallback: fix any fj-nav__link that ends up inside a dropdown */
.fj-nav__dropdown--simple .fj-nav__link {
    padding: 10px 20px;
    color: #333;
    font-size: 13px;
    font-weight: 400;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    line-height: 1.4;
}
.fj-nav__dropdown--simple .fj-nav__link:hover {
    background: #f5f5f8;
    color: #1c1b23;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}


/* ─── Mobile Responsive: dropdowns stack naturally ─── */

/* ─── Header Actions ─── */
.fj-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.fj-header__cta {
    background: #2c5096;
    color: #fff;
    padding: 15px 25px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    border: none;
    cursor: pointer;
}

.fj-header__cta:hover {
    background: #3a66b8;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ─── Hamburger ─── */
.fj-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.fj-hamburger:hover {
    background: rgba(255,255,255,0.08);
}

.fj-hamburger__line {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.fj-hamburger.active .fj-hamburger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.fj-hamburger.active .fj-hamburger__line:nth-child(2) {
    opacity: 0;
}

.fj-hamburger.active .fj-hamburger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile Menu Overlay ─── */
.fj-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    visibility: hidden;
    opacity: 0;
    transition: all 0.35s ease;
}

.fj-mobile-overlay.active {
    visibility: visible;
    opacity: 1;
}

.fj-mobile {
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    max-width: 85vw;
    height: 100vh;
    background: #1c1b23;
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0,0,0,0.3);
}

.fj-mobile.active {
    right: 0;
}

.fj-mobile__header {
    display: flex;
    justify-content: flex-end;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.fj-mobile__close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.3s;
}

.fj-mobile__close:hover {
    color: #fff;
}

.fj-mobile__nav {
    flex: 1;
    padding: 8px 0;
}

.fj-mobile__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fj-mobile__item {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.fj-mobile__link {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.fj-mobile__link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    text-decoration: none;
}

/* ─── Mobile toggle button ─── */
.fj-mobile__item:has(> .fj-mobile__submenu) {
    display: flex;
    flex-wrap: wrap;
    position: relative;
}

.fj-mobile__item:has(> .fj-mobile__submenu) > .fj-mobile__link,
.fj-mobile__item:has(> .fj-mobile__submenu) > .fj-mobile__sublink {
    flex: 1;
}

.fj-mobile__item:not(:has(> .fj-mobile__submenu)) > .fj-mobile__toggle {
    display: none;
}

.fj-mobile__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    flex-shrink: 0;
    background: none;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fj-mobile__toggle:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.fj-mobile__toggle i {
    transition: transform 0.3s ease;
}

.fj-mobile__item.open > .fj-mobile__toggle i {
    transform: rotate(180deg);
}

.fj-mobile__item:has(> .fj-mobile__submenu) > .fj-mobile__submenu {
    width: 100%;
}

.fj-mobile__submenu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0 0 8px 0;
    background: rgba(0,0,0,0.15);
}

.fj-mobile__item.open > .fj-mobile__submenu {
    display: block;
}

.fj-mobile__sublink {
    display: block;
    padding: 10px 34px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.fj-mobile__sublink:hover {
    color: #fff;
    background: rgba(255,255,255,0.04);
    border-left-color: #2c5096;
    text-decoration: none;
}

.fj-mobile__contacts {
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fj-mobile__phone,
.fj-mobile__email {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.fj-mobile__phone:hover,
.fj-mobile__email:hover {
    color: #fff;
    text-decoration: none;
}

.fj-mobile__phone i,
.fj-mobile__email i {
    color: #2c5096;
    width: 16px;
}

.fj-mobile__social {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.fj-mobile__social-link {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 15px;
}

.fj-mobile__social-link:hover {
    background: #2c5096;
    color: #fff;
    text-decoration: none;
}

/* ─── Sticky ─── */
.fj-header.sticky .fj-topbar {
    display: none;
}

.fj-header.sticky .fj-header__main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9997;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: fjSlideDown 0.3s ease-out;
}

@keyframes fjSlideDown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

/* ─── Responsive ─── */

/* Large screens */
@media only screen and (max-width: 1600px) {
    .fj-topbar__inner {
        padding: 6px 75px;
    }
    .fj-header__main {
        padding: 0 75px;
    }
}

/* Tablet */
@media only screen and (max-width: 1200px) {
    .fj-topbar__inner {
        padding: 6px 30px;
    }
    .fj-header__main {
        padding: 0 30px;
    }
    .fj-nav__link {
        padding: 24px 10px;
        font-size: 12px;
    }
}

/* Mobile */
@media only screen and (max-width: 991px) {
    .fj-topbar__inner {
        padding: 6px 20px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }
    .fj-topbar__address {
        display: none;
    }
    .fj-header__main {
        padding: 0 20px;
    }
    .fj-nav {
        display: none;
    }
    .fj-header__cta {
        padding: 8px 14px;
        font-size: 12px;
    }
    .fj-hamburger {
        display: flex;
    }
}

@media (max-width: 480px) {
    .fj-topbar__link {
        font-size: 11px;
    }
    .fj-topbar__social-link {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    .fj-header__logo img {
        max-height: 34px;
    }
}


/*
 * ==========================================================================
 * MODAL STYLES — Femida Justice Design
 * ==========================================================================
 */

/* ─── Backdrop ─── */
.modal-backdrop {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

/* ─── Modal Card ─── */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
    background: #fff;
    overflow: hidden;
}

.modal.show .modal-content {
    animation: fjModalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ─── Header ─── */
.modal-header {
    border: none;
    padding: 32px 32px 0;
    position: relative;
}

.modal-header .modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1c1b23;
    line-height: 1.3;
    padding-bottom: 20px;
    position: relative;
}

.modal-header .modal-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #2c5096, #4a7ad4);
    border-radius: 2px;
}

/* ─── Close Button ─── */
.modal-header .close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f2f5;
    color: #888;
    font-size: 22px;
    font-weight: 400;
    opacity: 1;
    text-shadow: none;
    transition: all 0.25s ease;
    z-index: 2;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1;
    border: none;
    float: none;
    box-sizing: content-box;
}

.modal-header .close span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.modal-header .close:hover {
    background: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

/* ─── Body ─── */
.modal-body {
    padding: 28px 32px 32px;
}

/* ─── Form Fields ─── */
.modal-body .form-input-group {
    margin-bottom: 20px;
}

.modal-body .form-label-small {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.modal-body .modern-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e2e6ed;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #f8f9fc;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.modal-body .modern-input:focus {
    border-color: #4a7ad4;
    box-shadow: 0 0 0 4px rgba(74,122,212,0.12);
    background: #fff;
}

.modal-body .modern-input::placeholder {
    color: #b0b8c4;
}

.modal-body .modern-input:hover {
    border-color: #c8ced8;
    background: #fcfcfd;
}

.modal-body .error {
    display: block;
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    font-weight: 500;
}

/* ─── Submit Button ─── */
.modal-body .submit-container {
    margin-top: 8px;
}

.modal-body .modern-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: linear-gradient(135deg, #2c5096, #4a7ad4);
    color: #fff;
    box-shadow: 0 8px 24px rgba(44,80,150,0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-body .modern-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #4a7ad4, #6d9aeb);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-body .modern-submit-btn span,
.modal-body .modern-submit-btn i {
    position: relative;
    z-index: 1;
}

.modal-body .modern-submit-btn:hover {
    box-shadow: 0 12px 36px rgba(44,80,150,0.4);
    transform: translateY(-2px);
}

.modal-body .modern-submit-btn:hover::before {
    opacity: 1;
}

.modal-body .modern-submit-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.modal-body .modern-submit-btn:hover i {
    transform: translateX(4px);
}

.modal-body .modern-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(44,80,150,0.3);
}

/* ─── Policy ─── */
.modal-body .form-policy {
    margin-top: 16px;
    font-size: 12px;
    color: #aab0bc;
    text-align: center;
    line-height: 1.5;
}

.modal-body .form-policy a {
    color: #4a7ad4;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.modal-body .form-policy a:hover {
    color: #2c5096;
}

/* ─── Dialog Sizing ─── */
.modal-dialog {
    max-width: 440px;
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 16px;
    }
    .modal-header {
        padding: 24px 20px 0;
    }
    .modal-body {
        padding: 24px 20px 28px;
    }
    .modal-header .modal-title {
        font-size: 20px;
    }
}

/* ─── Honeypot ─── */
.hidden-field {
    display: none !important;
}

/* ─── Modal Slide Animation ─── */
.modal.fade .modal-dialog {
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal.fade.show .modal-dialog {
    transform: translateY(0) scale(1);
}
