/*==============================================
 *  NeonMatrix Pro - Multi-Purpose HTML Template with Matrix Effect
 * Version: 1.0.0.4
==============================================*/

/*----------------------------------------------
  1. CSS Variables
----------------------------------------------*/
:root {
    /* Colors */
    --bg-primary: #010f0d;
    --bg-secondary: #020d0e;
    --bg-glass: #77ffc906 ;
    --matrix-bg:
        radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.10) 0%, transparent 35%);
    --bg-card: #09161a;
    --bg-hover: #0d1f26;
    --icon-neon: #00ffff;

    --accent-cyan: #00ffff;
    --accent-green: #00ff5e;
    --accent-purple: #f152ff;
    --accent-pink: #ff0080;
    --accent-blue: #3b82f6;
    --neon-green: #00ff88;
    --neon-blue: #00d4ff;        
    
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-dim: #64748b;
    --text-footer:#0fffff;
    --text-footer2:#ffffff;
    --border: #273d49;
    --border-light: #334e5c;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00ffff 0%, #00ff88 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #f152ff 100%);
    --gradient-tertiary: linear-gradient(135deg, #ff0080 0%, #ff8c00 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow-cyan: 0 0 20px rgba(0, 255, 255, 0.3);
    --shadow-glow-purple: 0 0 20px rgba(241, 82, 255, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --features-card: rgba(255, 255, 255, 0.05);
    /* Z-Index */
    --z-preloader: 10000;
    --z-navbar: 1000;
    --z-back-to-top: 999;
    --z-matrix-bg: -1;
}

/* Light Theme Variables */
/* ═══════════════════════════════════════════════════════════════
   🌞 LIGHT THEME - WCAG 2.1 AA Compliant
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] {
    /* ─────────────── Background Colors ─────────────── */
    --bg-primary: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 50%, #cffafe 100%);
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-hover: linear-gradient(145deg, #ecfeff 0%, #cffafe 100%);
    --bg-input: #ffffff;
    --bg-code: #f1f5f9;
    
    /* ─────────────── Matrix/Decorative ─────────────── */
    --matrix-bg: radial-gradient(circle at 30% 70%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
                 radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 40%);
    
    /* ─────────────── Text Colors (WCAG AA Compliant) ─────────────── */
    /* Contrast ratios calculated against #ffffff */
    --text-primary: #0c1222;      /* Contrast: 16.5:1 ✓ */
    --text-secondary: #1a2332;    /* Contrast: 13.8:1 ✓ */
    --text-dim: #3d4a5c;          /* Contrast: 7.2:1 ✓ */
    --text-muted: #536378;        /* Contrast: 4.8:1 ✓ */
    --text-footer: #1a2332;       /* Contrast: 13.8:1 ✓ */
    --text-footer2: #0c1222;      /* Contrast: 16.5:1 ✓ */
    --text-on-accent: #ffffff;    /* For buttons/badges */
    
    /* ─────────────── Accent Colors (Darkened for Contrast) ─────────────── */
    --accent-cyan: #0891b2;       /* Contrast: 4.5:1 ✓ (was #06b6d4) */
    --accent-cyan-hover: #0e7490; /* Contrast: 5.5:1 ✓ */
    --accent-green: #059669;      /* Contrast: 4.5:1 ✓ (was #10b981) */
    --accent-green-hover: #047857;/* Contrast: 5.8:1 ✓ */
    --accent-purple: #7c3aed;     /* Contrast: 5.4:1 ✓ (was #a855f7) */
    --accent-pink: #db2777;       /* Contrast: 4.6:1 ✓ (was #ec4899) */
    --accent-blue: #0369a1;       /* Contrast: 5.9:1 ✓ */
    
    /* ─────────────── Decorative Accents (Not for text) ─────────────── */
    --accent-cyan-light: #06b6d4;
    --accent-green-light: #10b981;
    --accent-purple-light: #a855f7;
    --neon-green: #02a855;
    /* ─────────────── Gradients ─────────────── */
    --gradient-primary: linear-gradient(135deg, #0891b2 0%, #059669 100%);
    --gradient-secondary: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    --gradient-accent: linear-gradient(135deg, #0e7490 0%, #047857 100%);
    
    /* ─────────────── Borders ─────────────── */
    --border: rgba(6, 182, 212, 0.35);
    --border-light: rgba(6, 182, 212, 0.5);
    --border-strong: rgba(6, 182, 212, 0.6);
    --border-input: #cbd5e1;
    --border-input-focus: #0891b2;
    
    /* ─────────────── Shadows ─────────────── */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06),
                 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08),
                 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12),
                 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-glow-cyan: 0 0 25px rgba(8, 145, 178, 0.35),
                        0 0 50px rgba(8, 145, 178, 0.15);
    --shadow-glow-green: 0 0 25px rgba(5, 150, 105, 0.3);
    
    /* ─────────────── Cards & Features ─────────────── */
    --features-card: rgba(8, 145, 178, 0.08);
    --features-card-hover: rgba(8, 145, 178, 0.12);
    
    /* ─────────────── Icons ─────────────── */
    --icon-neon: #0891b2;
    --icon-secondary: #3d4a5c;
    
    /* ─────────────── States ─────────────── */
    --success: #059669;
    --warning: #d97706;
    --error: #dc2626;
    --info: #0891b2;
    
    /* ─────────────── Scrollbar ─────────────── */
    --scrollbar-track: #e2e8f0;
    --scrollbar-thumb: #94a3b8;
    --scrollbar-thumb-hover: #64748b;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(8, 145, 178, 0.15);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .nav-link {
    color: #1a2332;
    font-weight: 500;
    transition: color 0.3s ease;
}

[data-theme="light"] .nav-link:hover {
    color: #0891b2;
}

[data-theme="light"] .nav-link.active {
    color: #0e7490;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .feature-card,
[data-theme="light"] .service-card,
[data-theme="light"] .testimonial-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(8, 145, 178, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .feature-card:hover,
[data-theme="light"] .service-card:hover,
[data-theme="light"] .testimonial-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(8, 145, 178, 0.4);
    box-shadow: 0 12px 40px rgba(8, 145, 178, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

[data-theme="light"] .feature-card:hover .feature-title {
    transform: translateZ(20px) scale(1.05) rotateX(5deg);
    color: #0e7490;
    text-shadow: 0 2px 10px rgba(8, 145, 178, 0.3);
    letter-spacing: 0.3px;
}

[data-theme="light"] .card-title,
[data-theme="light"] .feature-title,
[data-theme="light"] .service-title {
    color: #0c1222;
}

[data-theme="light"] .card-text,
[data-theme="light"] .feature-description,
[data-theme="light"] .service-description {
    color: #3d4a5c;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.35);
    font-weight: 600;
    transition: all 0.3s ease;
}

[data-theme="light"] .btn-primary:hover {
    background: var(--gradient-accent);
    box-shadow: 0 6px 25px rgba(8, 145, 178, 0.45);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-secondary {
    background: transparent;
    color: #0891b2;
    border: 2px solid #0891b2;
    font-weight: 600;
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(8, 145, 178, 0.1);
    color: #0e7490;
    border-color: #0e7490;
}

[data-theme="light"] .btn-outline {
    background: transparent;
    color: #0891b2;
    border: 1px solid rgba(8, 145, 178, 0.5);
}

[data-theme="light"] .btn-outline:hover {
    background: rgba(8, 145, 178, 0.08);
    border-color: #0891b2;
}

/* ═══════════════════════════════════════════════════════════════
   BACK TO TOP
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .back-to-top {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.4);
    border: none;
}

[data-theme="light"] .back-to-top:hover {
    box-shadow: 0 8px 30px rgba(8, 145, 178, 0.5);
    transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .hero-badge,
[data-theme="light"] .section-badge {
    background: rgba(8, 145, 178, 0.1);
    color: #0e7490; /* Darker for better contrast: 5.5:1 */
    border: 1px solid rgba(8, 145, 178, 0.35);
    font-weight: 600;
}

[data-theme="light"] .badge-success {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
    border: 1px solid rgba(5, 150, 105, 0.3);
}

[data-theme="light"] .badge-warning {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

[data-theme="light"] .badge-error {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   LINKS
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .service-link,
[data-theme="light"] a:not(.btn) {
    color: #0891b2;
    text-decoration: none;
    transition: color 0.2s ease;
}

[data-theme="light"] .service-link:hover,
[data-theme="light"] a:not(.btn):hover {
    color: #0e7490;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .footer {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid rgba(8, 145, 178, 0.15);
}

[data-theme="light"] .footer-links a,
[data-theme="light"] .footer-contact a {
    color: #1a2332;
    transition: color 0.2s ease;
}

[data-theme="light"] .footer-links a:hover,
[data-theme="light"] .footer-contact a:hover {
    color: #0891b2;
}

[data-theme="light"] .footer-title {
    color: #0c1222;
}

[data-theme="light"] .footer-text {
    color: #3d4a5c;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
    background: #ffffff;
    color: #0c1222;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
    outline: none;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: #94a3b8;
}

[data-theme="light"] label {
    color: #1a2332;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .section-title {
    color: #0c1222;
}

[data-theme="light"] .section-subtitle {
    color: #3d4a5c;
}

[data-theme="light"] .section-divider {
    background: linear-gradient(90deg, transparent, #0891b2, transparent);
    opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════
   ICONS & DECORATIVE
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .icon-box {
    background: rgba(8, 145, 178, 0.1);
    color: #0891b2;
    border: 1px solid rgba(8, 145, 178, 0.2);
}

[data-theme="light"] .icon-box:hover {
    background: rgba(8, 145, 178, 0.15);
    box-shadow: 0 0 20px rgba(8, 145, 178, 0.25);
}

[data-theme="light"] .feature-icon {
    color: #0891b2;
    filter: drop-shadow(0 2px 8px rgba(8, 145, 178, 0.3));
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 5px;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
    border-radius: 5px;
    border: 2px solid #e2e8f0;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #64748b 0%, #475569 100%);
}

/* ═══════════════════════════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] ::selection {
    background: rgba(8, 145, 178, 0.25);
    color: #0c1222;
}

[data-theme="light"] ::-moz-selection {
    background: rgba(8, 145, 178, 0.25);
    color: #0c1222;
}

/* ═══════════════════════════════════════════════════════════════
 UTILITIES
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] .text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .border-gradient {
    border-image: var(--gradient-primary) 1;
}

[data-theme="light"] .glow-effect {
    box-shadow: var(--shadow-glow-cyan);
}

[data-theme="light"] .preloader {
    background: rgba(255, 255, 255, 0.39);
}   


/*----------------------------------------------
  2. Reset & Base Styles
----------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: inherit;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    font-size: clamp(14px, 2.5vw, 16px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 10s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--neon-green);
    top: -100px;
    right: -100px;
    opacity: 0.2;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--neon-blue);
    bottom: -50px;
    left: -50px;
    opacity: 0.15;
    animation-delay: -4s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--neon-blue);
    top: 50%;
    left: 50%;
    opacity: 0.1;
    animation-delay: -2s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}
/*----------------------------------------------
  3. Utility Classes
----------------------------------------------*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    max-width: 100%;
    padding: 0 var(--spacing-md);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mt-50 { margin-top: 50px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-50 { margin-bottom: 50px; }

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text2 {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--accent-cyan);
    text-shadow:  #00ffff7c 0 0 16px;
}

/*----------------------------------------------
  4. Buttons
----------------------------------------------*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: var(--shadow-glow-cyan);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 255, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
}

.btn-outline:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.btn-white {
    background: rgba(176, 251, 230, 0.93);
    color: var(--bg-primary);
}

.btn-white:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

/*----------------------------------------------
  5. Preloader
----------------------------------------------*/
.preloader {
    position: fixed;
    inset: 0;
    background: #00000052;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
    transition: opacity 0.7s ease-out, visibility 0.7s;
    backdrop-filter: blur(1px); 
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    position: relative;
}

/* خط اسکنر نئونی —  */
.matrix-loader {
    width: 140px;
    height: 5px;
    background: rgba(0, 255, 100, 0.15);
    border-radius: 3px;
    margin: 0 auto 36px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 255, 100, 0.3);
}

.matrix-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        #00ff41 30%,
        #00f0ff 50%,
        #00ff41 70%,
        transparent 100%
    );
    border-radius: 3px;
    animation: scanGlow 1.9s ease-in-out infinite;
    filter: blur(1px);
    box-shadow: 0 0 25px #0f0, 0 0 50px #0f0;
}

@keyframes scanGlow {
    0%   { transform: translateX(0); }
    100% { transform: translateX(250%); }
}

/* متن فارسی با افکت */
.preloader-content h3 {
    color: #00f0ff;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-shadow: 0 0 15px #00f0ff;
    animation: textPulse 2.2s ease-in-out infinite alternate;
}

@keyframes textPulse {
    from { 
        text-shadow: 0 0 15px #00f0ff;
        opacity: 0.92;
    }
    to { 
        text-shadow: 0 0 30px #00f0ff, 0 0 50px #00f0ff;
        opacity: 1;
    }
}

/* موبایل */
@media (max-width: 480px) {
    .matrix-loader { width: 110px; height: 4px; margin-bottom: 28px; }
    .preloader-content h3 { font-size: 1.25rem; letter-spacing: 0.18em; }
}
/*----------------------------------------------
  6. Matrix Background
----------------------------------------------*/
.matrix-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-matrix-bg);
    opacity: 0.15;
}

.matrix-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--matrix-bg);
    z-index: 0;
    pointer-events: none;
}

/*----------------------------------------------
  7. Progress Bar
----------------------------------------------*/
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
    z-index: calc(var(--z-navbar) + 1);
    width: 0;
}

/*----------------------------------------------
  8. Back to Top
----------------------------------------------*/
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: var(--z-back-to-top);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-glow-cyan);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 255, 0.5);
}

/*----------------------------------------------
  9. Navigation
----------------------------------------------*/
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: var(--z-navbar);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}
.svg-icon svg {
    width: 100%;
    height: 100%;
}
.svg-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-green);
    text-shadow:  #0fff1f7d 0 0 6px;    
    transition: var(--transition-base);
}

.logo i {
    color: var(--accent-green);
    font-size: 1.8rem;
}

.logo:hover {
    transform: scale(1.05);
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-footer2);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-cyan);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-base);
}

.theme-toggle:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    transform: rotate(180deg);
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 30px;
    justify-content: center;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background: var(--accent-cyan);
    border-radius: 2px;
    transition: var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/*----------------------------------------------
  10. Hero Section
----------------------------------------------*/
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 255, 255, 0.1); 
    border: 1px solid var(--accent-cyan);
    border-radius: var(--radius-full);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    margin-bottom: var(--spacing-md);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 255, 255, 0);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border);
}

.stat-item {
    text-align: center;
    font-weight: 700;    
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Hero Visual */
.hero-visual {
    position: relative;
}

.floating-card {
    background: var(--bg-glass);
    backdrop-filter: blur(7px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 21px;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.code-snippet {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-header {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-snippet pre {
    padding: 20px;
    margin: 0;
    direction: ltr;
    text-align: left;
}

.code-snippet code {
    color: var(--accent-green);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Typing Effect */
@keyframes typing {
    from { width: 10%; }
    to { width: 100%; }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--accent-cyan);
    border-radius: 15px;
    margin: 0 auto 10px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 8px;
    }
    100% {
        opacity: 0;
        top: 20px;
    }
}

.scroll-indicator p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/*----------------------------------------------
  11. Section Styles
----------------------------------------------*/
section {
    padding: clamp(60px, 10vw, 100px) 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    border-radius: var(--radius-full);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.section-description {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    line-height: 1.8;
}

/*----------------------------------------------
  12. Features Section
----------------------------------------------*/
.features {
    backdrop-filter: blur(3px) saturate(141%);
    -webkit-backdrop-filter: blur(5px) saturate(141%);
    background-color: rgba(17, 25, 40, 0.13); /* Safari compatibility */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px) brightness(1.7) saturate(141%); /* Blur behind for glassmorphism */
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(0, 255, 255, 0.4);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.1) 0%, 
        rgba(0, 200, 255, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: #00ffff;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 255, 255, 0.6),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
}

.feature-card:hover::before {
    opacity: 0.;
}
.feature-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 2px;
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

.feature-card:hover .feature-title::after {
    width: 70%;
}

/* Icon – Cyan Outline + Inner Glow */
.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    color: var(--icon-neon);
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 20px;
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.4),
        inset 0 0 15px rgba(0, 255, 255, 0.1);
}

.feature-card:hover .feature-icon {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    transform: scale(1.1) rotate(6deg);
}

.feature-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.75rem;
    letter-spacing: -0.3px;
    position: relative;
    z-index: 1;
    display: inline-block;
    transform-style: preserve-3d;
    transition: all 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Smooth 3D-ready transition */
}

/* 3D Zoom + Perspective on Hover */
.feature-card:hover .feature-title {
    transform: 
        translateZ(20px) 
        scale(1.2) 
        rotateX(8deg);
    color: #00ffff;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 30px rgba(0, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/*----------------------------------------------
  13. Services Section
----------------------------------------------*/
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
}

.service-card {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    backdrop-filter: blur(2px) brightness(1.7); /* Blur behind for glassmorphism */
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-base);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--bg-primary);
    margin: 0 auto var(--spacing-md);
    transition: var(--transition-base);
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.service-link {
    color: var(--accent-cyan);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-base);
}

.service-link:hover {
    gap: 12px;
}

/*----------------------------------------------
  14. Portfolio Section
----------------------------------------------*/
.portfolio {
    background: var(--bg-glass); /* شفافیت بالاتر */
    backdrop-filter: blur(5px) saturate(101%);
    -webkit-backdrop-filter: blur(3px) saturate(101%);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.portfolio-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: var(--spacing-xl);
    opacity: 0;
    transition: opacity var(--transition-base);
    
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    backdrop-filter: blur(2px);
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: white;
}

.portfolio-overlay p {
    color: white;
    margin-bottom: var(--spacing-md);
}

.portfolio-btn {
    padding: 10px 24px;
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border-radius: var(--radius-full);
    font-weight: 500;
    transform: translateY(20px);
    transition: all var(--transition-base);
}

.portfolio-item:hover .portfolio-btn {
    transform: translateY(0);
}

.portfolio-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-cyan);
}

/*----------------------------------------------
  15. Testimonials Section
----------------------------------------------*/
.testimonials {
    background: var(--bg-glass); /* شفافیت بالاتر */
    backdrop-filter: blur(6px) saturate(101%);
    -webkit-backdrop-filter: blur(3px) saturate(101%);

}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
}

.testimonial-card {
    background: linear-gradient(135deg, var(--bg-glass), rgba(201, 255, 232, 0.027)); /* گرادیان نئون برای عمق LCD */
    backdrop-filter: blur(6px) brightness(2.2) hue-rotate(180deg) saturate(141%);
    -webkit-backdrop-filter: blur(3px) saturate(141%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    transition: all var(--transition-base);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-md);
}

.testimonial-rating {
    display: flex;
    gap: 5px;
    margin-bottom: var(--spacing-md);
}

.testimonial-rating i {
    color: #fbbf24;
    font-size: 1.1rem;
}

.testimonial-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-cyan);
}

.testimonial-author h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.testimonial-author p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/*----------------------------------------------
  16. CTA Section
----------------------------------------------*/
.cta {
    backdrop-filter: blur(3px) saturate(141%);
    -webkit-backdrop-filter: blur(5px) saturate(141%);
    background-color: rgba(17, 25, 40, 0.13); /* Safari compatibility */
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-2xl) 0;
}

.cta-title {
    font-size: clamp(1.8rem, 5vw, 2rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
}

/*----------------------------------------------
  17. Footer
----------------------------------------------*/
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: clamp(40px, 8vw, 60px) 0 30px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: var(--spacing-md);
}

.footer-logo i {
    color: var(--accent-green);
    font-size: 1.8rem;
}

.footer-description {
    color: var(--text-footer2);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.footer-social {
    display: flex;
    margin-top: 20px;
    gap: var(--spacing-sm);
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-footer);
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    color: var(--accent-cyan);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-footer2);
    transition: var(--transition-base);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-cyan);
    transform: translateX(-5px);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-footer2);
}

.footer-contact i {
    color: var(--accent-cyan);
    margin-top: 4px;
    flex-shrink: 0;
}

.footer-contact a {
    color: var(--text-footer2);
    transition: var(--transition-base);
}

.footer-contact a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    color: var(--text-footer);
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.footer-bottom-links a {
    color: var(--text-footer);
    transition: var(--transition-base);
}

.footer-bottom-links a:hover {
    color: var(--accent-cyan);
}

/*----------------------------------------------
  18. Scrollbar
----------------------------------------------*/
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}
/* اجازه خروج دایره‌ها از کادر */
.portfolio-grid,
.container,
.row,
.col-lg-4,
.col-md-6 {
    overflow: visible !important;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-secondary);
}

/*-------------------- 3D Card Styles  --------------------*/
/* Root variables for easy customization */
:root {
    --prime_color: #e4fff8;
    --card-size: 300px; /* Base size for desktop */
    --card-border-radius: 50px;
    --glass-inset: 8px;
    --circle-opacity: 0.2;
    --avatar-size: 150px;
    --p_color: #64ff64;
    --avatar-border: rgba(255, 0, 255, 0.404); 
    --fontawesome-color: #004601f8;
    --linear-gradient-card: linear-gradient(135deg, #07453f5f, #023d393f);
    --linear-gradient-glass: linear-gradient(180deg, transparent 0%, rgba(21, 165, 149, 0.24) 40%, rgba(0, 255, 94, 0.2));

}

[data-theme="light"] {
    --prime_color: #ffffff;
    --p_color: #004601;
    --avatar-border: rgba(0, 255, 255, 0.7);     
    --fontawesome-color: #00a703f8;
    --linear-gradient-card: linear-gradient(135deg, #a0f4f0bf, #64ff64bf);
    --linear-gradient-glass: linear-gradient(rgba(0, 255, 115, 0.393), rgba(0, 255, 136, 0.25));
}
.instructors-wrapper {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 2.5rem;
            margin-top: 3rem;
            padding: 0 1rem;
        }
/* Container - Flexible and responsive */
.rayen3d-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;    
    width: 100%;
    max-width: var(--card-size);
    max-height: 400px;
    aspect-ratio: 1 / 2; /* Square aspect ratio */
    perspective: 1000px;
    margin: 53px auto; /* Center if needed */
    direction: ltr; /* Force LTR to prevent RTL interference */
}

/* Card base */
.rayen3d-card {
    width: 100%;
    height: 80%; /* استفاده از 100% ارتفاع کانتینر */
    border-radius: var(--card-border-radius);
    background: linear-gradient(135deg, #6a0c5339, #00aaaa3f);
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
    transform-style: preserve-3d;
    box-shadow:
        rgba(0, 255, 255, 0) 40px 50px 25px,
        rgba(16, 44, 38, 0.2) 0px 25px 25px;
    direction: ltr;
}

/* Avatar - Professional photo placeholder */
.rayen3d-avatar {
    position: absolute;
    top: clamp(40px, 10vw, 60px); /* Responsive top positioning */
    left: 40%;
    transform: translateX(-50%) translateZ(10px); /* Center and 3D lift */
    width: 60%; /* Responsive size */
    height: 60%;
    border-radius: 11%;
    object-fit: cover; /* Ensure image fits perfectly */
    border: 3px solid rgba(0, 255, 255, 0.45); /* Subtle border */
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2); /* Inner glow */
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
    z-index: 10; /* Above content */
}
/* Glass overlay */
.rayen3d-glass {
    transform-style: preserve-3d;
    position: absolute;
    inset: var(--glass-inset);
    background: var(--linear-gradient-glass);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);    
    border-radius: calc(var(--card-border-radius) + 5px);
    border-top-right-radius: 100%;
    border-left: 1px solid rgba(134, 255, 229, 0.349);
    border-bottom: 1px solid rgb(183, 250, 255);
    transition: transform 0.5s ease-in-out;
    transform: translateZ(25px);
    direction: ltr; 
}

/* Logo circles - Scaled with container */
.rayen3d-logo {
    position: absolute;
    right: 0;
    top: 0;
    transform-style: preserve-3d;
    width: 50%;
    height: 50%;
    direction: ltr;
}

.rayen3d-logo .rayen3d-circle {
    position: absolute;
    aspect-ratio: 1;
    border-radius: 40%;
    background: rgba(0, 255, 255, var(--circle-opacity));
    top: 0;
    right: 0;
    box-shadow: rgba(100, 100, 111, 0.2) -10px 10px 20px;
    transition: transform 0.5s ease-in-out;
    backdrop-filter: blur(5px);
}

/* Circle sizes as percentages of container for scalability */
.rayen3d-logo .rayen3d-circle1 {
    width: 57%; /* 170/300 */
    transform: translateZ(25px);
    top: var(--glass-inset);
    right: var(--glass-inset);
    transition-delay: 0s;
}

.rayen3d-logo .rayen3d-circle2 {
    width: 47%; /* 140/300 */
    transform: translateZ(40px);
    top: calc(var(--glass-inset) * 1.25);
    right: calc(var(--glass-inset) * 1.25);
    transition-delay: 0.4s;    
}

.rayen3d-logo .rayen3d-circle3 {
    width: 37%; /* 110/300 */
    transform: translateZ(60px);
    top: calc(var(--glass-inset) * 2.125);
    right: calc(var(--glass-inset) * 2.125);
    transition-delay: 0.8s;
}

.rayen3d-logo .rayen3d-circle4 {
    width: 27%; /* 80/300 */
    transform: translateZ(80px);
    top: calc(var(--glass-inset) * 2.875);
    right: calc(var(--glass-inset) * 2.875);
    transition-delay: 1.2s;
}

.rayen3d-logo .rayen3d-circle5 {
    width: 16%; /* 50/300 */
    transform: translateZ(100px);
    top: calc(var(--glass-inset) * 3.75);
    right: calc(var(--glass-inset) * 3.75);
    transition-delay: 1.6s;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-cyan);
    text-shadow:0px 0px 1px #64ff64b2;
    font-size: clamp(1rem, 4vw, 1.5rem); /* Responsive icon size */
}

/* Content area - Responsive padding and left-aligned */
.rayen3d-content {
    padding: clamp(20%, 20%, 25%) clamp(10%, 10%, 15%) 0 clamp(10%, 10%, 10%);
    height: 100%;
    display: flex;
    margin-top: 55px;    
    flex-direction: column;
    justify-content: flex-start;
    text-align: left; /* Force left alignment */
    will-change: transform;   
    direction: ltr;

/* top positioning */
    transform: translateX(0%) translateZ(10px); 
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
    z-index: 10; /* Above content */    
}
.rayen3d-content:hover {
    transform: translateY(-8%) translateZ(15px);

}
.rayen3d-content h1 {
    color: var(--prime_color);
    text-shadow: 2px #64ff64;
    font-weight: 900;
    font-size: clamp(1.3rem, 5vw, 1.3rem); /* Responsive title */
    margin-bottom: 0.5rem;
    padding-top: 12px;
    text-align: left;    
}

.rayen3d-content p {
    color: #0fffff;
    font-size: clamp(0.875rem, 4vw, 0.9375rem); /* Responsive text */
    line-height: 1.4;
    text-align: left;    
}

/* Footer - Responsive positioning and left-aligned */
.rayen3d-footer {
    transform-style: preserve-3d;
    position: absolute;
    bottom: clamp(1rem, 5vw, 1.25rem);
    left: clamp(10%, 10%, 10%);
    right: clamp(10%, 10%, 10%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    direction: ltr;
    text-align: left;
}

.rayen3d-footer .rayen3d-link {
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
    font-size: clamp(0.75rem, 3vw, 0.875rem);
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    text-align: left;
}

.rayen3d-footer .rayen3d-link:hover {
    transform: translateZ(10px);
    color: var(--prime_color);
}

.rayen3d-footer .rayen3d-social {
    transform-style: preserve-3d;
    display: flex;
    gap: clamp(0.5rem, 2vw, 0.625rem);
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: flex-start; /* Left-align social icons */
    direction: ltr;
}

.rayen3d-footer .rayen3d-social .rayen3d-social_icons {
    display: inline-flex;
    width: clamp(1.5rem, 6vw, 1.875rem);
    height: clamp(1.5rem, 6vw, 1.875rem);
    background: #54045f73;
    color: #0fffff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: rgba(236, 94, 255, 0.205) 7px 7px 5px;
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}

.rayen3d-footer .rayen3d-social .rayen3d-social_icons:nth-child(1) {
    transition-delay: 0.2s;
}

.rayen3d-footer .rayen3d-social .rayen3d-social_icons:nth-child(2) {
    transition-delay: 0.4s;
}

.rayen3d-footer .rayen3d-social .rayen3d-social_icons:nth-child(3) {
    transition-delay: 0.6s;
}

/* Hover Effects - Preserve on all devices (touch-friendly) */
.rayen3d-container:hover .rayen3d-card,
.rayen3d-container:focus-within .rayen3d-card {
    transform: rotate3d(1, 1, 0, 25deg);
    box-shadow: 0 5px 45px rgba(0, 204, 255, 0.342);
}

.rayen3d-container:hover .rayen3d-card .rayen3d-footer .rayen3d-social .rayen3d-social_icons,
.rayen3d-container:focus-within .rayen3d-card .rayen3d-footer .rayen3d-social .rayen3d-social_icons {
    transform: translateZ(50px);
    box-shadow: rgba(5, 71, 17, 0.2) -5px 20px 10px;
}

.rayen3d-container:hover .rayen3d-card .rayen3d-logo .rayen3d-circle2,
.rayen3d-container:focus-within .rayen3d-card .rayen3d-logo .rayen3d-circle2 {
    transform: translateZ(60px);
}

.rayen3d-container:hover .rayen3d-card .rayen3d-logo .rayen3d-circle3,
.rayen3d-container:focus-within .rayen3d-card .rayen3d-logo .rayen3d-circle3 {
    transform: translateZ(80px);
}

.rayen3d-container:hover .rayen3d-card .rayen3d-logo .rayen3d-circle4,
.rayen3d-container:focus-within .rayen3d-card .rayen3d-logo .rayen3d-circle4 {
    transform: translateZ(100px);
}

.rayen3d-container:hover .rayen3d-card .rayen3d-logo .rayen3d-circle5,
.rayen3d-container:focus-within .rayen3d-card .rayen3d-logo .rayen3d-circle5 {
    transform: translateZ(120px);
}

/* آواتار دایره‌ای نئونی — فقط با هاور ظاهر میشه */
.rayen3d-avatar-circle {
    position: absolute;
    top: 55px;
    left: 42%;
    transform: translateX(-90%) translateZ(-100px) translateY(5px) scale(0.8);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: visible;
    border: 6px solid transparent;
    will-change: transform, opacity;
    backface-visibility: hidden;  
    border-color: var(--avatar-border);      
    opacity: 1;
    pointer-events: none;
    z-index: 999;
    transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transform-style: preserve-3d;
}

.rayen3d-avatar-circle img {
    position: absolute;
    width: 110%;                 
    height: 130%;                 
    object-fit:cover ;
    border-radius: 45%;
    will-change: transform, opacity;  
    backface-visibility: hidden;      
    bottom: 2%;                
    left: 50%;
    transform: translateX(-50%) translateY(6%) translateZ(20px) scale(0.9);
    filter: brightness(1.1) contrast(1.3);
    transition: transform 0.6s ease;
    
}

.rayen3d-container:hover .rayen3d-avatar-circle,
.rayen3d-container:focus-within .rayen3d-avatar-circle {
    opacity: 1;
    transform: translateX(-60%) translateZ(80px) translateY(-35px) scale(1);
    border-color: var(--avatar-border);
      
}

.rayen3d-container:hover .rayen3d-avatar-circle img,
.rayen3d-container:focus-within .rayen3d-avatar-circle img {
    transform: translateX(-50%) translateZ(50px) scale(1.06) translateY(-3px);
}

/* ==============================================
 * rayen3d-product-circle 
 ============================================== */

.rayen3d-product-circle {
    position: absolute;
    top: -42px;
    left: 50%;
    width: 195px;
    height: 195px;
    background: transparent;
    overflow: visible;
    opacity: 1;
    pointer-events: none;
    z-index: 999;

    /* اصلاح کلیدی: transform کامل و دقیق */
    transform: translateX(-85%) translateY(95px) translateZ(10px) scale(0.78);
    transform-style: preserve-3d;
    transform-origin: center center;

    /* بهینه‌سازی عملکرد و جلوگیری از پرش */
    will-change: transform, opacity;
    backface-visibility: hidden;

    transition: 
        opacity 1.5s cubic-bezier(0.23, 1, 0.32, 1),
        transform 1.1s cubic-bezier(0.23, 1, 0.32, 1);
}

/* خود محصول (PNG شفاف) */
.rayen3d-product-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    filter: 
        drop-shadow(0 0 5px rgba(0, 255, 200, 0.3))
        drop-shadow(0 0 15px rgba(0, 220, 255, 0.2));

    /* transform کامل در حالت اولیه */
    transform: translateZ(40px) rotateX(8deg) rotateY(0deg) scale(1);
    transform-origin: center center;

    /* بهینه‌سازی‌های مهم ضد پرش و deform */
    will-change: transform, filter;
    backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;   /* جلوگیری از deform تصویر */

    transition: 
        transform 1.1s cubic-bezier(0.23, 1, 0.32, 1),
        filter 1.1s cubic-bezier(0.25, 1, 0.35, 1);
}

/* Hover → محصول به جلو می‌آید */
.rayen3d-container:hover .rayen3d-product-circle,
.rayen3d-container:focus-within .rayen3d-product-circle {
    opacity: 1;
    transform: translateX(-75%) translateY(20%) translateZ(125px) scale(1.06);
}

.rayen3d-container:hover .rayen3d-product-circle img,
.rayen3d-container:focus-within .rayen3d-product-circle img {
    transform: translateZ(92px) rotateX(14deg) rotateY(9deg) scale(1.08);
    filter: 
        drop-shadow(0 0 8px rgba(0, 255, 200, 0.6))
        drop-shadow(0 0 20px rgba(0, 235, 255, 0.3))
        drop-shadow(0 0 55px rgba(200, 0, 255, 0.2))
        brightness(1.12) contrast(1.18);
}

/* دکمه مشاهده محصول - فقط هنگام هاور ظاهر می‌شود */
.view-product-btn {
    position: absolute;
    bottom: 70px;               /* فاصله از پایین کارت */
    left: 50%;
    transform: translateX(33%) translateY(10px) rotateY(60deg) rotateX(40deg) rotateZ(20deg);   /* ابتدا کمی پایین‌تر */
    z-index: 10;                /* بالاتر از پس‌زمینه اما پایین‌تر از ماوس‌گیرهای دیگر */
    overflow: hidden;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 0.65rem 1.5rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: #e0f7ff;
    text-decoration: none;
    background: rgba(10, 50, 80, 0.4);
    border: 1px solid rgba(0, 220, 255, 0.35);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    
    opacity: 0;
    pointer-events: none;       /* ابتدا غیرقابل کلیک */
    transition: 
        opacity 0.35s ease,
        transform 1.5s cubic-bezier(0.23, 1, 0.4, 1);
}

.rayen3d-container:hover .view-product-btn {
    opacity: 1;
    transform: translateX(-5%) translateY(0);
    pointer-events: auto;       /* حالا قابل کلیک می‌شود */
    background: rgba(10, 70, 110, 0.65);
    border-color: rgba(0, 220, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 220, 209, 0.4)
}

/* حالت فعال (کلیک) */
.view-product-btn:active {
    transform: translateX(-50%) translateY(2px) scale(0.97);
    box-shadow: 0 3px 12px rgba(0, 180, 220, 0.3);
}

/* افکت درخشش اختیاری (سبک و کم‌رنگ) */
.view-product-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(100, 240, 255, 0.25), transparent);
    opacity: 0;
    transition: opacity 0.6s;
}

.view-product-btn:hover {
    border: 2px solid rgba(0, 220, 255, 0.7);
    box-shadow: 0 3px 12px rgba(0, 255, 255, 0.4);    

}
.rayen3d-container:hover .view-product-btn::before {
    opacity: 1;
    animation: shine 2.5s infinite linear;
}

@keyframes shine {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(120%);  }
}
/* Media Queries for Responsiveness */

/* Mobile: < 600px - Smaller, stacked if needed */
@media (max-width: 599px) {
    :root {
        --card-size: 250px;
        --glass-inset: 6px;
    }
    
    .rayen3d-container {
        max-width: 90%;
        /* aspect-ratio: 1 / 1; */
        height: 350px;
    }
    
    .rayen3d-content {
        padding: clamp(25%, 12%, 17%) 15% 0 8%;
        text-align: right;
    }
    .rayen3d-content h1{
        text-align: right;
    } 
    .rayen3d-content p{
        text-align: right;
    }
    
    .rayen3d-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        bottom: 1rem;
        justify-content: flex-start; /* Left-align in stacked mode */
    }
    
    .rayen3d-footer .rayen3d-social {
        order: 2;
        width: 100%;
        justify-content: flex-start;
    }
    .rayen3d-avatar-circle {
        top: -5px;   
    }
    .rayen3d-product-circle{
        top: -90px;   
    }             
    /* Reduce hover tilt on mobile for better touch */
    .rayen3d-container:hover .rayen3d-card,
    .rayen3d-container:focus-within .rayen3d-card {
        transform: rotate3d(1, 1, 0, 15deg);
    }
}

/* Tablet: 600px - 1023px - Medium adjustments */
@media (min-width: 600px) and (max-width: 1023px) {
    :root {
        --card-size: 280px;
    }
    
    .rayen3d-container {
        max-width: 280px;
    }
    
    .rayen3d-content {
        padding: clamp(40%, 15%, 27%) 8% 0 8%;
        text-align: left;
    }
    
    .rayen3d-footer .rayen3d-social {
        gap: 0.75rem;
        justify-content: flex-start;
    }
}

/* Desktop: > 1024px - Full size */
@media (min-width: 1024px) {
    :root {
        --card-size: 320px; /* Slightly larger for big screens */
    }
    
    .rayen3d-container {
        max-width: var(--card-size);
    }
    
    .rayen3d-content {
        padding: 100px 60px 0 30px; /* Fallback to original for precision */
        text-align: left;
    }
}

/* High DPI/Retina displays - Enhance shadows */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .rayen3d-card,
    .rayen3d-circle {
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); /* Subtle inner glow */
    }
}
/* ==================== WhatsApp Floating Button ==================== */
        .whatsapp-float {
            position: fixed;
            width: 60px;
            height: 60px;
            bottom: 30px;
            left: 30px; 
            background-color: #25D366;
            color: #FFF;
            border-radius: 50px;
            text-align: center;
            font-size: 30px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            z-index: 1000;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .whatsapp-float:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
            background-color: #1ebe57;
        }

        .whatsapp-float i {
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.15); }
            100% { transform: scale(1); }
        }

        @media (max-width: 768px) {
            .whatsapp-float {
                width: 55px;
                height: 55px;
                font-size: 28px;
                bottom: 20px;
                left: 20px;
            }
        }
