/* New Header Styles */
:root {
    --bs-primary: #103a67;
    --bs-primary-rgb: 16, 58, 103;
    --bs-primary-light: #0092bd;
    --bs-accent: #f1bf1a;
    --bs-logo-bg: #8b5520;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
}

body {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    line-height: 1.6;
    color: #333;
}

body[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

body[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* Top Banner */
.top-banner {
    background-color: #fff;
    padding: 1.25rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.company-slogan {
    font-size: 1.125rem;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    color: #103a67;
    padding: 0.25rem 0;
    position: relative;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.company-slogan--right {
    border-right: 3px solid var(--bs-accent);
    padding-right: 10px;
}

.company-slogan--left {
    border-left: 3px solid var(--bs-accent);
    padding-left: 10px;
}

.company-slogan:hover {
    transform: translateY(-2px);
}

.company-logo img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.company-logo img:hover {
    transform: scale(1.02);
}

/* Navbar */
.navbar-custom {
    background-color: var(--bs-primary);
    padding: 0;
    min-height: 60px;
}

.navbar-toggler {
    border: none;
    color: #fff;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Main Menu */
.navbar-nav .nav-link {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.5;
    padding: 1.2rem 1rem;
    transition: all 0.3s ease;
    border-radius: 0;
    margin: 0;
    min-height: 56px;
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-nav .nav-link:hover {
    color: #fff; /* نص أبيض عند الهوفر */
    background-color: var(--bs-primary-light); /* خلفية زرقاء فاتحة */
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
    height: 3px;
    background-color: var(--bs-accent);
    border-radius: 2px;
    animation: fadeIn 0.3s ease-in-out;
}

.navbar-nav .nav-link.active {
    color: #fff;
    background-color: var(--bs-primary-light); /* نفس تأثير الهوفر للعنصر النشط */
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
    height: 3px;
    background-color: var(--bs-accent);
    border-radius: 2px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Language Switcher - Enhanced & Beautiful */
.language-switcher {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0.25rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), inset 0 1px rgba(255, 255, 255, 0.1);
    height: 38px;
    margin: auto 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.language-switcher:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.language-switcher__btn {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    margin: 0 0.1rem;
    text-decoration: none;
    display: inline-block;
}

.language-switcher__btn--active {
    font-weight: 700;
    color: var(--bs-primary);
    background: linear-gradient(145deg, var(--bs-accent), #e0b218);
    box-shadow: 0 2px 8px rgba(241, 191, 26, 0.4);
}

.language-switcher__btn:hover:not(.language-switcher__btn--active) {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

.language-switcher__icon {
    margin-inline-start: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    padding: 0;
}

.language-switcher__icon:hover {
    background: linear-gradient(145deg, var(--bs-accent), #e0b218);
    color: var(--bs-primary);
    transform: rotate(15deg);
    box-shadow: 0 4px 10px rgba(241, 191, 26, 0.3);
}

/* Animation for language switcher */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.language-switcher__btn--active {
    animation: pulse 2s infinite ease-in-out;
}

@keyframes fadeSlideIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.language-switcher {
    animation: fadeSlideIn 0.5s ease-out forwards;
}

/* Products Button */
.products-btn {
    background-color: var(--bs-accent);
    color: #333;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.products-btn:hover {
    background-color: #d7ab17;
    color: #333;
    text-decoration: none;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.search-box:focus-within {
    background-color: rgba(255, 255, 255, 0.2);
}

.search-input {
    background-color: transparent;
    border: none;
    color: #fff;
    padding: 0.5rem;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.5rem;
}

/* User Icons */
.user-icon {
    color: #fff;
    position: relative;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.user-icon:hover {
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--bs-accent);
    color: var(--bs-primary);
    font-size: 0.7rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

/* Media queries */
@media (max-width: 992px) {
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .products-search-container {
        margin-top: 1rem;
    }
}

/* Responsive adjustments for slogans */
@media (max-width: 768px) {
    .company-slogan {
        text-align: center;
        margin: 0.5rem 0;
    }
    
    .col-md-4.text-end,
    .col-md-4.text-start {
        text-align: center !important;
    }
}
