/* =========================================
   BAVS Header Styles - FINAL FIXED SIZE VERSION
   ========================================= */

:root {
    --bavs-gold: #FFD700;       
    --bavs-dark-teal: #3D7772;  
    --bavs-nav-bg: #3D7772;     
    --bavs-white: #ffffff;
    --bavs-bg-grad: linear-gradient(180deg, #6AC9D1 0%, #46979F 100%);
}

.bavs-site-header {
    width: 100%;
    font-family: inherit;
    direction: rtl;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    z-index: 9999;
}

.bavs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =========================================
   1. MOBILE STYLES (< 992px)
   ========================================= */
@media (max-width: 992px) {
    .bavs-desktop-view { display: none !important; }
    .bavs-mobile-view { display: block; }
    
    .bavs-mobile-view {
        background: var(--bavs-bg-grad);
        height: 60px;
    }
    .bavs-mobile-view .bavs-container { height: 100%; }
    
    /* LOGO HEIGHT: 40px */
    .bavs-mob-right img { 
        height: 40px !important; /* سایز لوگو موبایل */
        width: auto !important; 
    }
    
    .bavs-mob-center {
        position: absolute; left: 50%; transform: translateX(-50%);
        width: 60%; text-align: center;
    }
    .bavs-mob-title {
        color: #fff !important; font-size: 14px; margin: 0;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    
    .bavs-mob-left { padding-left: 5px; }
    .bavs-mobile-menu-toggle { color: #fff; font-size: 24px; cursor: pointer; }
}

/* =========================================
   2. DESKTOP STYLES (> 993px)
   ========================================= */
@media (min-width: 993px) {
    .bavs-mobile-view { display: none !important; }
    .bavs-desktop-view { display: block; }

    /* Top Bar */
    .bavs-top-bar {
        background: var(--bavs-bg-grad);
        padding: 8px 0;
    }
    
    .bavs-logo-area { display: flex; align-items: center; gap: 12px; }
    
    /* LOGO HEIGHT: 50px */
    .bavs-desktop-logo-img { 
        height: 50px !important; /* سایز لوگو دسکتاپ */
        width: auto !important; 
    }

    /* Site Info */
    .bavs-site-info {
        display: flex; flex-direction: column;
        justify-content: center;
    }
    .bavs-site-info h1 {
        font-size: 20px !important; color: #fff !important;
        margin: 0 0 4px 0; font-weight: 800; line-height: 1.2;
    }

    /* Slogan Exact Width */
    .bavs-slogan-box {
        display: flex;
        justify-content: space-between;
        width: 100%;
        direction: rtl;
    }
    .bavs-slogan-box span {
        font-size: 11px; color: var(--bavs-gold);
        font-weight: 500; white-space: nowrap;
    }

    /* Actions */
    .bavs-top-actions {
        display: flex; align-items: center; gap: 8px;
    }
    .bavs-action-btn {
        padding: 0 15px; border-radius: 6px;
        text-decoration: none; font-size: 13px; font-weight: bold;
        display: flex; align-items: center; gap: 6px;
        height: 38px; transition: all 0.3s ease;
    }

    /* Buttons */
    .bavs-btn-login, .bavs-btn-account {
        background: #FFDC00; color: #333;
        box-shadow: 0 3px 0 #e6c600;
    }
    .bavs-btn-login:hover { transform: translateY(2px); box-shadow: 0 1px 0 #e6c600; }

    .bavs-btn-logout {
        background: #fff; color: #d63031 !important;
        border: 1px solid #fff;
    }
    .bavs-btn-logout:hover { background: #ffebeb; }

    /* Home Icon */
    .bavs-home-icon {
        display: flex; align-items: center; justify-content: center;
        height: 38px; width: 38px;
        font-size: 24px; color: #fff !important;
        background: rgba(255,255,255,0.2);
        border-radius: 6px; margin-right: 5px; transition: 0.3s;
    }
    .bavs-home-icon:hover { background: rgba(255,255,255,0.4); }

    /* Nav Bar */
    .bavs-nav-bar {
        background: linear-gradient(180deg, #3D7772 0%, #2f615d 100%);
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .bavs-main-menu ul {
        list-style: none; margin: 0; padding: 0;
        display: flex; align-items: center;
    }
    .bavs-main-menu > ul > li > a {
        color: #fff; text-decoration: none;
        padding: 12px 20px; font-size: 14px; font-weight: 500; display: block;
        transition: 0.3s;
    }
    .bavs-main-menu > ul > li > a:hover {
        background: rgba(0,0,0,0.1);
    }
    
    /* Dropdown */
    .bavs-main-menu li { position: relative; }
    .bavs-main-menu li ul.sub-menu {
        display: none; position: absolute; top: 100%; right: 0;
        background: #fff; min-width: 220px;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        z-index: 1000; flex-direction: column;
        border-top: 3px solid #FFDC00; padding: 5px 0;
        animation: bavsFadeUp 0.3s ease forwards;
    }
    @keyframes bavsFadeUp {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .bavs-main-menu li:hover ul.sub-menu { display: flex; }
    .bavs-main-menu li ul.sub-menu a {
        color: #444 !important; padding: 10px 20px;
        border-bottom: 1px solid #f0f0f0; font-size: 13px;
        transition: all 0.2s ease-in-out; display: block;
    }
    .bavs-main-menu li ul.sub-menu li:last-child a { border-bottom: none; }
    .bavs-main-menu li ul.sub-menu a:hover {
        background: #fcfcfc; color: var(--bavs-dark-teal) !important;
        padding-right: 25px; font-weight: bold;
    }
}

/* =========================================
   3. DRAWER MENU (Right to Left)
   ========================================= */
.bavs-mobile-drawer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 10000;
    display: none;
}
.bavs-mobile-drawer.active { display: block; }

.bavs-drawer-content {
    width: 280px; height: 100%; background: #fff;
    position: absolute; top: 0; right: 0;
    transform: translateX(100%); transition: transform 0.3s ease;
    display: flex; flex-direction: column;
}
.bavs-mobile-drawer.active .bavs-drawer-content { transform: translateX(0); }

.bavs-drawer-header {
    background: var(--bavs-bg-grad); padding: 20px; text-align: center;
}
.bavs-drawer-close {
    position: absolute; top: 15px; left: 15px;
    color: #fff; font-size: 20px; cursor: pointer;
}
.bavs-auth-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px;
}
.bavs-drawer-btn {
    text-align: center; padding: 8px 0; border-radius: 4px;
    font-size: 12px; font-weight: bold; text-decoration: none;
}
.bavs-btn-login { background: #fff; color: var(--bavs-dark-teal); }
.bavs-btn-register { border: 1px solid #fff; color: #fff; }

.bavs-drawer-body { flex: 1; overflow-y: auto; padding: 0; }
.bavs-drawer-list { list-style: none; padding: 0; margin: 0; }
.bavs-drawer-list li a {
    display: block; padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5; color: #444; font-size: 13px; text-decoration: none;
    transition: 0.2s;
}
.bavs-drawer-list li a:hover { background: #f9f9f9; padding-right: 25px; color: var(--bavs-dark-teal); }
.bavs-drawer-list li a i { width: 25px; text-align: center; margin-left: 5px; color: #888; }

.bavs-drawer-footer {
    padding: 15px; background: #f8f9fa; border-top: 1px solid #eee;
}
.bavs-social-grid {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 15px;
}
.bavs-social-item {
    color: #555; font-size: 20px; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; background: #fff; border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: 0.2s;
}
.bavs-social-item:hover { color: var(--bavs-dark-teal); transform: translateY(-3px); }
