:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #a855f7;
    --accent-2: #ec4899;
    --bg-dark: #0a0a1a;
    --bg-dark-2: #12122a;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-3: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-4: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-5: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-6: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-7: linear-gradient(135deg, #f43f5e 0%, #f97316 100%);
    --gradient-8: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --gradient-9: linear-gradient(135deg, #14b8a6 0%, #22c55e 100%);
}

* {
    font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

/* Animated background orbs */
body::before {
    content: '';
    position: fixed;
    top: -30%;
    right: -20%;
    width: 70vw;
    height: 70vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: floatOrb1 15s ease-in-out infinite;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -20%;
    width: 70vw;
    height: 70vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: floatOrb2 18s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatOrb1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-30px, 30px) scale(1.1);
    }
}

@keyframes floatOrb2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -30px) scale(1.15);
    }
}

/* ===== Header ===== */
.navbar-custom {
    background: rgba(10, 10, 26, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.5);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.brand-text {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-text .brand-sub {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0;
}

.btn-support {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--primary-light);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.btn-support:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -8px rgba(99, 102, 241, 0.5);
}

.btn-support:active {
    transform: scale(0.96);
}

/* ===== Hero Section ===== */
.hero {
    padding: 2.5rem 0 1.75rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease both;
}

.hero-badge .pulse-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.hero-title {
    font-size: clamp(1.85rem, 7vw, 2.75rem);
    font-weight: 900;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.hero-sub {
    font-size: clamp(0.92rem, 3.6vw, 1.05rem);
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.8;
    padding: 0 0.5rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Service Cards ===== */
.services-grid {
    position: relative;
    z-index: 1;
    padding-bottom: 2rem;
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    padding: 1.4rem 1.15rem;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    will-change: transform;
    animation: fadeInUp 0.5s ease both;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--card-glow, rgba(99, 102, 241, 0.15)), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* Stagger animations */
.service-card:nth-child(1) {
    animation-delay: 0.05s;
}

.service-card:nth-child(2) {
    animation-delay: 0.1s;
}

.service-card:nth-child(3) {
    animation-delay: 0.15s;
}

.service-card:nth-child(4) {
    animation-delay: 0.2s;
}

.service-card:nth-child(5) {
    animation-delay: 0.25s;
}

.service-card:nth-child(6) {
    animation-delay: 0.3s;
}

.service-card:nth-child(7) {
    animation-delay: 0.35s;
}

.service-card:nth-child(8) {
    animation-delay: 0.4s;
}

.service-card:nth-child(9) {
    animation-delay: 0.45s;
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.icon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.35rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.4);
}

.service-card:hover .icon-box {
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.5);
}

.card-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.service-card:hover .card-arrow {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateX(-3px);
}

.service-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    direction: ltr;
    text-align: right;
    transition: color 0.3s ease;
}

.service-card:hover .service-title {
    color: #fff;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.75;
    margin-bottom: 0;
    font-weight: 400;
    transition: color 0.3s ease;
}

.service-card:hover .service-desc {
    color: #cbd5e1;
}

/* ===== CTA Banner ===== */
.cta-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 22px;
    padding: 1.85rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 12px 25px -8px rgba(99, 102, 241, 0.5);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.cta-title {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.cta-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.35rem;
    line-height: 1.7;
}

.btn-cta {
    background: var(--gradient-1);
    background-size: 200% auto;
    border: none;
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.3s ease;
    box-shadow: 0 12px 25px -8px rgba(99, 102, 241, 0.5);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-cta:hover {
    background-position: 100% center;
    transform: translateY(-2px);
    box-shadow: 0 18px 35px -10px rgba(99, 102, 241, 0.6);
    color: white;
}

.btn-cta:active {
    transform: scale(0.97);
}

/* ===== Footer ===== */
.footer {
    margin-top: auto;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.82rem;
    background: rgba(10, 10, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--accent);
}

/* ===== Mobile Optimizations ===== */
@media (max-width: 480px) {
    .hero {
        padding: 1.75rem 0 1.25rem;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-sub {
        font-size: 0.9rem;
        line-height: 1.75;
    }

    .service-card {
        padding: 1.2rem 1rem;
        border-radius: 20px;
    }

    .icon-box {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
        border-radius: 14px;
    }

    .service-title {
        font-size: 1.05rem;
    }

    .service-desc {
        font-size: 0.8rem;
        line-height: 1.7;
    }

    .card-arrow {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .cta-banner {
        padding: 1.5rem 1.15rem;
    }

    .cta-title {
        font-size: 1.1rem;
    }

    .cta-desc {
        font-size: 0.85rem;
    }

    .btn-cta {
        padding: 0.7rem 1.5rem;
        font-size: 0.88rem;
    }

    .brand-text {
        font-size: 1.1rem;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .btn-support {
        padding: 0.45rem 0.85rem;
        font-size: 0.75rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* RTL spacing fixes */
.me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

.ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}