﻿/* Language selector styled like the attached mockup */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 32px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 700;
    color: #1f2d3d;
    box-shadow: 0 8px 20px rgba(18,28,45,0.06);
    border: 1px solid rgba(18,28,45,0.06);
    white-space: nowrap;
}

    .language-btn img {
        width: 28px;
        height: 20px;
        border-radius: 3px;
        object-fit: cover;
    }

.language-menu {
    display: none;
    position: absolute;
    top: 52px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(18,28,45,0.08);
    min-width: 220px;
    z-index: 2000;
    padding: 8px;
}

/* RTL/LTR positioning for language menu */
[dir="rtl"] .language-menu {
    right: 0;
}

[dir="ltr"] .language-menu {
    left: 0;
}

.language-menu.active {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 800;
    color: #22303b;
    text-transform: uppercase;
    font-size: 14px;
    border-radius: 8px;
}

    .language-option img {
        width: 28px;
        height: 20px;
        border-radius: 3px;
    }

    .language-option:hover {
        background: #f6f8fb;
    }

    /* explicit check element on the right */
    .language-option .lang-check {
        display: none;
        color: #28a745;
        font-weight: 900;
        font-size: 18px;
    }

[dir="rtl"] .language-option .lang-check {
    margin-right: auto;
}

[dir="ltr"] .language-option .lang-check {
    margin-left: auto;
}

.language-option.active .lang-check {
    display: inline-block;
}

/* Header RTL/LTR Support */
.Header {
    padding-left: 156px;
    padding-right: 156px;
    position: relative;
}

/* Mobile */
@@media (max-width: 768px) {
    .Header {
        padding-left: 20px;
        padding-right: 20px;
        flex-wrap: wrap;
    }
}

/* Small Mobile */
@@media (max-width: 480px) {
    .Header {
        padding-left: 16px;
        padding-right: 16px;
    }
}

[dir="rtl"] .Header {
    direction: rtl;
}

[dir="ltr"] .Header {
    direction: ltr;
}

/* Reverse flex direction for RTL tabs */
[dir="rtl"] .Tabs {
    flex-direction: row-reverse;
}

/* For English LTR, also reverse to maintain right-to-left navigation order */
[dir="ltr"] .Tabs {
    flex-direction: row-reverse;
}

/* Reverse button order for RTL */
[dir="rtl"] .Buttons {
    flex-direction: row-reverse;
}

/* Text alignment based on direction */
[dir="rtl"] .header-text {
    text-align: right;
}

[dir="ltr"] .header-text {
    text-align: left;
}

/* Language button spacing */
.lang-arrow {
    margin-left: 5px;
    flex-shrink: 0;
}

[dir="rtl"] .lang-arrow {
    margin-left: 0;
    margin-right: 5px;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: var(--Primary-500, #6A5D8B);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
}

/* Side Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

/* Side Menu Panel */
.mobile-side-menu {
    position: fixed;
    top: 0;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: white;
    z-index: 9999;
    box-shadow: -2px 0 12px rgba(0,0,0,0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 24px;
    display: none;
    flex-direction: column;
    gap: 24px;
}

[dir="rtl"] .mobile-side-menu {
    right: 0;
    transform: translateX(100%);
    box-shadow: 2px 0 12px rgba(0,0,0,0.1);
}

[dir="ltr"] .mobile-side-menu {
    left: 0;
    transform: translateX(-100%);
}

.mobile-side-menu.active {
    display: flex;
    transform: translateX(0);
}

/* Close button in side menu */
.mobile-menu-close {
    align-self: flex-end;
    background: transparent;
    border: none;
    color: #666;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* Side menu sections */
.mobile-menu-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu-section-title {
    font-size: 12px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mobile-menu-item {
    padding: 12px 16px;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

    .mobile-menu-item:hover,
    .mobile-menu-item:active {
        background: #F3F2F6;
    }

    .mobile-menu-item.active {
        color: #111;
        font-weight: 700;
        background: #F3F2F6;
    }

.mobile-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid #E6E6E6;
}

    .mobile-menu-buttons .ContactUs {
        width: 100%;
        height: 48px;
    }

/* Language items in mobile menu */
.mobile-menu-item img {
    display: inline-block;
    vertical-align: middle;
}

[dir="ltr"] .mobile-menu-item img {
    margin-right: 12px;
}

[dir="rtl"] .mobile-menu-item img {
    margin-left: 12px;
    margin-right: 0;
}

@@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    /* Hide desktop navigation on mobile */
    .Tabs {
        display: none !important;
    }
    /* Hide buttons except Profile on mobile */
    .Buttons > .ContactUs,
    .Buttons > form {
        display: none !important;
    }
    /* Keep profile visible */
    .Buttons .Profile {
        display: flex !important;
    }
    /* Adjust header layout */
    .Header {
        justify-content: space-between;
    }

    .Buttons {
        flex: 0 0 auto;
    }

    .hero-BlueSquare {
        right: 2%;
        top: -6%;
    }
}

/* Tablet adjustments */
@@media (max-width: 1024px) {


    .Tabs {
        gap: 16px;
    }

        .Tabs > a {
            font-size: 14px;
            padding: 8px 12px;
        }

    .Buttons {
        gap: 8px;
    }

    .ContactUs {
        padding-left: 12px;
        padding-right: 12px;
        font-size: 14px;
    }

    .hero-BlueSquare {
        right: 2%;
        top: -6%;
    }

    .Licenses {
        align-self: auto !important;
    }
}

/* Logo responsive */
@@media (max-width: 768px) {
    .Image1 {
        width: 55px !important;
        height: 38px !important;
    }

    .hero-BlueSquare {
        right: 2%;
        top: -6%;
    }

    .Licenses {
        align-self: auto !important;
    }
}

@@media (max-width: 480px) {
    .Image1 {
        width: 48px !important;
        height: 33px !important;
    }

    .mobile-menu-toggle {
        width: 40px !important;
        height: 40px !important;
    }

    .Profile {
        width: 40px !important;
        height: 40px !important;
    }

    .mobile-side-menu {
        padding: 20px 16px;
    }

    .hero-BlueSquare {
        right: 2%;
        top: -6%;
    }
    /* .Licenses {
			align-self: auto !important;
		} */
}

/* Additional responsive styles for navigation links to prevent word breaking */
@@media (max-width: 1200px) {
    .Tabs > a {
        white-space: nowrap;
        font-size: 15px;
    }

    .mobile-menu-toggle {
        display: flex;
    }
    /* Adjust header layout for mobile based on language direction */
    [dir="rtl"] .Header {
        flex-direction: row-reverse;
        justify-content: space-between !important;
    }

    [dir="ltr"] .Header {
        flex-direction: row;
        justify-content: space-between !important;
    }
    /* Ensure logo and menu button are at opposite ends */
    [dir="rtl"] .Image1 {
        order: 2;
    }

    [dir="rtl"] .mobile-menu-toggle {
        order: 1;
    }

    [dir="ltr"] .Image1 {
        order: 1;
    }

    [dir="ltr"] .mobile-menu-toggle {
        order: 3;
    }
    /* Hide desktop navigation on mobile */
    .Tabs {
        display: none !important;
    }
    /* Hide all buttons including Profile and Language on mobile */
    .Buttons {
        display: none !important;
    }
    /* Hide language dropdown form on mobile */
    #langForm {
        display: none !important;
    }
}

@@media (max-width: 900px) {
    .Tabs > a {
        font-size: 13px;
        padding: 6px 8px;
    }
}

@@media (max-width: 768px) {
    .Tabs > a {
        font-size: 12px;
        padding: 4px 6px;
    }
}
