﻿/* =========================
   Tokens & Globals
========================== */
:root {
    --gold: #d4a574;
    --teal: #4a9c8f;
    --gray: #495057;
    --light: #f9fafb;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--light);
    color: var(--gray);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
}

a {
    text-decoration: none;
}

ul {
    padding-right: 0;
    margin-bottom: 0;
    list-style: none;
}

/* =========================
   Header & Nav Base
========================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--teal);
    display: flex;
    align-items: center;
}

/* =========================
   Responsive Display Controls (Max 600px)
========================== */
.mobile-only-btn {
    display: none; /* پنهان در دسکتاپ */
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
}

.desktop-only-element {
    display: flex; /* نمایش در دسکتاپ */
    align-items: center;
}

/* وقتی صفحه 600 پیکسل یا کمتر شد */
/* وقتی صفحه 600 پیکسل یا کمتر شد */
/* وقتی صفحه 600 پیکسل یا کمتر شد */
@media (max-width: 600px) {
    .desktop-only-element {
        display: none !important; /* مخفی کردن سرچ و منوی کاربری */
    }

    .mobile-only-btn {
        display: block !important; /* نمایش دکمه همبرگری */
        order: 1; /* تعیین ترتیب چیدمان */
    }

    .header .container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important; /* جلوگیری از رفتن المان‌ها به خط بعدی */
        width: 100%;
        padding: 10px 15px !important;
    }

    .logo {
        display: flex !important;
        align-items: center !important;
        font-size: 0.95rem !important; /* کمی کوچکتر برای جا شدن در موبایل */
        white-space: nowrap !important; /* جلوگیری از شکستن و چند خطی شدن متن */
        order: 2; /* تعیین ترتیب چیدمان */
    }

        .logo img {
            width: 25px !important; /* اندازه مناسب‌تر عکس در موبایل */
            height: 25px !important;
            margin-left: 5px !important;
        }
}



/* =========================
   Desktop Nav Details
========================== */
.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

    .nav-links a {
        color: var(--gray);
        font-weight: 500;
        transition: color 0.3s;
    }

        .nav-links a:hover {
            color: var(--teal);
        }

/* =========================
   Search Box
========================== */
.search-container {
    width: 300px;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    transition: var(--transition);
}

    .search-container:focus-within {
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border-color: #ff6600;
    }

    .search-container input {
        flex: 1;
        border: none;
        font-size: 0.9rem;
        padding: 6px;
        outline: none;
        background: transparent;
    }

    .search-container button {
        width: 32px;
        height: 32px;
        border: none;
        background: #f0cab4;
        border-radius: 8px;
        cursor: pointer;
        transition: 0.2s;
        display: flex;
        justify-content: center;
        align-items: center;
    }

        .search-container button:hover {
            background: #e75400;
        }

/* =========================
   Page Indicator
========================== */
.page-indicator {
    background: linear-gradient(90deg, #2563eb, #1e40af);
    padding: 10px 0;
    color: white;
    font-size: 0.85rem;
}

.breadcrumb-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .breadcrumb-wrapper a {
        color: #e0f2fe;
    }

        .breadcrumb-wrapper a:hover {
            color: white;
            text-decoration: underline;
        }

.current-page {
    font-weight: 600;
}

/* =========================
   User Dropdown
========================== */
.user-menu-container {
    position: relative;
    direction: rtl;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #fff;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid #eee;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.user-menu-container:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

    .dropdown-header span {
        color: #6b7280;
        display: block;
        font-size: 11px;
    }

.dropdown-item {
    display: block;
    padding: 10px;
    color: #4b5563;
    font-size: 13.5px;
    border-radius: 6px;
    margin: 4px;
    transition: 0.2s;
}

    .dropdown-item:hover {
        background: #f3f4f6;
    }

    .dropdown-item.logout {
        color: #ef4444;
    }

/* =========================
   Sidebar / Off-Canvas (Mobile)
========================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    z-index: 1050;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

    .mobile-sidebar.active {
        right: 0;
    }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: var(--light);
}

.sidebar-title {
    font-weight: 700;
    color: var(--teal);
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #ef4444;
}

.sidebar-content {
    padding: 20px;
}

.sidebar-menu-list li {
    margin-bottom: 8px;
}

.sidebar-link {
    display: block;
    padding: 10px 15px;
    color: var(--gray);
    background: var(--light);
    border-radius: 8px;
    font-weight: 500;
    transition: 0.2s;
}

    .sidebar-link:hover {
        background: #e2e8f0;
        color: var(--teal);
    }

.sidebar-user-info {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 15px;
}

.sidebar-section-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: #9ca3af;
    margin: 20px 0 10px 0;
}

.mobile-search {
    width: 100%;
    border: 1px solid #ccc;
    box-shadow: none;
}

/* =========================
   Footer
========================== */
.footer {
    background: var(--gray);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}
