/* ==========================================
   1. متغیرها و تنظیمات جهانی
   ========================================== */
:root {
    --color-primary: #0A1A3A;
    --color-gold: #C9A84C;
    --color-white: #FFFFFF;
    --color-blue-tech: #1B5E8A;
    --color-dark-gray: #2C3E50;
    --color-light-gray: #F0F2F5;
    --font-main: 'Vazirmatn', sans-serif;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ==========================================
   2. تنظیمات پایه
   ========================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-main);
    direction: rtl;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body:not(.intro-page) { background-color: var(--color-white); color: var(--color-dark-gray); }
body.intro-page { background-color: var(--color-primary); color: var(--color-white); }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { font-weight: normal; }

/* ==========================================
   3. کانتینر و کلاس‌های عمومی
   ========================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* ==========================================
   4. دکمه‌ها
   ========================================== */
.btn-primary {
    display: inline-block; padding: 12px 30px;
    background-color: var(--color-primary); color: var(--color-white);
    border-radius: 8px; font-weight: bold;
    transition: var(--transition); text-align: center;
}
.btn-primary:hover { background-color: #1A2A4A; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(10, 26, 58, 0.3); }

.btn-gold {
    display: inline-block; padding: 12px 30px;
    background-color: var(--color-gold); color: var(--color-white);
    border-radius: 8px; font-weight: bold;
    transition: var(--transition); text-align: center;
}
.btn-gold:hover { background-color: #B8963A; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3); }

.btn-large { padding: 15px 40px; font-size: 1.1rem; }
.btn-cta { padding: 8px 20px; font-size: 0.9rem; }

/* ==========================================
   5. کارت شیشه‌ای (Glassmorphism)
   ========================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 25px 20px; text-align: center;
    box-shadow: var(--glass-shadow); transition: var(--transition);
}
.glass-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15); border-color: var(--color-gold); }

/* ==========================================
   6. هدر (Header)
   ========================================== */
.header { background-color: var(--color-primary); padding: 15px 0; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); }
.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo a { display: flex; align-items: center; gap: 10px; color: var(--color-white); }
.logo-img { height: 45px; width: auto; }
.logo-text { font-size: 1.3rem; font-weight: bold; }

.nav-list { display: flex; gap: 25px; }
.nav-link { color: var(--color-white); font-size: 1rem; transition: var(--transition); position: relative; }
.nav-link:hover { color: var(--color-gold); }
.nav-link.active { color: var(--color-gold); }
.nav-link.active::after { content: ''; position: absolute; bottom: -5px; left: 0; right: 0; height: 2px; background-color: var(--color-gold); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.hamburger span { width: 25px; height: 3px; background-color: var(--color-white); border-radius: 2px; }

/* ==========================================
   7. منوی کناری (Sidebar) برای موبایل
   ========================================== */
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); z-index: 999; backdrop-filter: blur(4px); }
.sidebar-overlay.open { display: block; }
.sidebar { position: fixed; top: 0; right: -320px; width: 300px; height: 100vh; background: var(--color-primary); color: var(--color-white); z-index: 1000; transition: right 0.3s ease; display: flex; flex-direction: column; padding: 20px; box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3); }
.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); }
.sidebar-title { font-size: 1.2rem; font-weight: bold; color: var(--color-gold); }
.sidebar-close { background: none; border: none; color: var(--color-white); font-size: 1.5rem; cursor: pointer; transition: transform 0.3s ease; }
.sidebar-close:hover { transform: rotate(90deg); }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.sidebar-link { display: block; padding: 12px 15px; border-radius: 10px; color: rgba(255, 255, 255, 0.8); text-decoration: none; transition: all 0.3s ease; font-size: 1rem; }
.sidebar-link:hover { background: rgba(255, 255, 255, 0.08); color: var(--color-gold); }
.sidebar-link.active { background: rgba(201, 168, 76, 0.15); color: var(--color-gold); }
.sidebar-footer { padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-footer .btn-gold { width: 100%; text-align: center; }

/* ==========================================
   8. منوی پایین (Bottom Navigation) برای موبایل
   ========================================== */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--color-primary); height: 70px; z-index: 999; box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3); border-top: 1px solid rgba(255, 255, 255, 0.05); }
.bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.6); text-decoration: none; transition: color 0.3s ease; gap: 2px; padding: 8px 0; position: relative; }
.bottom-nav-item:hover { color: var(--color-gold); }
.bottom-nav-item.active { color: var(--color-gold); }
.bottom-nav-item.active::after { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; background: var(--color-gold); border-radius: 0 0 4px 4px; }
.bottom-nav-icon { font-size: 1.3rem; }
.bottom-nav-label { font-size: 0.7rem; }
.bottom-logo { flex: 1.5; }
.bottom-logo img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-gold); transition: transform 0.3s ease; }
.bottom-logo img:hover { transform: scale(1.05); }

/* ==========================================
   9. فوتر (Footer) - برای صفحات داخلی
   ========================================== */
.footer { background-color: var(--color-primary); color: var(--color-white); padding: 50px 0 20px; margin-top: auto; }
.footer-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-bottom: 30px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.footer-brand p { margin-top: 10px; color: rgba(255, 255, 255, 0.8); font-size: 0.95rem; }
.footer-logo { height: 40px; width: auto; }
.footer-links h4, .footer-contact h4 { margin-bottom: 15px; color: var(--color-gold); }
.footer-links ul li { margin-bottom: 8px; }
.footer-links ul li a { color: rgba(255, 255, 255, 0.8); transition: var(--transition); }
.footer-links ul li a:hover { color: var(--color-gold); }
.footer-contact p { margin-bottom: 8px; color: rgba(255, 255, 255, 0.8); }
.footer-bottom { text-align: center; padding-top: 20px; color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; }

/* ==========================================
   10. بخش‌های صفحه اصلی (Home)
   ========================================== */
.hero-section { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-blue-tech) 100%); padding: 80px 0 60px; color: var(--color-white); }
.hero-title { font-size: 2.5rem; text-align: center; margin-bottom: 15px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
.hero-subtitle { text-align: center; font-size: 1.15rem; margin-bottom: 40px; color: rgba(255, 255, 255, 0.9); }
.hero-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-bottom: 40px; }
.hero-cards .glass-card { color: var(--color-white); background: rgba(255, 255, 255, 0.15); }
.hero-cards .glass-card:hover { background: rgba(255, 255, 255, 0.25); }
.card-icon { font-size: 2.5rem; margin-bottom: 10px; }
.hero-cards h3 { margin-bottom: 8px; font-size: 1.1rem; }
.hero-cards p { font-size: 0.9rem; opacity: 0.9; }
.hero-actions { display: flex; justify-content: center; gap: 20px; }

.ecosystem-section { padding: 60px 0; background-color: var(--color-light-gray); }
.section-title { font-size: 2rem; color: var(--color-primary); text-align: center; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: var(--color-dark-gray); margin-bottom: 40px; font-size: 1.1rem; }
.ecosystem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ecosystem-item { background: var(--color-white); padding: 25px 20px; border-radius: 12px; text-align: center; transition: var(--transition); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }
.ecosystem-item:hover { transform: translateY(-5px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); }
.eco-icon { font-size: 2.2rem; margin-bottom: 10px; }
.ecosystem-item h4 { color: var(--color-primary); margin-bottom: 5px; }
.ecosystem-item p { color: var(--color-dark-gray); font-size: 0.9rem; }

.stats-section { padding: 60px 0; background-color: var(--color-primary); color: var(--color-white); }
.stats-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-number { display: block; font-size: 2.5rem; font-weight: bold; color: var(--color-gold); }
.stat-label { display: block; font-size: 1rem; margin-top: 5px; opacity: 0.9; }

.cta-section { padding: 60px 0; text-align: center; background-color: var(--color-light-gray); }
.cta-container h2 { color: var(--color-primary); font-size: 2rem; margin-bottom: 10px; }
.cta-container p { color: var(--color-dark-gray); margin-bottom: 30px; font-size: 1.1rem; }

/* ==========================================
   11. صفحه اینترو (Intro Page)
   ========================================== */
.page { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 40px 20px; gap: 60px; max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.top-pattern, .bottom-pattern { position: fixed; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 168, 76, 0.15) 0%, transparent 70%); pointer-events: none; z-index: 0; }
.top-pattern { top: -100px; left: -100px; }
.bottom-pattern { bottom: -100px; right: -100px; }
.ambient { position: fixed; width: 200px; height: 200px; border-radius: 50%; filter: blur(60px); opacity: 0.3; pointer-events: none; z-index: 0; animation: floatAmbient 10s ease-in-out infinite alternate; }
.ambient.a1 { top: 20%; right: 10%; background: #1B5E8A; }
.ambient.a2 { bottom: 20%; left: 10%; background: #C9A84C; }
@keyframes floatAmbient { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(30px, -30px) scale(1.2); } }

.brand { flex: 1; text-align: center; color: var(--color-white); padding: 20px; max-width: 400px; }
.logo-box { position: relative; display: inline-block; margin-bottom: 25px; width: 120px; height: 120px; margin-left: auto; margin-right: auto; }
.logo-main { width: 120px; height: 120px; border-radius: 50%; position: relative; z-index: 2; box-shadow: 0 0 30px rgba(201, 168, 76, 0.15); transition: transform 0.3s ease; object-fit: cover; }
.logo-main:hover { transform: scale(1.03); }
.orbit-ring { position: absolute; top: 50%; left: 50%; border-radius: 50%; transform: translate(-50%, -50%); z-index: 1; pointer-events: none; }
.orbit-outer { width: 200px; height: 200px; border: 2px solid rgba(201, 168, 76, 0.25); animation: spinOrbit 20s linear infinite; }
.orbit-inner { width: 160px; height: 160px; border: 1.5px dashed rgba(201, 168, 76, 0.15); animation: spinOrbitReverse 15s linear infinite; }
@keyframes spinOrbit { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spinOrbitReverse { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(-360deg); } }

.brand h1 { font-size: 2.8rem; margin-bottom: 5px; color: var(--color-gold); font-weight: bold; }
.brand h2 { font-size: 1.2rem; margin-bottom: 15px; font-weight: normal; opacity: 0.9; }
.brand p { font-size: 0.95rem; opacity: 0.8; line-height: 1.6; max-width: 300px; margin: 0 auto; }

.panel { flex: 1.2; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px; padding: 40px 30px; color: var(--color-white); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); max-width: 500px; }
.panel h3 { text-align: center; font-size: 1.5rem; margin-bottom: 25px; color: var(--color-gold); }
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
.service { display: flex; align-items: center; gap: 15px; padding: 15px; background: rgba(255, 255, 255, 0.05); border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.06); text-decoration: none; color: var(--color-white); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.service:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--color-gold); transform: translateY(-4px); box-shadow: 0 8px 25px rgba(201, 168, 76, 0.2); }
.service:hover .service-number { color: var(--color-gold); background: rgba(201, 168, 76, 0.15); }
.service-number { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; font-weight: bold; transition: all 0.3s ease; }
.service-content { display: flex; flex-direction: column; }
.service-content strong { font-size: 0.95rem; margin-bottom: 3px; }
.service-content small { font-size: 0.75rem; opacity: 0.7; }
.description { margin-bottom: 25px; padding: 15px; background: rgba(255, 255, 255, 0.03); border-radius: 12px; border-right: 3px solid var(--color-gold); }
.description h3 { margin-bottom: 8px; font-size: 1.1rem; text-align: right; }
.description p { font-size: 0.9rem; opacity: 0.8; line-height: 1.5; }
.buttons { display: flex; gap: 15px; flex-wrap: wrap; }
.buttons .btn-primary, .buttons .btn-gold { flex: 1; text-align: center; padding: 12px 20px; font-weight: bold; border-radius: 10px; transition: all 0.3s ease; min-width: 120px; }
.buttons .btn-gold { background-color: var(--color-gold); color: var(--color-primary); }
.buttons .btn-gold:hover { background-color: #B8963A; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4); }

/* ==========================================
   12. فوتر صفحه اینترو (Intro Footer)
   ========================================== */
.intro-footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    z-index: 10;
}
.intro-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}
.intro-footer a:hover {
    color: var(--color-gold);
}

/* ==========================================
   13. مدیا کوئری‌های عمومی
   ========================================== */
@media (max-width: 768px) {
    .nav-list { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background-color: var(--color-primary); padding: 20px; gap: 15px; }
    .nav-list.open { display: flex; }
    .hamburger { display: flex; }
    .btn-cta { display: none; }
    .grid-2col { grid-template-columns: 1fr; }
    .grid-3col { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; }
    
    /* منوی پایین */
    .bottom-nav { display: flex; }
    main { padding-bottom: 80px; }
    .footer { margin-bottom: 70px; }
    
    /* صفحه اصلی - موبایل */
    .hero-cards { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; gap: 15px; }
    .ecosystem-grid { grid-template-columns: 1fr 1fr; }
    .stats-container { grid-template-columns: 1fr 1fr; gap: 20px; }
    .hero-title { font-size: 1.8rem; }
}

@media (min-width: 769px) {
    .bottom-nav { display: none; }
    .sidebar-overlay, .sidebar { display: none; }
}

@media (max-width: 480px) {
    .ecosystem-grid { grid-template-columns: 1fr; }
    .stats-container { grid-template-columns: 1fr; }
    .stat-number { font-size: 2rem; }
    .hero-title { font-size: 1.5rem; }
    
    /* صفحه اینترو - موبایل (ترتیب درست: لوگو بالا، باکس پایین) */
    .page {
        flex-direction: column;
        gap: 30px;
        padding: 20px;
        justify-content: flex-start;
        padding-top: 40px;
    }
    .brand {
        max-width: 100%;
        order: 1;  /* لوگو و عنوان در بالا */
    }
    .panel {
        max-width: 100%;
        padding: 30px 20px;
        order: 2;  /* باکس‌های خدمات در پایین */
    }
    .brand h1 { font-size: 2.2rem; }
    .services {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .service { padding: 10px 15px; }
    .buttons {
        flex-direction: column;
        gap: 10px;
    }
    .buttons .btn-primary, .buttons .btn-gold {
        width: 100%;
        padding: 14px;
    }
    .brand h1 { font-size: 1.5rem; }
    .brand p { font-size: 0.85rem; }
    .panel h3 { font-size: 1.2rem; }
    .logo-box { width: 80px; height: 80px; margin-bottom: 20px; }
    .logo-main { width: 80px; height: 80px; }
    .orbit-outer { width: 120px; height: 120px; }
    .orbit-inner { width: 90px; height: 90px; }
    
    /* فوتر صفحه اینترو - موبایل */
    .intro-footer {
        position: relative;
        bottom: auto;
        margin-top: 30px;
        padding: 10px 0;
    }
}