/* ============================================================
   menu.css - استایل منوی شیشه‌ای مشترک همه صفحات
   خیریه محبان ثارالله
   ============================================================ */

/* ============================================
   منوی شیشه‌ای حرفه‌ای
   ============================================ */
.navbar {
    position: fixed;
    top: 15px;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 15px;
    direction: rtl;
    transition: top 0.4s ease, padding 0.4s ease;
}

.nav-container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    min-height: 72px;
    margin: 0 auto;
    padding: 6px 18px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.68), rgba(255,255,255,0.32));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 50px;
    box-shadow: 
        0 8px 30px rgba(26, 42, 79, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: background 0.4s ease, box-shadow 0.4s ease, min-height 0.4s ease, border-color 0.4s ease;
}

.nav-container::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255,255,255,0.18), transparent 45%, rgba(255,255,255,0.15));
    pointer-events: none;
}

.navbar.scrolled .nav-container {
    min-height: 66px;
    background: rgba(26, 42, 79, 0.94);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-color: rgba(194, 122, 14, 0.32);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
}

.nav-flex {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    direction: rtl;
    gap: 16px;
}

/* ========== لوگو ========== */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: rtl;
    text-decoration: none;
    flex-shrink: 0;
    margin: 0;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-1px);
    opacity: 1;
}

.logo-img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(255,255,255,0.55));
    border: 1px solid rgba(194, 122, 14, 0.55);
    box-shadow: 
        0 4px 14px rgba(26, 42, 79, 0.15),
        inset 0 1px 3px rgba(255, 255, 255, 0.95);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: 0 6px 20px rgba(194, 122, 14, 0.3);
}

.logo-text {
    display: block;
    max-width: 350px;
    color: #1a2a4f;
    font-family: 'Vazir', 'IRANYekan', 'Yekan', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.65);
    transition: color 0.3s ease;
}

.navbar.scrolled .logo-text {
    color: #ffffff;
}

/* ========== دکمه همبرگری ========== */
.menu-toggle {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,255,255,0.50));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 
        0 5px 15px rgba(26, 42, 79, 0.12),
        inset 0 1px 3px rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
    color: #1a2a4f;
    font-size: 22px;
}

.menu-toggle:hover {
    transform: scale(1.05);
    background: #c27a0e;
    color: #ffffff;
    box-shadow: 0 7px 20px rgba(26, 42, 79, 0.18);
}

/* ========== منوی ناوبری - دسکتاپ ========== */
.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    direction: rtl;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 30px;
    color: #1a2a4f;
    font-family: 'Vazir', 'IRANYekan', 'Yekan', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.8;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-menu li a:hover {
    color: #b8790e;
    background: rgba(194, 122, 14, 0.10);
    transform: translateY(-1px);
}

.nav-menu li a.active {
    color: #ffffff;
    background: linear-gradient(135deg, #c27a0e, #b86b0a);
    box-shadow: 0 4px 15px rgba(194, 122, 14, 0.30);
}

.navbar.scrolled .nav-menu li a {
    color: #ffffff;
}

.navbar.scrolled .nav-menu li a:hover {
    color: #ffffff;
    background: rgba(194, 122, 14, 0.25);
}

.navbar.scrolled .nav-menu li a.active {
    background: linear-gradient(135deg, #c27a0e, #b86b0a);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(194, 122, 14, 0.45);
}

/* ========== ریسپانسیو موبایل ========== */
@media (max-width: 768px) {
    .navbar {
        top: 10px;
        width: 100%;
        padding: 0 10px;
    }

    .nav-container {
        width: 100%;
        min-height: 64px;
        padding: 5px 12px;
        border-radius: 38px;
    }

    .nav-flex {
        min-height: 54px;
        gap: 8px;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .logo {
        min-width: 0;
        flex: 1;
        gap: 8px;
        margin: 0;
    }

    .logo-img {
        width: 44px;
        height: 44px;
    }

    .logo-text {
        min-width: 0;
        max-width: none;
        flex: 1;
        font-size: 12px;
        line-height: 1.6;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        order: 3;
        flex-shrink: 0;
        font-size: 20px;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        width: 100%;
        max-width: 320px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin: 0;
        padding: 12px;
        border-radius: 24px;
        background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,255,255,0.92));
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 15px 40px rgba(26, 42, 79, 0.2);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px) scale(0.97);
        transform-origin: top right;
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
        z-index: 1001;
        list-style: none;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        display: block;
        width: 100%;
        padding: 12px 16px;
        border-radius: 14px;
        color: #1a2a4f;
        font-size: 13px;
        font-weight: 600;
        text-align: right;
        background: rgba(26, 42, 79, 0.06);
        margin: 0;
        transform: none !important;
    }

    .nav-menu li a:hover {
        background: rgba(194, 122, 14, 0.15);
        color: #b8790e;
        transform: none !important;
    }

    .nav-menu li a.active {
        background: linear-gradient(135deg, #c27a0e, #b86b0a);
        color: #ffffff;
    }

    .navbar.scrolled .nav-menu {
        background: rgba(26, 42, 79, 0.98);
        border-color: rgba(194, 122, 14, 0.3);
    }

    .navbar.scrolled .nav-menu li a {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.06);
    }

    .navbar.scrolled .nav-menu li a:hover {
        background: rgba(194, 122, 14, 0.3);
        color: #ffffff;
    }

    .navbar.scrolled .nav-menu li a.active {
        background: linear-gradient(135deg, #c27a0e, #b86b0a);
        color: #ffffff;
    }
}

@media (max-width: 380px) {
    .nav-container {
        padding: 5px 8px;
    }
    .nav-flex {
        gap: 5px;
    }
    .logo-img {
        width: 40px;
        height: 40px;
    }
    .logo-text {
        font-size: 11px;
    }
    .menu-toggle {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .navbar,
    .nav-container,
    .logo,
    .menu-toggle,
    .nav-menu,
    .nav-menu li a {
        transition: none !important;
    }
}