﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'YekanBakh-SemiBold';
    src: url('../../uploads/fonts/YekanBakh-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

body {
    font-family: 'YekanBakh-SemiBold', Tahoma, sans-serif !important;
    background-color: #040C24;
    color: #FFFFFF;
    direction: rtl;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
    touch-action: none;
}

/* ─── هدر ─── */
.arsam-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #040C24;
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.arsam-header.is-overlay {
    background: transparent;
    box-shadow: none;
}

@media (min-width: 1101px) {
    .arsam-header.is-overlay {
        position: absolute;
        background: transparent;
        box-shadow: none;
    }

    .arsam-header:not(.is-overlay) {
        position: fixed;
        background: rgba(4, 12, 36, 0.98);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    }
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    gap: 16px;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 1003;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.logo-icon {
    height: 35px;
    width: auto;
}

.logo-text {
    color: #FFFFFF !important;
    font-size: 24px;
    font-weight: 600;
    font-family: 'YekanBakh-SemiBold', sans-serif !important;
    text-decoration: none !important;
}

/* ─── ناوبری دسکتاپ ─── */
.navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.navigation ul {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

.navigation ul li a {
    text-decoration: none;
    color: #B2D0E6;
    font-size: 16px;
    font-family: 'YekanBakh-SemiBold', sans-serif !important;
    transition: color 0.3s;
    white-space: nowrap;
}

.navigation ul li a:hover,
.navigation ul li a.active {
    color: #FFFFFF;
}

.login-btn-container {
    flex-shrink: 0;
    z-index: 1003;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background-color: #0066FF;
    color: #FFFFFF !important;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none !important;
    min-width: 115px;
    transition: background 0.3s;
}

.login-text-inside {
    font-size: 16px;
    font-family: 'YekanBakh-SemiBold', sans-serif !important;
    font-weight: 600;
}

.login-btn .user-icon {
    display: flex;
    align-items: center;
}

.login-btn:hover {
    background-color: #0052CC;
}

.nav-mobile-login {
    display: none;
}

/* ─── دکمه همبرگری ─── */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 10px;
    background: rgba(0, 102, 255, 0.18);
    border: 1px solid rgba(0, 102, 255, 0.4);
    border-radius: 12px;
    cursor: pointer;
    z-index: 1003;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.3s, border-color 0.3s;
}

.mobile-menu-toggle:hover {
    background: rgba(0, 102, 255, 0.3);
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #FFFFFF;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    pointer-events: none;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── لایه تار ─── */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 12, 36, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    pointer-events: none;
}

.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.background-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.07) 0%, rgba(4, 12, 36, 0) 70%);
    animation: move 30s linear infinite;
}

.p1 { width: 400px; height: 400px; top: -10%; right: -5%; }
.p2 { width: 300px; height: 300px; top: 40%; left: -5%; }
.p3 { width: 500px; height: 500px; bottom: -10%; right: 20%; }

@keyframes move {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

/* ─── تبلت ─── */
@media (max-width: 1200px) {
    .navigation ul {
        gap: 18px;
    }

    .navigation ul li a {
        font-size: 15px;
    }
}

/* ─── موبایل و تبلت: منوی کشویی ─── */
@media (max-width: 1100px) {
    .header-container {
        padding: 14px 20px;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo-icon {
        height: 30px;
    }

    .login-btn-container {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .arsam-header,
    .arsam-header.is-overlay {
        position: fixed !important;
        background: rgba(4, 12, 36, 0.96) !important;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
    }

    .arsam-header.is-scrolled {
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
    }

    /* کشو از سمت راست — سازگار با RTL */
    .navigation {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        bottom: 0;
        width: min(340px, 88vw);
        height: 100vh;
        height: 100dvh;
        flex: unset;
        flex-direction: column;
        justify-content: flex-start;
        background: linear-gradient(165deg, #0c1a42 0%, #040C24 55%, #030a1e 100%);
        border-left: 1px solid rgba(0, 102, 255, 0.2);
        box-shadow: -12px 0 48px rgba(0, 0, 0, 0.55);
        padding: 88px 24px 32px;
        z-index: 1002;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        visibility: hidden;
        pointer-events: none;
        transform: translate3d(105%, 0, 0);
        transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.38s ease;
        will-change: transform;
    }

    .navigation.is-open {
        visibility: visible;
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
    }

    .navigation ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        width: 100%;
    }

    .navigation ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .navigation ul li a {
        display: block;
        padding: 17px 12px;
        font-size: 17px;
        white-space: normal;
        border-radius: 8px;
        transition: background 0.2s, color 0.2s, padding-right 0.2s;
    }

    .navigation ul li a:hover,
    .navigation ul li a.active {
        color: #4d9fff;
        background: rgba(0, 102, 255, 0.08);
        padding-right: 18px;
    }

    .nav-mobile-login {
        display: flex !important;
        margin-top: 28px;
        justify-content: center;
        width: 100%;
    }

    .nav-mobile-login .login-btn {
        width: 100%;
        justify-content: center;
        min-width: unset;
        padding: 15px 24px;
        font-size: 17px;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 12px 16px;
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-icon {
        height: 28px;
    }

    .mobile-menu-toggle {
        width: 42px;
        height: 42px;
    }

    .p1 { width: 250px; height: 250px; }
    .p2 { width: 180px; height: 180px; }
    .p3 { width: 280px; height: 280px; }
}
