/* ===== Base Styles - Shared across all templates ===== */

/* ===== متغیرهای رنگ و طراحی ===== */
:root {
    --primary: #10e3ce;
    --primary-dark: #00c4b4;
    --primary-light: #eafffd;
    --primary-glow: rgba(16, 227, 206, 0.4);
    
    --accent: #6366f1;
    --accent-light: rgba(99, 102, 241, 0.12);
    
    --dark: #0f172a;
    --dark-light: #1e293b;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --bg-body: #ffffff;
    --surface: #f8fafc;
    --surface-dark: #f1f5f9;
    
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 40px -10px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 30px rgba(16, 227, 206, 0.3);
    --shadow-card: 0 10px 40px -10px rgba(0,0,0,0.08);
    
    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 30px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== ریست و پایه ===== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--dark);
    line-height: 1.8;
    overflow-x: hidden;
    font-size: 16px;
    width: 100%;
    max-width: 100vw;
    /* Smooth page entrance */
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Living background — subtle animated gradient */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(16, 227, 206, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 80% 100%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 40% 60% at 10% 50%, rgba(16, 227, 206, 0.06) 0%, transparent 50%);
    pointer-events: none;
    animation: living-bg 15s ease-in-out infinite;
}

@keyframes living-bg {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    33% { opacity: 1; transform: scale(1.02); }
    66% { opacity: 0.4; transform: scale(0.99); }
}

body.page-ready {
    opacity: 1;
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: var(--transition); 
}

img { 
    max-width: 100%; 
    height: auto;
    display: block;
}

ul { 
    list-style: none; 
}

/* ===== کانتینر ===== */
.container { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 0 24px; 
}

.section-padding { 
    padding: 100px 0; 
}

.section-padding-sm {
    padding: 60px 0;
}

/* ===== تایپوگرافی ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.3;
    color: var(--dark);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--dark) 40%, var(--accent) 80%, var(--primary-dark) 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift-text 8s ease-in-out infinite;
}

@keyframes gradient-shift-text {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 600px;
}

.title-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* ===== دکمه‌ها ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--dark);
    box-shadow: 0 10px 25px -5px rgba(16, 227, 206, 0.5);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(135deg, var(--primary-dark), #009e90);
}

.btn-primary:hover::after {
    opacity: 1;
    transform: scale(1);
}

.btn-secondary {
    background: var(--dark);
    color: white;
}

.btn-secondary:hover {
    background: var(--dark-light);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-dark);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--dark);
}

.btn-ghost {
    background: rgba(255,255,255,0.1);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.2);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* ===== هدر حرفه‌ای و مدرن ===== */
header {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 20px;
    transform: translateZ(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-full);
    padding: 14px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    max-width: 1200px;
    margin: 0 auto;
    transform: translateZ(0);
    position: relative;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.navbar::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, 
        rgba(16, 227, 206, 0.3), 
        transparent 30%,
        transparent 70%,
        rgba(16, 227, 206, 0.3));
    border-radius: calc(var(--radius-full) + 2px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.navbar:hover::before {
    opacity: 1;
}

.logo {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 
        0 0 20px var(--primary-glow),
        0 4px 15px rgba(16, 227, 206, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px var(--primary-glow), 0 4px 15px rgba(16, 227, 206, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px var(--primary-glow), 0 6px 20px rgba(16, 227, 206, 0.3);
        transform: scale(1.02);
    }
}

.logo:hover img {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 
        0 0 30px var(--primary-glow),
        0 8px 25px rgba(16, 227, 206, 0.35);
    border-color: var(--primary-dark);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.logo-main {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--dark);
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.logo:hover .logo-main {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-gray);
    letter-spacing: 0.8px;
    transition: color 0.3s ease;
}

.logo:hover .logo-sub {
    color: var(--primary-dark);
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    position: relative;
    padding: 10px 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(16, 227, 206, 0.1);
    border-radius: 50%;
    transition: all 0.4s ease;
    z-index: -1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(16, 227, 206, 0.5);
}

.nav-links a:hover {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.nav-links a:hover::before {
    width: 50px;
    height: 50px;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-dark);
}

.nav-links a.active::after {
    width: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

header.scrolled {
    top: 10px;
}

header.scrolled .navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    padding: 10px 32px;
    box-shadow: 
        0 10px 50px rgba(0, 0, 0, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════
   Premium Page Hero — shared pattern for all subpages
   Dark gradient + floating orbs + dot pattern + badge + breadcrumb
   ═══════════════════════════════════════════════════════════════════ */

.page-hero-premium {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 420px;
    background: linear-gradient(160deg, var(--dark) 0%, #0f172a 40%, #0c1222 100%);
    padding: 180px 0 60px;
    overflow: hidden;
}

/* Floating orbs — layered, varied, cinematic */
.page-hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
}

/* Top-right — main teal glow, large & warm */
.page-hero-orb--1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at 55% 35%,
        rgba(16, 227, 206, 0.18) 0%,
        rgba(16, 227, 206, 0.08) 30%,
        transparent 70%);
    opacity: 1;
    top: -250px;
    right: -150px;
    animation: hero-orb--1-drift 16s ease-in-out infinite;
}

@keyframes hero-orb--1-drift {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25%      { transform: translate(-40px, 25px) scale(1.12) rotate(3deg); }
    50%      { transform: translate(15px, -15px) scale(0.94) rotate(-2deg); }
    75%      { transform: translate(30px, 10px) scale(1.06) rotate(1deg); }
}

/* Bottom-left — indigo accent, subtle & deep */
.page-hero-orb--2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 40% 60%,
        rgba(99, 102, 241, 0.14) 0%,
        rgba(99, 102, 241, 0.05) 35%,
        transparent 70%);
    opacity: 1;
    bottom: -140px;
    left: -80px;
    animation: hero-orb--2-drift 18s ease-in-out infinite;
}

@keyframes hero-orb--2-drift {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33%      { transform: translate(25px, -35px) scale(1.08) rotate(-4deg); }
    66%      { transform: translate(-20px, 15px) scale(0.93) rotate(2deg); }
}

/* Center-right — teal+indigo blend, bridging depth */
.page-hero-orb--3 {
    width: 340px;
    height: 340px;
    background: radial-gradient(circle at 50% 50%,
        rgba(16, 227, 206, 0.10) 0%,
        rgba(99, 102, 241, 0.04) 40%,
        transparent 70%);
    opacity: 1;
    top: 30%;
    right: 25%;
    animation: hero-orb--3-drift 20s ease-in-out infinite;
}

@keyframes hero-orb--3-drift {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50%      { transform: translate(-20px, -25px) scale(1.10) rotate(5deg); }
}

/* Dot pattern overlay — slightly more visible */
.page-hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(16, 227, 206, 0.06) 1px, transparent 1px),
        radial-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 28px 28px, 42px 42px;
    background-position: 0 0, 14px 14px;
    pointer-events: none;
    z-index: 1;
}

/* Content wrapper — centered */
.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

/* Breadcrumb inside hero — centered */
.page-hero-breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.page-hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.25s ease;
}

.page-hero-breadcrumb a:hover {
    color: var(--primary);
}

/* Icon badge */
.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 227, 206, 0.12);
    border: 1px solid rgba(16, 227, 206, 0.28);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

/* Title with gradient */
.page-hero-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(to right, #fff 0%, #e2e8f0 60%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.page-hero-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    line-height: 1.9;
    max-width: 500px;
    margin: 0 auto;
}

/* Meta / stat chips row — centered */
.page-hero-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
    justify-content: center;
}

.page-hero-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 18px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.page-hero-meta-chip i {
    color: var(--primary);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .page-hero-premium {
        min-height: auto;
        padding: 140px 0 50px;
    }

    .page-hero-title {
        font-size: 1.6rem;
    }

    .page-hero-subtitle {
        font-size: 1rem;
    }

    .page-hero-badge {
        padding: 6px 16px;
        font-size: 0.82rem;
    }

    .page-hero-meta-chip {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .page-hero-orb--1 { width: 320px; height: 320px; top: -160px; right: -100px; }
    .page-hero-orb--2 { width: 240px; height: 240px; bottom: -80px; left: -40px; }
    .page-hero-orb--3 { width: 200px; height: 200px; }
}

@media (max-width: 480px) {
    .page-hero-premium {
        padding: 120px 0 40px;
    }

    .page-hero-title {
        font-size: 1.35rem;
    }

    .page-hero-subtitle {
        display: none;
    }

    .page-hero-orb--1,
    .page-hero-orb--2,
    .page-hero-orb--3 { display: none; }
}

/* Legacy page-header kept for backward compat */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    filter: blur(60px);
}

.page-header h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 16px;
    position: relative;
}

.breadcrumb {
    display: flex;
    gap: 12px;
    align-items: center;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    position: relative;
}

.breadcrumb a {
    color: rgba(255,255,255,0.8);
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb-separator {
    opacity: 0.6;
}

/* ===== کارت‌های مدرن ===== */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 25px 50px -12px rgba(16, 227, 206, 0.15),
        0 0 40px rgba(16, 227, 206, 0.05);
    border-color: rgba(16, 227, 206, 0.3);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 24px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--dark);
}

.card-text {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== بج‌ها ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-weight: var(--font-weight-bold);
    font-size: 0.8rem;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* ===== فرم‌ها ===== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--surface-dark);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 227, 206, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--surface-dark);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 20px;
}

/* ===== گرید سیستم ساده ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -16px;
}

.col {
    flex: 1;
    padding: 0 16px;
}

.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0 16px; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 16px; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 16px; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 0 16px; }
.col-lg-3 { flex: 0 0 25%; max-width: 25%; padding: 0 16px; }
.col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 16px; }
.col-lg-5 { flex: 0 0 41.667%; max-width: 41.667%; padding: 0 16px; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; padding: 0 16px; }
.col-lg-7 { flex: 0 0 58.333%; max-width: 58.333%; padding: 0 16px; }
.col-lg-8 { flex: 0 0 66.667%; max-width: 66.667%; padding: 0 16px; }

/* ===== ابزارهای متنی ===== */
.text-center { text-align: center; }
.text-gray { color: var(--text-gray); }
.text-primary { color: var(--primary-dark); }
.text-white { color: white; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 40px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 40px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.py-4 { padding-top: 24px; padding-bottom: 24px; }
.py-5 { padding-top: 40px; padding-bottom: 40px; }
.p-4 { padding: 24px; }
.p-5 { padding: 40px; }

/* ===== ابزارهای فلکس ===== */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-block { display: block; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }

/* ===== صفحه‌بندی ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: white;
    color: var(--dark);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.page-link.active {
    background: var(--primary);
    color: var(--dark);
    box-shadow: var(--shadow-glow);
}

/* ===== فیلتر دکمه‌ها ===== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    background: white;
    border: 2px solid var(--surface-dark);
    color: var(--text-gray);
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(16, 227, 206, 0.3);
}

/* ===== بخش پس‌زمینه ===== */
.bg-surface {
    background: var(--surface);
    position: relative;
}

.bg-surface::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.06;
    top: -300px;
    left: -300px;
    pointer-events: none;
    animation: surface-glow-drift 12s ease-in-out infinite;
}

.bg-surface::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--accent, #6366f1);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.06;
    bottom: -150px;
    right: -100px;
    pointer-events: none;
    animation: surface-glow-drift 15s ease-in-out infinite reverse;
}

@keyframes surface-glow-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, calc(-15px + var(--glow-drift-y, 0px))) scale(1.08); }
    66% { transform: translate(-15px, calc(10px + var(--glow-drift-y, 0px))) scale(0.94); }
}

/* ===== خط جداکننده ===== */
.divider {
    height: 1px;
    background: linear-gradient(to left, transparent, var(--surface-dark), transparent);
    margin: 40px 0;
}

/* ===== فوتر مدرن و حرفه‌ای ===== */
footer {
    background: linear-gradient(135deg, var(--dark) 0%, #0f172a 50%, #1e293b 100%);
    color: white;
    padding-top: 100px;
    border-top-right-radius: 60px;
    border-top-left-radius: 60px;
    margin-top: 120px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

footer::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 227, 206, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    transition: var(--transition);
}

.footer-logo:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-glow);
}

.footer-desc {
    color: var(--text-light);
    line-height: 1.9;
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.footer-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-links li {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links li::before {
    content: '›';
    color: var(--primary);
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-links li:hover::before {
    transform: translateX(-5px);
}

.footer-links a {
    color: var(--text-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(-5px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-light);
    transition: var(--transition);
}

.footer-contact-item:hover {
    color: white;
}

.footer-contact-item i {
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 3px;
    min-width: 20px;
}

.social-section {
    margin-top: 30px;
}

.social-title {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.social-links a i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(16, 227, 206, 0.3);
}

.social-links a:hover::before {
    opacity: 1;
}

.social-links a:hover i {
    transform: scale(1.1);
}

.social-links a[href*="instagram"]:hover {
    box-shadow: 0 10px 30px rgba(225, 48, 108, 0.4);
}

.social-links a[href*="telegram"]:hover,
.social-links a[href*="t.me"]:hover {
    box-shadow: 0 10px 30px rgba(0, 136, 204, 0.4);
}

.social-links a[href*="linkedin"]:hover {
    box-shadow: 0 10px 30px rgba(0, 119, 181, 0.4);
}

.social-links a[href*="eitaa"]:hover {
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.4);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 35px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.footer-bottom-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-bottom i {
    color: var(--primary);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.footer-bottom a {
    color: var(--primary);
    font-weight: 600;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ===== پیام‌ها ===== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ===== وضعیت خالی ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--primary-dark);
    font-size: 2.5rem;
}

/* ═══════════════════════════════════════════════════════════════════
   Scroll-Reveal Animation System
   ═══════════════════════════════════════════════════════════════════ */

/* Base reveal — hidden until scrolled into view */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    will-change: transform, opacity;
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Directional variants */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    will-change: transform, opacity;
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    will-change: transform, opacity;
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    will-change: transform, opacity;
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Scale-in variant */
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    will-change: transform, opacity;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children — individual cards/items that animate in sequence */
.reveal-stagger {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-stagger.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Image fade-in reveal ── */
.img-reveal {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.img-reveal.img-loaded {
    opacity: 1;
    transform: scale(1);
}

/* ── Respect reduced-motion preference ── */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-up,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-stagger,
    .img-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    body {
        opacity: 1;
        transition: none;
    }
}

/* ── Skeleton / shimmer placeholder for images ── */
.skeleton-img {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-dark) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   Ambient Floating Particles — subtle background life
   ═══════════════════════════════════════════════════════════════════ */

.ambient-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.ambient-particle {
    position: absolute;
    width: var(--size, 150px);
    height: var(--size, 150px);
    border-radius: 50%;
    background: radial-gradient(circle, var(--color, rgba(16,227,206,0.15)) 0%, transparent 70%);
    top: -20%;
    left: var(--left, 50%);
    animation: ambient-drift var(--duration, 20s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    will-change: transform;
}

@keyframes ambient-drift {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    15% {
        opacity: 0.8;
    }
    85% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(calc(100vh + 200px)) translateX(var(--drift-x, 0px)) scale(0.5);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   Section transition waves — organic curves
   ═══════════════════════════════════════════════════════════════════ */

.section-wave {
    position: relative;
}

.section-wave::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════════
   Floating accent images — gentle hover drift
   ═══════════════════════════════════════════════════════════════════ */

.float-drift {
    animation: float-drift 6s ease-in-out infinite;
}

@keyframes float-drift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.float-drift-slow {
    animation: float-drift 8s ease-in-out infinite;
}

/* ===== ریسپانسیو کامل ===== */
@media (max-width: 1200px) {
    .nav-links {
        gap: 24px;
    }
    
    .nav-links a {
        font-size: 0.9rem;
    }
}

@media (max-width: 1024px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section-padding {
        padding: 80px 0;
    }
    
    .section-padding-sm {
        padding: 50px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    footer {
        border-top-right-radius: 40px;
        border-top-left-radius: 40px;
    }
    
    .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    :root {
        --radius: 12px;
        --radius-lg: 16px;
    }
    
    .navbar {
        padding: 10px 16px;
        border-radius: 50px;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .logo img {
        width: 36px;
        height: 36px;
    }
    
    .logo-main {
        font-size: 0.95rem;
    }
    
    .logo-sub {
        font-size: 0.65rem;
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 80px;
        left: 20px;
        right: 20px;
        background: white;
        border-radius: 20px;
        padding: 20px;
        box-shadow: 0 20px 50px rgba(0,0,0,0.15);
        flex-direction: column;
        gap: 8px;
        z-index: 999;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 12px 16px;
        border-radius: 12px;
    }
    
    .nav-links a:hover {
        background: var(--surface);
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
        width: 44px;
        height: 44px;
        background: var(--surface);
        border: none;
        border-radius: 12px;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        color: var(--dark);
        cursor: pointer;
    }
    
    .page-header {
        padding: 120px 0 60px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .section-padding-sm {
        padding: 40px 0;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    footer {
        padding-top: 60px;
        border-top-right-radius: 30px;
        border-top-left-radius: 30px;
        margin-top: 80px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 35px;
        margin-bottom: 40px;
    }
    
    .footer-logo {
        justify-content: center;
        font-size: 1.2rem;
    }
    
    .footer-logo img {
        width: 40px;
        height: 40px;
    }
    
    .footer-desc {
        font-size: 0.9rem;
    }
    
    .footer-title {
        justify-content: center;
        font-size: 1.05rem;
    }
    
    .footer-title::before {
        display: none;
    }
    
    .footer-links li {
        justify-content: center;
    }
    
    .footer-links li::before {
        display: none;
    }
    
    .social-section {
        margin-top: 20px;
    }
    
    .social-links {
        justify-content: center;
        gap: 12px;
    }
    
    .social-links a {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .footer-contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-contact-item {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    
    .footer-bottom {
        padding: 25px 0;
    }
    
    .footer-bottom-text {
        flex-direction: column;
        gap: 6px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .col-md-4, .col-md-6, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .text-center-mobile {
        text-align: center;
    }
    
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.25rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}
