/* 1. فونت‌ها و متغیرها */
@import url('https://sahandan.ir/assets/fonts/vazir/vazir.css');
@import url('https://sahandan.ir/assets/fonts/lalezar/lalezar.css');

:root {
    --primary: #4D96FF;
    --accent: #6C5CE7;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --glass: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow-soft: 0 10px 40px rgba(0,0,0,0.04);
}

body { font-family: 'vazir', sans-serif !important; }

/* 2. کانتینر هدر (شناور) */
.master-header {
    position: sticky;
    top: 20px;
    z-index: 999;
    width: 95%;
    max-width: 1300px;
    margin: 0 auto 40px;
}

.header-glass {
    background: var(--glass);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 3. لوگوی عکس‌دار با افکت زنده */
.brand-section {
    display: flex; align-items: center; gap: 15px; text-decoration: none;
}

.logo-frame {
    width: 50px; height: 50px; position: relative;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px; background: white; z-index: 1;
}

.logo-frame::before {
    content: ''; position: absolute; inset: -3px; border-radius: 20px;
    background: conic-gradient(transparent, transparent, var(--primary), var(--accent));
    animation: spin-glow 4s linear infinite; z-index: -1;
}

.logo-frame::after {
    content: ''; position: absolute; inset: 0; background: var(--primary);
    filter: blur(20px); opacity: 0.4; z-index: -2;
    animation: pulse-glow 3s infinite alternate;
}

.logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

.brand-text h1 {
    font-family: 'lalezar', sans-serif; font-weight: 900; font-size: 1.4rem;
    color: #0A2540; letter-spacing: -1px; margin: 0; line-height: 1;
}
.brand-text span {
    font-family: 'vazir', sans-serif; font-size: 1rem; font-weight: bold;
    color: #4D96FF; letter-spacing: 2px;
}

/* 4. منوی دسکتاپ */
.nav-desktop { display: flex; gap: 25px; }

.nav-link {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--text-light);
    font-weight: 500; font-size: 0.95rem; padding: 8px 12px;
    border-radius: 12px; transition: 0.3s; position: relative;
}

.nav-link:hover { background: rgba(77, 150, 255, 0.08); color: var(--primary); }

/* آیکون‌های سیاره‌ای (Orbital Icons) */
.orbital-icon {
    width: 30px; height: 30px; position: relative;
    display: flex; align-items: center; justify-content: center;
}
.orbital-icon::after {
    content: ''; width: var(--core-size); height: var(--core-size);
    background: var(--core-color); border-radius: 50%;
    box-shadow: 0 0 10px var(--core-color); z-index: 2;
}
.planet-1, .planet-2 {
    position: absolute; top: 50%; left: 50%;
    border-radius: 50%; background: var(--core-color); opacity: 0.8;
}
.planet-1 {
    width: var(--p1-size); height: var(--p1-size);
    transform: translate(-50%, -50%) rotate(var(--p1-ang)) translate(var(--p1-dist));
}
.planet-2 {
    width: var(--p2-size); height: var(--p2-size);
    transform: translate(-50%, -50%) rotate(var(--p2-ang)) translate(var(--p2-dist));
}
.nav-link:hover .planet-1 {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translate(-50%, -50%) rotate(calc(var(--p1-ang) + 180deg)) translate(var(--p1-dist));
}
.nav-link:hover .planet-2 {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translate(-50%, -50%) rotate(calc(var(--p2-ang) - 180deg)) translate(var(--p2-dist));
}

/* 5. ابزارها و سرچ */
.tools-section { display: flex; align-items: center; gap: 15px; }

.search-box-adv {
    position: relative; width: 45px; height: 45px;
    background: #f1f5f9; border-radius: 14px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden; display: flex; align-items: center;
    border: 1px solid transparent;
}
.search-box-adv.active, .search-box-adv:hover {
    width: 240px; background: white; border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(77, 150, 255, 0.15); z-index: 100;
}
.search-input-adv {
    position: absolute; left: 45px; width: 180px; height: 100%;
    border: none; background: transparent;
    font-family: 'vazir'; font-size: 0.9rem; color: var(--text-dark);
    opacity: 0; transition: 0.3s;
}
.search-box-adv.active .search-input-adv, .search-box-adv:hover .search-input-adv { opacity: 1; z-index: 101; }

.search-btn-adv {
    width: 45px; height: 45px; background: transparent; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-light); position: absolute; left: 0; top: 0; z-index: 2;
}
.search-box-adv.active .search-btn-adv { color: var(--primary); transform: scale(1.1); }

/* 6. دکمه ورود */
.login-btn-pro {
    display: flex; align-items: center; gap: 8px; padding: 10px 24px;
    background: rgba(77, 150, 255, 0.1); color: var(--primary);
    font-weight: 800; border: 1px solid rgba(77, 150, 255, 0.3);
    border-radius: 14px; text-decoration: none; transition: 0.4s;
    position: relative; overflow: hidden;
}
.login-btn-pro::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transition: 0.5s; transform: skewX(-20deg);
}
.login-btn-pro:hover {
    background: var(--primary); color: white; transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(77, 150, 255, 0.4);
}
.login-btn-pro:hover::before { left: 100%; }

/* 7. سایدبار موبایل */
.hamburger-btn {
    display: none; background: none; border: none; flex-direction: column; gap: 5px; cursor: pointer;
}
.line { width: 25px; height: 3px; background: var(--text-dark); border-radius: 5px; }

.mobile-sidebar {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1); z-index: 10000;
    padding: 30px; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; gap: 20px;
}
.mobile-sidebar.active { right: 0; }
.overlay-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 9999;
    opacity: 0; visibility: hidden; transition: 0.3s; backdrop-filter: blur(3px);
}
.overlay-backdrop.active { opacity: 1; visibility: visible; }

/* انیمیشن‌ها */
@keyframes spin-glow { 100% { transform: rotate(360deg); } }
@keyframes pulse-glow { 0% { opacity: 0.3; transform: scale(0.9); } 100% { opacity: 0.6; transform: scale(1.1); } }

/* ریسپانسیو */
@media (max-width: 900px) {
    .nav-desktop { display: none; }
    .hamburger-btn { display: flex; }
    .master-header { top: 10px; width: 92%; }
    .header-glass { padding: 10px 15px; }
    .brand-text h1 { font-size: 1.1rem; }
    .login-btn-pro { display: none; }
/* داخل مدیا کوئری موبایل @media (max-width: 900px) */

    /* تنظیمات اولیه سرچ باکس در موبایل */
    .search-box-adv { 
        width: 40px; 
        height: 40px; 
        position: relative; /* مهم */
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* انیمیشن فنری */
    }

    /* وقتی سرچ فعال شد (کلیک شد) */
    .search-box-adv.active { 
        position: absolute; /* کنده شدن از جای اصلی */
        top: 120%; /* آمدن به زیر هدر */
        left: 50%; /* وسط چین */
        transform: translateX(-50%); /* تراز دقیق وسط */
        width: 90% !important; /* عرض عریض */
        height: 50px;
        background: white;
        border-color: var(--primary);
        box-shadow: 0 15px 40px rgba(0,0,0,0.2); /* سایه عمیق برای حس شناوری */
        z-index: 1000;
    }

    /* دکمه سرچ در حالت فعال */
    .search-box-adv.active .search-btn-adv {
        color: var(--primary);
        transform: scale(1.1);
    }
}
/* آیکون خانه با CSS خالص */
/* گزینه 1: استایل خانه مدرن (Instagram Style) */
/* گزینه 2: خانه تو پر و بولد */
.css-icon-home {
    width: 18px;
    height: 14px;
    background: currentColor;
    position: relative;
    margin-top: 6px; /* جا برای سقف */
    border-radius: 2px;
    margin-left: 10px;
}

/* سقف مثلثی */
.css-icon-home::before {
    content: '';
    position: absolute;
    top: -8px; left: 0;
    width: 0; height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid currentColor;
    border-radius: 2px;
}

/* درب (با فضای منفی) */
.css-icon-home::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 6px; height: 6px;
    background: white; /* رنگش باید رنگ پس‌زمینه سایدبار باشه */
    border-radius: 2px 2px 0 0;
}