/* Header-specific button size override */
.header-main .common-btn {
    padding: 0 30px;
    line-height: 38px;
}

/* Country flag / global presence strip */
.country-flag li {
    list-style: none;
    display: inline-block;
    margin-right: 20px;
}

.country-flag img {
    width: 20px;
    height: 20px;
    cursor: pointer;
    border: 1px solid transparent;
}

.country-flag.justify-end-text {
    justify-content: end;
}

.country-flag li.selected img {
    border-color: #fff;
    background-color: lightblue;
}

.country-flag ul li a {
    text-transform: uppercase !important;
}

@media (max-width: 768px) {
    .upper-strip-index ul {
        justify-content: center;
        margin-bottom: 4px;
    }

    .looking-strip-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .common-btn.btn-revers.green-btn-new {
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.20);
        background: rgba(255, 255, 255, 0.05);
        box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.25);
        line-height: 1rem !important;
    }

    .looking-strip-btn span {
        font-size: 12px;
        color: #fff;
    }
}

/* Burger icon → X animation when menu is open */
.navbar-toggler .navbar-toggler-icon {
    transition: opacity 0.2s;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-image: none !important;
    position: relative;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before,
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 2px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
}

/* Mobile nav drawer show/hide */
@media (max-width: 991px) {
    #gNavi.show {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        max-height: 80vh;
        overflow-y: auto;
        overflow-x: hidden;
        background: #fff;
        border-top: 2px solid #e8edf4;
        padding: 6px 0 12px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    }

    #gNavi .dropdown-animate {
        display: block !important;
    }

    .navbar-light .navbar-toggler-icon {
        background-size: 18px;
    }

    .navbar-light .navbar-toggler {
        color: rgba(0, 0, 0, .5);
        border-color: #1A4396;
        background-color: #1A4396 !important;
        padding: 0;
    }

    .header-main .navbar-light .navbar-nav .nav-link {
        font-size: 12px !important;
        padding: 10px 0 !important;
        width: 100%;
        justify-content: space-between;
        background-color: #fff;
    }

    #gNavi .navbar-nav {
        width: 100%;
        flex-direction: column;
        display: block;
    }

    #gNavi .navbar-nav > li {
        width: 94%;
    }

    #gNavi .spx-dropdown-item {
        width: 100%;
    }
}

/* ── Capabilities mega-menu (spx-*) ── */
.spx-dropdown-item * {
    box-sizing: border-box;
}

.spx-dropdown-item {
    position: relative;
}

.spx-dropdown-item>a.nav-link {
    display: flex !important;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    width: 100% !important;
    max-width: 100% !important;
}

.spx-chevron {
    display: inline-flex;
    align-items: center;
    transition: transform 0.25s ease;
    pointer-events: none;
    margin-left: 1px;
}

.spx-chevron svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.spx-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 248px;
    background: #fff;
    border-radius: 8px;
    border-top: 3px solid #002e5b;
    box-shadow: 0 8px 32px rgba(0, 46, 91, 0.13), 0 2px 8px rgba(0, 0, 0, 0.07);
    z-index: 9999;
    padding: 5px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.spx-cat-item+.spx-cat-item {
    border-top: 1px solid rgba(0, 46, 91, 0.06);
}

.spx-cat-item {
    position: relative;
}

.spx-cat-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 13px;
    font-size: 13.5px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    font-family: Rubik, sans-serif;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
    gap: 8px;
}

.spx-cat-label {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 0;
}

.spx-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e8f0fa;
    border-radius: 7px;
    flex-shrink: 0;
    transition: background 0.14s ease;
}

.spx-cat-icon svg {
    width: 13px;
    height: 13px;
    stroke: #002e5b;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.spx-arrow-right {
    display: inline-flex;
    align-items: center;
    color: #9ca3af;
    flex-shrink: 0;
    transition: color 0.14s ease, transform 0.14s ease;
}

.spx-arrow-right svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.spx-mobile-chevron {
    display: none;
}

.spx-mobile-chevron svg {
    width: 13px;
    height: 13px;
    stroke: #002e5b;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.spx-submenu {
    position: absolute;
    top: -6px;
    left: calc(100% + 4px);
    min-width: 255px;
    background: #fff;
    border-radius: 8px;
    border-top: 3px solid #002e5b;
    box-shadow: 0 8px 32px rgba(0, 46, 91, 0.13), 0 2px 8px rgba(0, 0, 0, 0.07);
    z-index: 10000;
    padding: 5px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.spx-submenu li+li {
    border-top: 1px solid rgba(0, 46, 91, 0.05);
}

.spx-submenu li a {
    display: block;
    padding: 8.5px 14px 8.5px 16px;
    font-size: 13px;
    font-weight: 400;
    color: #4b5563;
    text-decoration: none;
    font-family: Rubik, sans-serif;
    line-height: 1.4;
    border-left: 2px solid transparent;
    transition: color 0.14s ease, padding-left 0.16s ease, border-color 0.16s ease, background 0.14s ease;
}

.spx-submenu li a:hover {
    color: #002e5b;
    background: #edf3fb;
    padding-left: 20px;
    border-left-color: #002e5b;
}

@media (min-width: 992px) {
    .spx-dropdown-item:hover>.spx-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .spx-cat-item:hover>.spx-submenu {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .spx-cat-item:hover>.spx-cat-toggle {
        background: #edf3fb;
        color: #002e5b;
    }

    .spx-cat-item:hover>.spx-cat-toggle .spx-cat-icon {
        background: #d1e3f8;
    }

    .spx-cat-item:hover>.spx-cat-toggle .spx-arrow-right {
        color: #002e5b;
        transform: translateX(2px);
    }

    .spx-dropdown-item:hover>a.nav-link {
        color: #002e5b;
    }

    .spx-dropdown-item:hover>a .spx-chevron {
        transform: rotate(180deg);
    }

    .spx-dropdown-item::before {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        left: 0;
        bottom: 0;
        background: #002e5b;
        transition: width 0.5s;
    }

    .spx-dropdown-item:hover::before {
        width: 100%;
    }

    .spx-mobile-chevron {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .spx-dropdown-item>a.nav-link {
        padding: 10px 14px !important;
        font-size: 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .spx-dropdown-menu {
        position: static !important;
        width: 100% !important;
        min-width: unset !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        border-radius: 0;
        border-top: 2px solid rgba(0, 46, 91, 0.1);
        box-shadow: none;
        padding: 0;
        background: #f5f8fc;
        display: none !important;
        transition: none !important;
        z-index: auto !important;
    }

    .spx-dropdown-menu.spx-open {
        display: block !important;
    }

    .spx-cat-item {
        width: 100%;
    }

    .spx-cat-item+.spx-cat-item {
        border-top: 1px solid rgba(0, 46, 91, 0.07);
    }

    .spx-cat-toggle {
        width: 100%;
        padding: 12px 14px;
        font-size: 13px;
        background: #eef3fa;
        min-height: 46px;
        white-space: normal;
    }

    .spx-arrow-right {
        display: none !important;
    }

    .spx-mobile-chevron {
        display: inline-flex !important;
        align-items: center;
        flex-shrink: 0;
        transition: transform 0.22s ease;
    }

    .spx-cat-toggle.spx-cat-open .spx-mobile-chevron {
        transform: rotate(180deg);
    }

    .spx-submenu {
        position: static !important;
        width: 100% !important;
        min-width: unset !important;
        left: auto !important;
        top: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        border-radius: 0;
        border-top: 1px solid rgba(0, 46, 91, 0.06);
        box-shadow: none;
        padding: 4px 0;
        background: #fff;
        display: none !important;
        transition: none !important;
        z-index: auto !important;
    }

    .spx-submenu.spx-sub-open {
        display: block !important;
    }

    .spx-submenu li {
        width: 100%;
    }

    .spx-submenu li a {
        padding: 11px 14px 11px 52px;
        font-size: 13px;
        border-left: none !important;
        min-height: 42px;
        white-space: normal;
    }

    .spx-submenu li a:hover {
        padding-left: 58px;
        border-left: none !important;
        background: #edf3fb;
    }

    .spx-dropdown-toggle.spx-toggle-open .spx-chevron {
        transform: rotate(180deg);
    }
}
