:root {
    --bg-color: #0a0a12;
    --text-color: #e0e0e0;
    --primary-color: #00ff9d;
    --secondary-color: #00b8ff;
    --accent-color: #ff0055;
    --card-bg: #161625;
    --font-main: 'Vazirmatn', sans-serif;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
}

@font-face {
    font-family: 'ArcanTech';
    src: url('../../font/Arcan-V1.0/Arcan-Tech.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Arcan';
    src: url('../../font/Arcan-V1.0/Arcan-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Shabnam';
    src: url('../../font/shabnam-font-v5.0.1/Farsi-Digits/Shabnam-Medium-FD.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Samim';
    src: url('../../font/samim-font-v4.0.5/Farsi-Digits/Samim-FD.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* /www/wwwroot/r123.ir/font/samim-font-v4.0.5/Farsi-Digits/Samim-FD.ttf */
/* /www/wwwroot/r123.ir/font/shabnam-font-v5.0.1/Farsi-Digits/Shabnam-Medium-FD.ttf */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    /* Fallback background color */
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 10, 18, 0.4) 0%, rgba(5, 5, 10, 0.95) 100%);
    z-index: -1;
    pointer-events: none;
}



canvas.vanta-canvas {
    z-index: -2 !important;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 900;
    margin-bottom: 20px;
    font-family: 'samim';
}

h1 {
    font-size: 4rem;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
    font-family: 'samim';
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-family: 'samim';
}

.highlight {
    /* color: var(--secondary-color);
    text-shadow: 0 0 15px var(--secondary-color), 0 0 30px var(--secondary-color); */

    color: #000000;
    text-shadow: 0 0 15px #1d87d5, 0 0 30px #0d528f;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: #000;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--primary-color);
}

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    font-family: var(--font-main);
}

/* ═══════════════════════════════════════════════════════════
   PREMIUM LOADER 
   ═══════════════════════════════════════════════════════════ */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0d0d1a 0%, #050510 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
}

.loader-content {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    z-index: 2;
}

#about .section-title {
    font-family: 'ArcanTech', sans-serif;
    font-weight: normal;
    letter-spacing: 1px;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
}

#about .section-title .highlight-text {
    font-family: var(--font-main);
    font-weight: 900;
    letter-spacing: normal;
    text-shadow: none;
}

/* ── Floating Particles ── */
.loader-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0;
    animation: particleDrift 4s infinite ease-in-out;
}

.particle:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 3.5s;
}

.particle:nth-child(2) {
    left: 25%;
    top: 70%;
    animation-delay: 0.5s;
    animation-duration: 4s;
    background: var(--secondary-color);
}

.particle:nth-child(3) {
    left: 60%;
    top: 15%;
    animation-delay: 1s;
    animation-duration: 3s;
}

.particle:nth-child(4) {
    left: 80%;
    top: 60%;
    animation-delay: 1.5s;
    animation-duration: 4.5s;
    background: var(--secondary-color);
}

.particle:nth-child(5) {
    left: 45%;
    top: 85%;
    animation-delay: 0.3s;
    animation-duration: 3.8s;
}

.particle:nth-child(6) {
    left: 90%;
    top: 30%;
    animation-delay: 0.8s;
    animation-duration: 4.2s;
    background: var(--secondary-color);
}

.particle:nth-child(7) {
    left: 15%;
    top: 50%;
    animation-delay: 1.2s;
    animation-duration: 3.2s;
}

.particle:nth-child(8) {
    left: 70%;
    top: 40%;
    animation-delay: 0.6s;
    animation-duration: 3.6s;
    background: var(--secondary-color);
}

@keyframes particleDrift {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }

    20% {
        opacity: 0.8;
        transform: translateY(-20px) scale(1);
    }

    80% {
        opacity: 0.4;
        transform: translateY(-80px) scale(0.6);
    }

    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0);
    }
}

/* ── Neon Spinner Rings ── */
.loader-spinner {
    position: relative;
    width: 180px;
    height: 180px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-color);
    border-right: 3px solid var(--secondary-color);
    animation: spinRing 1.2s linear infinite;
    box-shadow:
        0 0 15px rgba(0, 255, 157, 0.3),
        0 0 30px rgba(0, 255, 157, 0.1),
        inset 0 0 15px rgba(0, 184, 255, 0.1);
}

.spinner-ring.ring-2 {
    inset: 12px;
    border-top-color: var(--secondary-color);
    border-right-color: var(--primary-color);
    animation-direction: reverse;
    animation-duration: 1.8s;
    box-shadow:
        0 0 15px rgba(0, 184, 255, 0.3),
        0 0 30px rgba(0, 184, 255, 0.1),
        inset 0 0 15px rgba(0, 255, 157, 0.1);
}

@keyframes spinRing {
    to {
        transform: rotate(360deg);
    }
}

/* ── 3D Flip Number Cards ── */
.loader-numbers {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 600px;
}

.number-card {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: rotateY(90deg) scale(0.5);
    transition: none;
}

.number-card.active {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
    animation: flipIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.number-card.exit {
    animation: flipOut 0.35s cubic-bezier(0.55, 0, 0.67, 0.19) forwards;
}

.num-text {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 25px rgba(0, 255, 157, 0.5));
    text-shadow: none;
}

@keyframes flipIn {
    0% {
        opacity: 0;
        transform: rotateY(90deg) scale(0.5);
    }

    100% {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
    }
}

@keyframes flipOut {
    0% {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: rotateY(-90deg) scale(0.5);
    }
}

/* ── Logo Reveal with Glow ── */
.loader-logo-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
}

.loader-logo-wrapper.active {
    opacity: 1;
    animation: logoRevealIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.logo-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 157, 0.3), rgba(0, 184, 255, 0.1), transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
    pointer-events: none;
}

.loader-logo {
    width: 120px;
    height: auto;
    position: relative;
    z-index: 2;
    filter: brightness(1.3) drop-shadow(0 0 20px rgba(0, 255, 157, 0.4));
}

@keyframes logoRevealIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(-10deg);
    }

    60% {
        transform: translate(-50%, -50%) scale(1.1) rotate(2deg);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* ── Progress Bar ── */
.loader-progress {
    width: 260px;
    margin-top: 10px;
}

.progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShimmer 1.5s infinite;
}

.progress-glow {
    position: absolute;
    top: -4px;
    left: 0;
    width: 0%;
    height: 12px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 157, 0.4), transparent);
    border-radius: 6px;
    filter: blur(4px);
    transition: width 0.3s ease;
}

@keyframes progressShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

/* ── Loading Text ── */
.loader-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: 500;
}

.dot-anim {
    display: inline-block;
    animation: dotBlink 1.4s steps(4, end) infinite;
    width: 20px;
    text-align: left;
    overflow: hidden;
    vertical-align: bottom;
}

@keyframes dotBlink {
    0% {
        width: 0;
    }

    25% {
        width: 7px;
    }

    50% {
        width: 14px;
    }

    75%,
    100% {
        width: 20px;
    }
}

/* ── Loader Hide Transition ── */
.loader.hidden-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

/* ── Loader Responsive ── */
@media (max-width: 768px) {
    .loader-spinner {
        width: 140px;
        height: 140px;
    }

    .loader-numbers {
        width: 140px;
        height: 140px;
    }

    .loader-logo-wrapper {
        width: 140px;
        height: 140px;
    }

    .num-text {
        font-size: 3.5rem;
    }

    .loader-logo {
        width: 90px;
    }

    .loader-progress {
        width: 200px;
    }

    .logo-glow {
        width: 150px;
        height: 150px;
    }
}


/* Navbar */
.navbar {
    padding: 10px 0;
    /* Reduced padding to accommodate larger logo without huge header */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 18, 0.95);
    /* Slightly less transparent for better contrast */
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    /* Added shadow for separation */
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.logo img {
    height: 90px;
    /* Much larger */
    width: auto;
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: 0.3s;
    display: block;
}

.logo img:hover {
    filter: brightness(1.6) drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
    transform: scale(1.1);
}

/* Premium Desktop Floating Menu */
@media (min-width: 992px) {
    .navbar {
        top: 25px;
        width: fit-content;
        min-width: 600px;
        /* Prevent it from being too squashed */
        left: 50%;
        transform: translateX(-50%);
        border-radius: 50px;
        padding: 10px 40px;
        background: rgba(15, 15, 25, 0.5);
        /* More transparent for glass effect */
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.05) inset;
        transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .navbar:hover {
        background: rgba(15, 15, 25, 0.7);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset;
        transform: translateX(-50%) translateY(-2px);
    }

    .navbar .container {
        width: auto;
        max-width: none;
        padding: 0;
        gap: 50px;
    }

    .nav-links {
        gap: 35px;
    }

    .nav-links a {
        position: relative;
        padding: 8px 0;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.8);
        transition: 0.3s;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .nav-links a i {
        font-size: 1.2rem;
        color: var(--secondary-color);
        transition: 0.3s;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: #fff;
    }

    .nav-links a:hover i,
    .nav-links a.active i {
        color: var(--primary-color);
        text-shadow: 0 0 10px var(--primary-color);
        transform: scale(1.1);
    }

    /* Animated underline */
    .nav-links a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        /* Align right for RTL? default is LTR direction in CSS unless specified */
        right: 0;
        height: 2px;
        background: var(--primary-color);
        transform: scaleX(0);
        transform-origin: right;
        /* RTL friendly */
        transition: transform 0.3s ease;
        box-shadow: 0 0 10px var(--primary-color);
        border-radius: 2px;
    }

    .nav-links a:hover::after,
    .nav-links a.active::after {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    /* Space for navbar */
}

.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image img,
.hero-image video {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 255, 157, 0.2));
    animation: float 6s ease-in-out infinite;
    border-radius: 20px;
    /* added for video rounded corners */
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-title {
    margin-bottom: 20px;
    font-family: 'Shabnam', sans-serif;
}

.hero-subtitle {
    font-size: 1.3rem;
    line-height: 1.9;
    color: #e0e0e0;
    margin-bottom: 30px;
    max-width: 90%;
}

.hero-subtitle strong {
    color: var(--primary-color);
    font-weight: 900;
    font-size: 1.4rem;
    text-shadow: 0 0 15px rgba(0, 255, 157, 0.4);
    display: inline-block;
    margin-top: 5px;
}

.hero-bg-numbers {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    z-index: -1;
    display: flex;
    gap: 100px;
    pointer-events: none;
}

/* Section General */
.section {
    padding: 100px 0;
}

/* Glassmorphism Utility */
.glass-effect {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

/* About Section Premium Layout */
.about-card {
    padding: 0;
    /* Reset padding for the grid */
    border-radius: 40px;
    background: rgba(20, 20, 35, 0.4);
    backdrop-filter: blur(40px) saturate(140%);
    -webkit-backdrop-filter: blur(40px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
    overflow: hidden;
    /* For the decorative elements */
    position: relative;
    max-width: 960px;
    margin: 0 auto;
}

.about-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transform: translateY(-5px);
}

.about-grid {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 0;
    min-height: 380px;
}

/* Visual Side (Left/Right depending on RTL) */
.about-visual {
    background: radial-gradient(circle at top right, rgba(0, 255, 157, 0.15), transparent 60%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gradient-sphere {
    width: 220px;
    height: 220px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.35;
    animation: floatSphere 8s ease-in-out infinite;
    position: absolute;
    z-index: 0;
}

@keyframes floatSphere {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

.floating-badge {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

.floating-badge i {
    display: block;
    font-size: 2.4rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    filter: drop-shadow(0 0 12px rgba(0, 255, 157, 0.5));
}

.floating-badge span {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Content Side */
.about-content {
    padding: 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.about-content .section-title {
    font-size: 1.7rem;
    line-height: 1.4;
    margin-bottom: 16px;
    background: none;
    -webkit-text-fill-color: initial;
    color: #fff;
    text-align: right;
}

.highlight-text {
    color: transparent;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 900;
    position: relative;
    display: inline-block;
}

.about-content .section-desc {
    font-size: 1.05rem;
    font-weight: 600;
    color: #d0d0d0;
    margin-bottom: 14px;
    line-height: 1.7;
    text-align: right;
    border-right: 3px solid var(--primary-color);
    padding-right: 16px;
}

.text-block p {
    font-size: 0.92rem;
    line-height: 1.85;
    color: #b8b8b8;
    margin-bottom: 10px;
    text-align: justify;
}

.slogan-box {
    margin-top: 18px;
    background: linear-gradient(90deg, rgba(0, 255, 157, 0.1), transparent);
    padding: 14px 18px;
    border-radius: 12px;
    border-right: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
}

.slogan-box:hover {
    background: linear-gradient(90deg, rgba(0, 255, 157, 0.2), transparent);
    transform: translateX(-5px);
}

.slogan-box i {
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.about-slogan {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
}

/* Responsive for About Grid */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-visual {
        min-height: 200px;
    }

    .about-content {
        padding: 28px 24px;
        text-align: right;
    }

    .about-content .section-title,
    .about-content .section-desc {
        text-align: right;
    }
}

/* Services Layout */
.services-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
}

.services-visual {
    flex: 1;
    text-align: right;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-desc {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 40px;
    max-width: 400px;
}

.services-main-img {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 20px;
    /* mix-blend-mode: screen;  Optional based on image */
    filter: drop-shadow(0 0 30px rgba(0, 184, 255, 0.2));
    animation: float 5s ease-in-out infinite reverse;
}

.services-grid-content {
    flex: 1.5;
}

/* Grid System */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.card {
    background: rgba(22, 22, 37, 0.6);
    /* Semi-transparent fallback */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Card Hover Effects */
.card:hover {
    background: rgba(22, 22, 37, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.15);
    transform: translateY(-10px);
}

.icon-box {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--secondary-color);
}

.card:hover .icon-box {
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--primary-color);
    animation: bounce 0.5s;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Process Section */
/* Process Section */
.process-steps {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
    padding: 40px 0;
}

/* Connecting Line */
.process-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, transparent, var(--primary-color), var(--secondary-color), transparent);
    transform: translateX(-50%);
    box-shadow: 0 0 15px var(--primary-color);
    z-index: 0;
}

.step {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
    perspective: 1000px;
}

/* Alternating Layout - Odd Steps (1, 3) to the Right */
.step:nth-child(odd) {
    justify-content: flex-start;
    padding-right: 50%;
    direction: ltr;
    /* Ensure flex flow is intuitive for positioning */
}

/* Make sure inner content is RTL for Persian */
.step:nth-child(odd) .step-card {
    direction: rtl;
    margin-left: auto;
    /* Push to center line */
    margin-right: 40px;
    /* Gap from center */
}

/* Even Steps (2) to the Left */
.step:nth-child(even) {
    justify-content: flex-end;
    padding-left: 50%;
    direction: ltr;
}

.step:nth-child(even) .step-card {
    direction: rtl;
    margin-right: auto;
    margin-left: 40px;
}

/* The Card */
.step-card {
    background: rgba(22, 22, 37, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 20px;
    max-width: 450px;
    width: 100%;
    position: relative;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
    transform-style: preserve-3d;
}

.step-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    border-color: var(--primary-color);
}

/* Connector Dot */
.step::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
    z-index: 2;
    transition: 0.3s;
}

.step:hover::before {
    transform: translate(-50%, -50%) scale(1.5);
    background: #fff;
    box-shadow: 0 0 30px #fff, 0 0 60px var(--primary-color);
}

/* Content Styling */
.step-icon-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.step-number-3d {
    font-size: 4rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.1);
    position: relative;
    line-height: 1;
    font-family: var(--font-main);
}

.step-card:hover .step-number-3d {
    -webkit-text-stroke: 2px var(--primary-color);
    filter: drop-shadow(0 0 10px var(--primary-color));
}

.step-icon-box i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    filter: drop-shadow(0 0 10px var(--secondary-color));
    transition: 0.3s;
}

.step-card:hover .step-icon-box i {
    transform: scale(1.2) rotate(10deg);
    color: #fff;
    filter: drop-shadow(0 0 20px var(--secondary-color));
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.step-content p {
    color: #aaa;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .process-line {
        left: 20px;
        transform: none;
    }

    .step:nth-child(odd),
    .step:nth-child(even) {
        justify-content: flex-start;
        padding: 0;
        padding-left: 50px;
        direction: rtl;
        /* Reset direction */
    }

    .step:nth-child(odd) .step-card,
    .step:nth-child(even) .step-card {
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    .step::before {
        left: 20px;
    }
}

/* Old Contact Styles Removed */

/* Calculator */
.calculator-box {
    max-width: 800px;
    margin: 0 auto;
    /* glass-effect class already handles bg/blur */
    padding: 40px;
    background: rgba(22, 22, 37, 0.4);
    /* Override for slightly darker custom feel if needed, or rely on glass-effect */
}

.calc-step {
    display: none;
    animation: fadeIn 0.5s;
}

.calc-step.active {
    display: block;
}

.calc-step h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.options-grid button {
    font-family: var(--font-main);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px 15px;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.options-grid button i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
    transition: 0.3s;
}

.options-grid button span {
    font-size: 1.1rem;
    font-weight: bold;
}

.options-grid button small {
    color: #aaa;
    font-size: 0.85rem;
}

.options-grid button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 255, 157, 0.1);
}

.options-grid button:hover i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.options-grid button:active {
    transform: scale(0.95);
}

.hidden {
    display: none;
}

#calc-result {
    text-align: center;
    animation: zoomIn 0.5s;
}

.price-display {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 30px rgba(0, 255, 157, 0.4);
    margin: 20px 0;
    font-family: var(--font-main);
    /* Ensure Persian digits use the font */
}

#calc-result p {
    color: #aaa;
    margin-bottom: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 5px;
    font-family: inherit;
    transition: 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.contact-form textarea {
    min-height: 150px;
}

/* Professional Footer */
.main-footer {
    background: rgba(13, 13, 21, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 80px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #ccc;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 190px;
    width: auto;
    margin-bottom: 20px;
    /* filter: brightness(1.2) drop-shadow(0 0 10px rgba(0, 255, 157, 0.3)); */
    transition: transform 0.3s;
    filter: drop-shadow(2px 4px 6px black);
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #888;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #aaa;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #666;
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

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

/* Hamburger Menu */
.hamburger {
    display: none;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-bg-numbers {
        font-size: 10rem;
    }

    /* Mobile Nav */
    .hamburger {
        display: block;
        z-index: 2001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        /* Slightly wider for better proportions */
        height: 100vh;
        display: flex;
        background: rgba(10, 10, 18, 0.95);
        /* Darker background as requested */
        backdrop-filter: blur(30px) saturate(180%);
        /* Heavy blur + saturation */
        -webkit-backdrop-filter: blur(30px) saturate(180%);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 40px;
        /* Ensure top space */
        overflow-y: auto;
        /* Allow scroll if needed on tiny screens */
        transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 2000;
        box-shadow: -10px 0 50px rgba(0, 255, 157, 0.1);
        /* Green glow */
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 30px 0 0 30px;
        /* Rounded left corners */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 10px 0;
        /* Reduced from 25px */
        opacity: 0;
        transform: translateX(20px);
        transition: 0.3s ease;
        /* Removed invalid 'forwards' */
        width: 100%;
        /* Ensure centered click area */
    }

    .nav-links li a {
        font-size: 1.4rem;
        /* Larger text */
        font-weight: bold;
        color: #fff !important;
        display: flex;
        /* improved alignment for icons */
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 80%;
        /* Not full width to look like pills */
        margin: 0 auto;
        /* Center pills */
        text-align: center;
        padding: 12px 20px;
        /* Reduced padding */
        border-radius: 50px;
        transition: 0.3s;
    }

    .nav-links li a:hover {
        background: rgba(255, 255, 255, 0.1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
        color: var(--primary-color) !important;
        transform: scale(1.1);
    }

    /* Stagger animation for links */
    .nav-links.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.4s;
    }

    .nav-links.active li:nth-child(5) {
        transition-delay: 0.5s;
    }

    .nav-links.active li:nth-child(6) {
        transition-delay: 0.6s;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .hero-section .container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }

    .hero-image {
        justify-content: center;
    }

    .hero-image img {
        max-width: 80%;
    }

    .services-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .services-visual {
        text-align: center;
    }

    .section-desc {
        margin: 0 auto 30px;
    }

    .contact-box,
    .calculator-box {
        padding: 30px 20px;
    }
}

/* ═══════════════════════════════════════════════════════════
   FAQ SECTION
   ═══════════════════════════════════════════════════════════ */
.faq-section {
    position: relative;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.faq-item:hover {
    border-color: rgba(0, 255, 157, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.faq-item.active {
    border-color: var(--primary-color);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 255, 157, 0.15) inset;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 700;
    transition: 0.3s;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(0, 255, 157, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-color);
    transition: 0.4s;
}

.faq-item.active .faq-icon {
    background: var(--primary-color);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
}

.faq-q-text {
    flex: 1;
    line-height: 1.6;
}

.faq-toggle {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #aaa;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.faq-item.active .faq-toggle {
    background: rgba(0, 255, 157, 0.15);
    color: var(--primary-color);
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer-inner {
    padding: 0 28px 24px 88px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s 0.1s, transform 0.4s 0.1s;
}

.faq-item.active .faq-answer-inner {
    opacity: 1;
    transform: translateY(0);
}

.faq-answer-inner p {
    color: #bbb;
    font-size: 0.95rem;
    line-height: 1.9;
}

.faq-answer-inner strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* FAQ Mobile Responsive */
@media (max-width: 768px) {
    .faq-question {
        padding: 18px 20px;
        font-size: 0.95rem;
        gap: 12px;
    }

    .faq-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .faq-toggle {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .faq-answer-inner {
        padding: 0 20px 20px 20px;
    }

    .faq-answer-inner p {
        font-size: 0.88rem;
    }
}

/* Enhanced Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 35px;
    background: rgba(22, 22, 37, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.contact-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(22, 22, 37, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 255, 157, 0.3) inset;
}

/* Icon Styling */
.card-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(0, 255, 157, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    transition: 0.4s;
    position: relative;
}

.card-icon-wrapper.telegram-color {
    background: rgba(0, 136, 204, 0.1);
    color: #0088cc;
}

.contact-card:hover .card-icon-wrapper {
    background: var(--primary-color);
    color: #000;
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 0 20px var(--primary-color);
}

.contact-card:hover .card-icon-wrapper.telegram-color {
    background: #0088cc;
    color: #fff;
    box-shadow: 0 0 20px #0088cc;
}

/* Pulse Animation for Phone */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    opacity: 0;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Content Styling */
.card-content {
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 5px;
    font-weight: normal;
}

.contact-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    font-family: var(--font-main);
    letter-spacing: 0.5px;
}

.action-text {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transform: translateX(10px);
    transition: 0.4s;
}

.contact-card:hover .action-text {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .contact-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .action-text {
        opacity: 1;
        transform: none;
        justify-content: center;
        margin-top: 10px;
    }
}

/* Tech Stack Section */
.tech-section {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.9) 0%, rgba(20, 20, 50, 0.8) 50%, rgba(10, 10, 25, 0.95) 100%);
    overflow: hidden;
    padding: 80px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(100, 100, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Infinite Carousel */
.tech-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin: 20px auto;
    padding: 15px 0;
    direction: ltr;
    /* Force LTR for carousel animation */
    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

.tech-slider::before,
.tech-slider::after {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.tech-slider::before {
    left: 0;
    background: linear-gradient(to right, rgba(15, 15, 30, 1) 0%, transparent 100%);
}

.tech-slider::after {
    right: 0;
    background: linear-gradient(to left, rgba(15, 15, 30, 1) 0%, transparent 100%);
}

.slide-track {
    display: flex;
    width: calc(120px * 48);
    animation: scroll 40s linear infinite;
}

.slide-track:hover {
    animation-play-state: paused;
}

.slide {
    flex: 0 0 120px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    box-sizing: border-box;
}

.slide img {
    max-width: 100%;
    max-height: 45px;
    height: auto;
    filter: brightness(0) invert(1) opacity(0.5);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.slide img:hover {
    filter: brightness(0) invert(1) opacity(1) drop-shadow(0 0 20px rgba(120, 120, 255, 0.5));
    transform: scale(1.2);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-120px * 24));
    }
}

/* ═══════════════════════════════════════════════════════════
   PREMIUM GLASS PIGMENT PARTICLES
   Tiny crystalline specks that shimmer like glass dust
   ═══════════════════════════════════════════════════════════ */

.glass-particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* ── Base Glass Speck ── */
.glass-particle {
    position: absolute;
    opacity: 0;
    will-change: transform, opacity;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

/* The actual glowing speck — a tiny diamond/crystal shape */
.glass-particle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--speck-color, rgba(0, 220, 255, 0.7));
    border-radius: 1px;
    transform: rotate(45deg);
    box-shadow:
        0 0 3px var(--speck-glow, rgba(0, 220, 255, 0.4)),
        0 0 8px var(--speck-glow, rgba(0, 220, 255, 0.2));
}

/* ── Size: all very small (1px to 5px) ── */
.glass-particle--1 {
    width: 1px;
    height: 1px;
}

.glass-particle--2 {
    width: 2px;
    height: 2px;
}

.glass-particle--3 {
    width: 3px;
    height: 3px;
}

.glass-particle--4 {
    width: 4px;
    height: 4px;
}

.glass-particle--5 {
    width: 5px;
    height: 5px;
}

/* ── Color Variants (site palette) ── */
.glass-particle--c-green {
    --speck-color: rgba(0, 255, 157, 0.8);
    --speck-glow: rgba(0, 255, 157, 0.35);
}

.glass-particle--c-blue {
    --speck-color: rgba(0, 184, 255, 0.8);
    --speck-glow: rgba(0, 184, 255, 0.35);
}

.glass-particle--c-cyan {
    --speck-color: rgba(0, 234, 255, 0.7);
    --speck-glow: rgba(0, 234, 255, 0.3);
}

.glass-particle--c-white {
    --speck-color: rgba(255, 255, 255, 0.6);
    --speck-glow: rgba(255, 255, 255, 0.2);
}

/* ── Drift Animations: slow, gentle floats ── */
@keyframes speckRise1 {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }

    5% {
        opacity: var(--sp-opacity, 0.6);
    }

    50% {
        transform: translate3d(25px, -45vh, 15px);
        opacity: var(--sp-opacity, 0.6);
    }

    95% {
        opacity: var(--sp-opacity, 0.6);
    }

    100% {
        transform: translate3d(50px, -90vh, 0);
        opacity: 0;
    }
}

@keyframes speckRise2 {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }

    8% {
        opacity: var(--sp-opacity, 0.5);
    }

    50% {
        transform: translate3d(-30px, -40vh, -10px);
        opacity: var(--sp-opacity, 0.5);
    }

    92% {
        opacity: var(--sp-opacity, 0.5);
    }

    100% {
        transform: translate3d(-15px, -85vh, 5px);
        opacity: 0;
    }
}

@keyframes speckRise3 {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }

    6% {
        opacity: var(--sp-opacity, 0.55);
    }

    35% {
        transform: translate3d(15px, -30vh, 20px);
    }

    65% {
        transform: translate3d(-10px, -55vh, -15px);
    }

    94% {
        opacity: var(--sp-opacity, 0.55);
    }

    100% {
        transform: translate3d(20px, -88vh, 0);
        opacity: 0;
    }
}

@keyframes speckDrift1 {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }

    10% {
        opacity: var(--sp-opacity, 0.45);
    }

    50% {
        transform: translate3d(-20px, -35vh, 25px);
        opacity: var(--sp-opacity, 0.45);
    }

    90% {
        opacity: var(--sp-opacity, 0.45);
    }

    100% {
        transform: translate3d(10px, -75vh, -10px);
        opacity: 0;
    }
}

@keyframes speckDrift2 {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }

    7% {
        opacity: var(--sp-opacity, 0.5);
    }

    40% {
        transform: translate3d(35px, -25vh, -20px);
    }

    70% {
        transform: translate3d(10px, -50vh, 30px);
    }

    93% {
        opacity: var(--sp-opacity, 0.5);
    }

    100% {
        transform: translate3d(40px, -80vh, 5px);
        opacity: 0;
    }
}

/* ── Shimmer: prismatic glint effect ── */
@keyframes speckShimmer {

    0%,
    100% {
        filter: brightness(1) hue-rotate(0deg);
    }

    50% {
        filter: brightness(1.8) hue-rotate(15deg);
    }
}

/* Apply shimmer to some particles */
.glass-particle--shimmer {
    animation-name: var(--sp-drift), speckShimmer !important;
    animation-duration: var(--sp-dur), 3s !important;
    animation-delay: var(--sp-delay), 0s !important;
    animation-timing-function: linear, ease-in-out !important;
    animation-iteration-count: infinite, infinite !important;
}

/* ── Mobile: reduce count for performance ── */
@media (max-width: 768px) {
    .glass-particle:nth-child(n+20) {
        display: none;
    }
}