/* =========================
   SIDEBAR DESKTOP
========================= */

.site-sidebar {
    position: fixed;
    top: 0;
    right: -400px;

    width: 360px;
    max-width: 90%;
    height: 100vh;

    background: linear-gradient(180deg, #0e0e11 0%, #0d0d10 100%);

    box-shadow: -20px 0 40px rgba(0,0,0,0.50);

    border-left: 1px solid rgba(255,255,255,0.07);

    padding-top: 5px;
    transition: right .35s cubic-bezier(.25,.8,.25,1);

    z-index: 9999;
}

.site-sidebar.open {
    right: 0;
}

.sidebar-overlay.active {
    display: block;
}

/* header */
.sidebar-header {
    padding: 22px 20px;
    margin-bottom: 8px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
}

/* Links */
.sidebar-links {
    padding: 10px 18px 40px 18px;
    overflow-y: auto;
}

.sidebar-links a {
    display: block;
    background: rgba(255,255,255,0.04);
    color: #dcdcdc;

    padding: 12px 14px;
    margin: 8px 0;

    border-radius: 8px;
    transition: .25s ease;
}

.sidebar-links a:hover {
    background: rgba(255,255,255,0.11);
    transform: translateX(-4px);
}

.sidebar-links {
    list-style: none;
    margin: 0;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-link {
    display: block;
    padding: 14px 16px;
    border-radius: 10px;
    background: #14161c;
    border: 1px solid #222;
    color: #eee;
    text-decoration: none;
    font-size: 16px;
    transition: 0.2s;
}

.sidebar-link:hover {
    background: #1c1f27;
}


/* =======================================================
استایل‌های نوار کشویی اختصاصی (طرح فرمول یک)
======================================================= */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    backdrop-filter: blur(5px);
}

.site-sidebar {
    position: fixed;
    top: 0;
    right: -450px; /* شروع از بیرون صفحه */
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: #0f1015; /* رنگ تیره و اسپرت */
    border-left: 4px solid #ff0040; /* نوار قرمز فرمول یک */
    z-index: 10001;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.9);
    padding: 30px;
    display: flex;
    flex-direction: column;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 8px);
}

.site-sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebarTitle {
    color: #fff;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.close-sidebar {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: 0.3s;
}

.close-sidebar:hover {
    color: #ff0040;
    transform: scale(1.1) rotate(90deg);
}

.f1-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.f1-checklist li {
    background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent);
    border-right: 5px solid #444;
    padding: 15px 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.f1-checklist li::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0%; height: 100%;
    background: rgba(255, 0, 64, 0.1);
    transition: 0.4s ease;
    z-index: 0;
}

.f1-checklist li:hover {
    border-right-color: var(--primary-color);
    transform: translateX(-10px);
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
}

.f1-checklist li:hover::before {
    width: 100%;
}

.f1-checklist li a {
    color: #ddd;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    display: block;
    position: relative;
    z-index: 1;
}

.f1-checklist li:hover a {
    color: #fff;
}

.f1-main-link {
    margin-top: 30px;
    border-right-color: var(--primary-color) !important;
    background: rgba(0, 255, 204, 0.05) !important;
}


@media (max-width: 768px) {

    .site-sidebar {
        width: 100%;
        right: -100%;
        border-left: none;
        backdrop-filter: blur(14px);
        box-shadow: none;
    }

    .site-sidebar.open {
        right: 0;
    }

    .sidebar-header h2 {
        font-size: 17px;
    }

    .sidebar-links {
        padding: 20px;
    }
}

.site-sidebar,
.sidebar-links a,
.close-sidebar,
.site-more-btn {
    will-change: transform, opacity;
}