/* Header styling - isolated to prevent pollution on other pages */
.header-wrapper {
    --primary-color: #6C1D9F;
    --secondary-color: #F8F5FF;
    --text-color: #1A1A1A;
    --text-light: #666666;
    --white: #ffffff;
    --font-main: 'Almarai', sans-serif;
    
    font-family: var(--font-main);
    width: 100%;
}

.header-wrapper a {
    text-decoration: none;
    color: inherit;
}

.header-wrapper .header {
    padding: 20px 0;
    background-color: transparent;
    position: relative;
    z-index: 10;
}

.header-wrapper .header-bg-shape {
    position: absolute;
    right: -51px;
    top: -57px;
    z-index: -1;
    width: 300px;
    pointer-events: none;
    transform: rotate(15.78deg);
}

.header-wrapper .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.header-wrapper .nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-wrapper .nav-link {
    color: var(--text-color);
    font-weight: 700;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.header-wrapper .nav-link.active {
    background-color: var(--primary-color);
    color: var(--white) !important;
    border-radius: 50px;
    padding: 10px 25px;
}

.header-wrapper .header-action {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Buttons inside header wrapper */
.header-wrapper .btn-header {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: none;
}

.header-wrapper .btn-header-primary {
    background-color: var(--primary-color);
    color: var(--white) !important;
}

.header-wrapper .btn-header-primary:hover {
    background-color: #581682;
}

.header-wrapper .btn-header-text {
    background: none;
    color: var(--primary-color) !important;
    padding: 12px 20px;
}

/* Custom Language Dropdown Styles */
.header-wrapper .topbar-dropdown {
    position: relative;
    display: inline-block;
}

.header-wrapper .glass-dropdown {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(108, 29, 159, 0.05);
    color: var(--primary-color);
    border: 1px solid rgba(108, 29, 159, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.header-wrapper .glass-dropdown:hover {
    background: rgba(108, 29, 159, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(108, 29, 159, 0.15);
}

.header-wrapper .glass-dropdown i {
    font-size: 1.25rem;
}

.header-wrapper .glass-dropdown-menu {
    position: absolute;
    top: 100%;
    margin-top: 8px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
}

/* RTL adjustment: dropdown menu aligns to the left edge of the toggle button */
html[dir="rtl"] .header-wrapper .glass-dropdown-menu {
    left: 0;
    right: auto;
}

html[dir="ltr"] .header-wrapper .glass-dropdown-menu {
    right: 0;
    left: auto;
}

/* Show dropdown on hover or when parent has active class */
.header-wrapper .topbar-dropdown:hover .glass-dropdown-menu,
.header-wrapper .topbar-dropdown.active .glass-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-wrapper .glass-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 700;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.header-wrapper .glass-dropdown-item:hover {
    background: rgba(108, 29, 159, 0.05);
    color: var(--primary-color);
}

.header-wrapper .glass-dropdown-item img {
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
