/* Visual Identity & Global Enhancements */
:root {
    --primary: #00f2ff;
    --primary-alt: #7000ff;
    --dark: #050508;
    --darker: #020203;
    --text: #e0e0e0;
    --glass-bg: rgba(10, 10, 15, 0.7);
    --glass-border: rgba(0, 242, 255, 0.1);
    --glass-blur: blur(8px);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --neon-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--darker);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--primary-alt));
    border-radius: 10px;
}

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

html {
    scroll-padding-top: 80px; /* Offset for fixed header */
}

body {
    background-color: var(--darker);
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body.ltr {
    font-family: 'Orbitron', sans-serif;
}

body.ltr .hero-slogan, 
body.ltr .section-title,
body.ltr .reveal-text,
body.ltr .btn-text {
    letter-spacing: 1px;
}

body.ltr .hero-stats {
    flex-direction: row;
}

body.ltr .stat-item {
    text-align: left;
}

body.ltr .stat-info {
    margin-right: 0;
    margin-left: 15px;
}

body.ltr .news-more i {
    transform: rotate(180deg);
}

body.ltr .news-card:hover .news-more i {
    transform: rotate(180deg) translateX(5px);
}

body.ltr .info-text {
    text-align: left;
}

body.ltr .info-item {
    flex-direction: row;
}

body.ltr .contact-info {
    text-align: left;
}

/* Global Noise Texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/stardust.png');
    opacity: 0.05;
    z-index: 9998;
    pointer-events: none;
}

/* Glassmorphism Utility */
@keyframes borderGlow {
    0% { border-color: var(--glass-border); box-shadow: 0 0 5px rgba(0, 242, 255, 0.2); }
    50% { border-color: var(--primary); box-shadow: 0 0 20px rgba(0, 242, 255, 0.4); }
    100% { border-color: var(--glass-border); box-shadow: 0 0 5px rgba(0, 242, 255, 0.2); }
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.1;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.glass-panel::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 242, 255, 0.05),
        transparent
    );
    transform: rotate(45deg);
    transition: 0.5s;
    pointer-events: none;
}

.glass-panel:hover::after {
    left: 100%;
    top: 100%;
}

/* Header & Nav */
header {
    height: 80px;
    background: rgba(5, 5, 8, 0.9); /* Slightly more opaque for mobile */
    backdrop-filter: blur(8px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
    header {
        backdrop-filter: none !important;
        background: rgba(5, 5, 8, 0.98) !important;
        height: 70px !important;
    }

    .logo {
        gap: 8px !important;
    }

    .vg-box {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
        border-radius: 6px !important;
    }

    .brand-text {
        font-size: 1rem !important;
        letter-spacing: 0.5px !important;
    }

    .lang-switch {
        display: none !important; /* Hide this one, we use the one at the bottom of the file for mobile */
    }

    .lang-btn {
        padding: 4px 10px !important;
        font-size: 0.7rem !important;
    }

    .lang-btn.active {
        box-shadow: none !important;
    }
    
    body::before, .scanlines, .scanner-line, .reveal-text-glow, .cyber-grid {
        display: none !important; /* Disable grid and other heavy effects */
    }

    /* Global Lag Fix for Mobile */
    * {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    body {
        text-rendering: optimizeSpeed;
    }

    .project-card, .news-card, .team-card {
        will-change: transform;
    }

    /* Keep only essential animations */
    .mobile-overlay, .mobile-link, .vg-box::after {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }

    .hero-video {
        display: none !important; /* Completely remove video on mobile */
    }

    .hero {
        background: #050508 !important;
        contain: layout paint;
    }
    
    .glass-panel, .hero-stats {
        backdrop-filter: none !important;
        background: rgba(10, 10, 15, 0.95) !important;
    }
    
    .reveal-text {
        font-size: clamp(2rem, 12vw, 3.2rem) !important;
        letter-spacing: 1px !important;
        text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8) !important;
        margin-bottom: 5px !important;
    }

    .hero-slogan {
        font-size: 1rem !important;
        flex-direction: column !important;
        gap: 5px !important;
        margin-bottom: 20px !important;
    }

    .hero p {
        padding: 0 15px !important;
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        margin-bottom: 25px !important;
    }

    .hero-stats {
        flex-direction: column !important;
        gap: 12px !important;
        width: 85% !important;
        max-width: 260px !important;
        padding: 15px !important;
        box-shadow: none !important;
        border: 1px solid rgba(0, 242, 255, 0.1) !important;
        margin-top: 20px !important;
    }

    .stat-item {
        justify-content: flex-start !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .stat-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
        border-radius: 10px !important;
    }

    .stat-num {
        font-size: 1.4rem !important;
    }

    .stat-label {
        font-size: 0.8rem !important;
    }

    .stat-divider {
        display: none !important;
    }

    .btn-cyber {
        padding: 14px 28px !important;
        font-size: 0.85rem !important;
    }

    .cyber-bot-container {
        bottom: 15px !important;
        left: 10px !important;
        transform: scale(0.65) !important;
        transform-origin: bottom left !important;
        pointer-events: none; /* Prevent accidental clicks on mobile */
    }

    .bot-speech {
        display: none !important;
    }

    /* Disable heavy robot animations on mobile */
    .bot-antenna::after, .bot-mouth-visualizer::after, .bot-core, .bot-glow {
        animation: none !important;
    }
    
    .bot-core {
        opacity: 0.8 !important;
    }

    /* English specific mobile optimizations */
    body.ltr .hero-stats {
        flex-direction: column !important;
    }
    
    body.ltr .stat-info {
        margin-left: 0 !important;
        text-align: left !important;
    }
    
    body.ltr .reveal-text {
        letter-spacing: 0px !important;
    }

    .team-card {
        backdrop-filter: none !important;
        transform: none !important;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Orbitron', sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.vg-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-alt));
    color: var(--darker);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.vg-box::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.brand-text {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: var(--neon-shadow);
}

.brand-text .accent {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(0, 242, 255, 0.7);
}

/* Hero Section Overhaul */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    background: #050505;
}

/* New Hero Background Effects */
.hero-background-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cyber-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #000 100%);
    opacity: 0.5;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(5, 5, 8, 0.8) 0%, 
        rgba(5, 5, 8, 0.4) 50%, 
        rgba(5, 5, 8, 1) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 80px;
}

/* Hero Frame Decorations */
.hero-frame-top, .hero-frame-bottom {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 40px;
    border: 2px solid rgba(0, 242, 255, 0.2);
    pointer-events: none;
    transition: 0.5s;
    opacity: 0.6;
}

.hero-frame-top {
    top: -60px;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
}

.hero-frame-top::before {
    content: 'CORE_ESTABLISHED';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--primary);
    letter-spacing: 4px;
    white-space: nowrap;
    text-shadow: 0 0 10px var(--primary);
}

.hero-frame-bottom {
    bottom: -60px;
    border-top: none;
    border-radius: 0 0 20px 20px;
}

.hero-frame-bottom::before {
    content: 'VIGIGAMES_ST_001';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--primary);
    letter-spacing: 4px;
    white-space: nowrap;
    text-shadow: 0 0 10px var(--primary);
}

.reveal-text {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3.5rem, 10vw, 7.5rem);
    font-weight: 900;
    color: #00f2ff;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
    /* Sharp text shadow */
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 242, 255, 0.3);
    white-space: nowrap;
    z-index: 5;
}

/* Background glow for hero text */
.reveal-text-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, transparent 70%);
    filter: blur(50px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

.hero-slogan {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 500;
    position: relative;
    z-index: 5;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
    position: relative;
    z-index: 5;
}

.reveal-text:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.8);
}

.reveal-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 15px var(--primary);
}

.reveal-text::before {
    content: 'SYS_ACTIVE';
    position: absolute;
    top: -15px;
    right: 0;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--primary);
    opacity: 0.6;
    font-weight: 400;
}

.hero-tag {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    letter-spacing: 4px;
    font-size: 0.8rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.9;
    text-transform: uppercase;
}

.hero-tag::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--primary);
}

.hero-tag::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse-dot 1s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.btn-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    filter: blur(20px);
    opacity: 0;
    transition: 0.3s;
    z-index: -1;
}

.btn-cyber:hover .btn-glitch {
    opacity: 0.3;
    animation: btn-pulse 1.5s infinite;
}

@keyframes btn-pulse {
    0% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 0.3; }
}

/* Stats Counter Styling */
.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: fit-content;
}

/* Scanner Line Effect */
.scanner-line {
    position: absolute;
    top: 0;
    left: -100%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
    box-shadow: 0 0 15px var(--primary);
    z-index: 1;
    opacity: 0.3;
    pointer-events: none;
    animation: scan 8s infinite linear;
}

@keyframes scan {
    0% { left: -10%; }
    100% { left: 110%; }
}

.hero-slogan {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 400;
    color: #fff;
    margin-bottom: 20px;
    opacity: 0.9;
    text-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.hero-slogan::before, .hero-slogan::after {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--primary);
    opacity: 0.5;
}

.highlight {
    color: var(--primary);
    font-weight: 700;
    text-shadow: none;
    position: relative;
    padding: 0 5px;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--primary);
}

.hero p {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    line-height: 1.8;
    margin-bottom: 35px;
}

.hero:hover p {
    border-right-color: var(--primary);
}

.btn-cyber {
    position: relative;
    padding: 18px 40px;
    background: var(--primary-alt);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
    transition: all 0.3s;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(112, 0, 255, 0.4);
}

.btn-cyber::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}

.btn-cyber:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-alt);
}

.btn-cyber:hover::before {
    left: 100%;
}

.hero-stats {
    display: flex;
    gap: 30px;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    padding: 30px 50px;
    border-radius: 24px;
    border: 1px solid rgba(0, 242, 255, 0.1);
    width: fit-content;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    margin-top: 50px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-stats:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 242, 255, 0.3);
    box-shadow: 0 30px 60px rgba(0, 242, 255, 0.1);
}

/* Hero Stats Icons */
.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 242, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    border: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
    transition: all 0.3s;
}

.hero-stats:hover .stat-icon {
    transform: rotate(10deg) scale(1.1);
    background: rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3);
}

.stat-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Cyber Bot Welcome Styles */
.cyber-bot-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.bot-speech {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--primary);
    padding: 15px 25px;
    border-radius: 20px 20px 20px 0;
    max-width: 280px;
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cyber-bot-container:hover .bot-speech {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.bot-speech.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.bot-speech p {
    color: #fff;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}

.bot-glow {
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -25%;
    left: -25%;
    opacity: 0.15;
    filter: blur(15px);
    z-index: -1;
    animation: glow-pulse 2s infinite ease-in-out;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.1); }
}
.cyber-bot {
    width: 80px;
    height: 90px;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
}

.bot-antenna {
    position: absolute;
    top: -15px;
    left: 50%;
    width: 2px;
    height: 15px;
    background: var(--primary);
    transform: translateX(-50%);
}

.bot-antenna::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -2px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: antenna-pulse 1s infinite;
}

@keyframes antenna-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.bot-head {
    width: 55px;
    height: 45px;
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
    border: 2px solid var(--primary);
    border-radius: 12px;
    position: absolute;
    top: 0;
    left: 12.5px;
    z-index: 5;
    box-shadow: inset 0 0 15px rgba(0, 242, 255, 0.2), 0 0 20px rgba(0, 242, 255, 0.1);
    transition: 0.3s;
}

.bot-face {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bot-mouth-visualizer {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    opacity: 0.6;
    position: relative;
    overflow: hidden;
}

.bot-mouth-visualizer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    animation: mouth-move 1.5s infinite linear;
}

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

.bot-neck {
    width: 12px;
    height: 8px;
    background: var(--primary);
    position: absolute;
    top: 43px;
    left: 34px;
    z-index: 4;
    opacity: 0.8;
}

.bot-body {
    width: 45px;
    height: 35px;
    background: #1a1a1a;
    border: 2px solid var(--primary);
    border-radius: 8px 8px 15px 15px;
    position: absolute;
    bottom: 5px;
    left: 17.5px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-core {
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #fff, var(--primary));
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary);
    animation: core-pulse 2s infinite ease-in-out;
}

@keyframes core-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; filter: blur(1px); }
    50% { transform: scale(1.2); opacity: 1; filter: blur(0px); }
}

.bot-limbs .limb {
    width: 10px;
    height: 25px;
    background: #1a1a1a;
    border: 1px solid var(--primary);
    position: absolute;
    border-radius: 5px;
    z-index: 2;
}

.limb.left { left: 5px; top: 50px; transform: rotate(-15deg); animation: limb-float-l 3s infinite ease-in-out; }
.limb.right { right: 5px; top: 50px; transform: rotate(15deg); animation: limb-float-r 3s infinite ease-in-out; }

@keyframes limb-float-l { 0%, 100% { transform: rotate(-15deg) translateY(0); } 50% { transform: rotate(-25deg) translateY(-5px); } }
@keyframes limb-float-r { 0%, 100% { transform: rotate(15deg) translateY(0); } 50% { transform: rotate(25deg) translateY(-5px); } }

.cyber-bot-container:hover .bot-head {
    transform: translateY(-5px) rotateX(10deg);
}

/* Redesign Contact Button */
.btn-outline {
    background: transparent !important;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
    padding: 12px 35px;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    transition: 0.3s;
    border-radius: 4px;
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.btn-outline:hover {
    background: var(--primary) !important;
    color: #000 !important;
    box-shadow: 0 0 20px var(--primary);
    transform: translateY(-2px);
}

.btn-outline .btn-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-outline .btn-text::before,
.btn-outline .btn-text::after {
    display: none !important;
}

/* Contact Section Title Styling */
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: #00f2ff;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    letter-spacing: 2px;
    /* Clean, sharp look without any blur */
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    contain: layout style paint;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
}

.lang-switch {
    position: fixed;
    top: 25px;
    left: 30px;
    z-index: 1100;
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.lang-btn {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.3s;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Orbitron', sans-serif;
}

.lang-btn.active {
    background: var(--primary);
    color: #000;
    font-weight: 900;
    box-shadow: 0 0 15px var(--primary);
}

@media (max-width: 768px) {
    .cyber-bot-container {
        display: none;
    }
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 1.8rem;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
    background: rgba(0, 242, 255, 0.1);
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.stat-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 242, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: icon-sweep 3s infinite linear;
}

@keyframes icon-sweep {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

.stat-info {
    display: flex;
    flex-direction: column;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 992px) {
    .hero-content {
        padding-top: 100px;
    }
    
    .reveal-text {
        font-size: clamp(2.5rem, 8vw, 5rem);
        letter-spacing: 4px;
    }
    
    .hero-stats {
        gap: 20px;
        padding: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    nav ul {
        display: none;
    }

    .mobile-menu-btn {
        display: block !important;
    }

    .hero-content {
        text-align: center;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .btn-cyber, .btn-outline {
        width: 100%;
        max-width: 300px;
        padding: 15px 30px;
    }

    .hero-stats {
        margin-top: 30px;
    }

    .stat-item {
        flex: 1 1 140px;
    }

    .cyber-bot-container {
        bottom: 20px;
        left: 20px;
        transform: scale(0.8);
        transform-origin: bottom left;
    }

    .bot-speech {
        max-width: 200px;
        font-size: 0.8rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .reveal-text {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .hero-slogan {
        font-size: 1rem;
    }

    .stat-num {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }
}

.stat-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    opacity: 0.8;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
}

@media (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        gap: 25px;
        padding: 30px;
        width: 100%;
        align-items: flex-start;
    }
    .stat-divider {
        display: none;
    }
    .stat-item {
        width: 100%;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
    z-index: 2;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* Media Queries handled in consolidated section */
@media (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
}

/* --- PROJECTS SECTION ENHANCEMENT --- */
.project-card {
    background: transparent;
    border: none !important;
    padding: 0;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
    height: 100%;
}

.project-card-inner {
    background: rgba(15, 15, 20, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 242, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.4s ease;
}

.project-card:hover .project-card-inner {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 242, 255, 0.2), inset 0 0 20px rgba(0, 242, 255, 0.05);
    transform: translateY(-5px);
}

.project-image-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

.project-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(15, 15, 20, 0.9));
    z-index: 1;
}

.project-status-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-completed { background: #00ff88; color: #000; box-shadow: 0 0 15px rgba(0, 255, 136, 0.4); }
.status-inprogress { background: #ffcc00; color: #000; box-shadow: 0 0 15px rgba(255, 204, 0, 0.4); }
.status-cancelled { background: #ff4444; color: #fff; box-shadow: 0 0 15px rgba(255, 68, 68, 0.4); }

.project-expand-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px;
    height: 60px;
    background: rgba(0, 242, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    cursor: pointer;
}

.project-card:hover .project-expand-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.project-expand-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px var(--primary);
}

.project-content {
    padding: 25px;
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-tech-corners span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: var(--primary);
    border-style: solid;
    opacity: 0.3;
    transition: 0.3s;
}

.project-tech-corners span:nth-child(1) { top: 10px; left: 10px; border-width: 2px 0 0 2px; }
.project-tech-corners span:nth-child(2) { top: 10px; right: 10px; border-width: 2px 2px 0 0; }
.project-tech-corners span:nth-child(3) { bottom: 10px; left: 10px; border-width: 0 0 2px 2px; }
.project-tech-corners span:nth-child(4) { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; }

.project-card:hover .project-tech-corners span {
    opacity: 1;
    width: 15px;
    height: 15px;
}

.project-serial {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--primary);
    padding: 4px 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 2px;
    border-left: 2px solid var(--primary);
    z-index: 5;
    pointer-events: none;
    backdrop-filter: blur(5px);
}

[dir="rtl"] .project-serial {
    left: auto;
    right: 20px;
    border-left: none;
    border-right: 2px solid var(--primary);
}

.project-glitch-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.project-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
    letter-spacing: 1px;
    position: relative;
}

.project-card:hover .project-title {
    animation: title-glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

@keyframes title-glitch {
    0% { transform: translate(0); text-shadow: none; }
    20% { transform: translate(-2px, 2px); text-shadow: 2px 0 var(--primary), -2px 0 var(--primary-alt); }
    40% { transform: translate(-2px, -2px); text-shadow: 2px 0 var(--primary-alt), -2px 0 var(--primary); }
    60% { transform: translate(2px, 2px); text-shadow: 2px 0 var(--primary), -2px 0 var(--primary-alt); }
    80% { transform: translate(2px, -2px); text-shadow: 2px 0 var(--primary-alt), -2px 0 var(--primary); }
    100% { transform: translate(0); }
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0, 242, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(0, 242, 255, 0.05);
}

.meta-item {
    font-size: 0.65rem;
    color: var(--primary);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
}

.meta-item i {
    font-size: 0.7rem;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    border-radius: 50%;
    opacity: 0;
    transition: 0.3s;
}

.project-card:hover .slider-arrow {
    opacity: 1;
}

.arrow-prev { left: 15px; }
.arrow-next { right: 15px; }

[dir="rtl"] .arrow-prev { left: auto; right: 15px; }
[dir="rtl"] .arrow-next { right: auto; left: 15px; }

.slider-arrow:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

.project-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.project-gallery-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0.8;
}

.project-gallery-link:hover {
    opacity: 1;
    text-shadow: 0 0 10px var(--primary);
}

.project-gallery-link i {
    font-size: 1.1rem;
}

/* RTL Adjustments */
[dir="rtl"] .project-status-tag {
    right: auto;
    left: 20px;
}

[dir="rtl"] .project-tech-corners span:nth-child(1) { left: auto; right: 10px; border-width: 2px 2px 0 0; }
[dir="rtl"] .project-tech-corners span:nth-child(2) { right: auto; left: 10px; border-width: 2px 0 0 2px; }
[dir="rtl"] .project-tech-corners span:nth-child(3) { left: auto; right: 10px; border-width: 0 2px 2px 0; }
[dir="rtl"] .project-tech-corners span:nth-child(4) { right: auto; left: 10px; border-width: 0 0 2px 2px; }

/* Remove old project styles to avoid conflicts */
.news-card, .team-card {
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

/* Lightbox Gallery Improvements */
.lightbox-gallery-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 70vh;
}

.gallery-prev, .gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary);
    color: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.gallery-prev:hover, .gallery-next:hover {
    background: var(--primary);
    color: var(--darker);
    box-shadow: var(--neon-shadow);
}

.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumb-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    opacity: 0.6;
}

.thumb-img:hover, .thumb-img.active {
    border-color: var(--primary);
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .gallery-prev, .gallery-next {
        width: 40px;
        height: 40px;
    }
    .thumb-img {
        width: 60px;
        height: 45px;
    }
}

.project-card, .news-card, .team-card {
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover, .news-card:hover, .team-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3);
    transform: translateY(-10px) scale(1.02);
}

/* Team Section Final - Balanced & Professional */
.team-section {
    padding: 150px 0;
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(0, 242, 255, 0.03) 0%, transparent 70%);
    contain: layout paint;
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}

.team-header {
    margin-bottom: 80px;
    text-align: center; /* Centered for balance */
}

.team-title-wrap {
    display: inline-block;
    position: relative;
}

/* Team section title removed for consolidation */

.title-underline {
    width: 120px; /* Wider underline */
    height: 4px;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    border-radius: 2px;
    margin: 0 auto; /* Center underline */
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center; /* Center the cards */
    max-width: 1400px;
    margin: 0 auto;
}

.team-card {
    position: relative;
    padding: 50px 30px;
    background: #15151b; /* Even brighter background for better visibility */
    border: 2px solid rgba(0, 242, 255, 0.3); /* Thicker, brighter border */
    border-radius: 24px;
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 1 !important; /* Force full opacity */
    backface-visibility: hidden; /* Sharpen text/images */
    -webkit-font-smoothing: antialiased;
    transform: translateZ(0); /* Hardware acceleration for sharpness */
}

.team-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.4);
    background: #1a1a22;
    transform: translateY(-10px);
}

.member-img-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 35px;
    z-index: 5;
}

/* Neon Ring - Solid & Sharp */
.member-img-wrapper::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: transparent;
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary);
    z-index: 1;
}

.member-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #15151b;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    filter: brightness(1.2) contrast(1.1); /* High pop */
}

.team-card:hover .member-img {
    transform: scale(1.05);
}

.member-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #ffffff; /* Pure white for clarity */
    margin-bottom: 12px;
    font-weight: 700;
    transition: all 0.3s;
    position: relative;
    z-index: 5;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.team-card:hover .member-name {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(0, 242, 255, 0.6);
}

.member-role {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    opacity: 1; /* Full opacity for clarity */
    transition: all 0.3s;
    position: relative;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-card:hover .member-role {
    opacity: 1;
    letter-spacing: 1px;
}

.team-card .social-links {
    justify-content: center;
    margin-top: 25px;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.team-card:hover .social-links {
    opacity: 1;
    transform: translateY(0);
}

/* Animated Background Shapes */
.floating-shape {
    display: none; /* Removed as requested */
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: 10%;
    left: -10%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--primary-alt);
    bottom: 10%;
    right: -5%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--light);
    font-weight: 500;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--primary);
}

.admin-link {
    background: linear-gradient(45deg, var(--primary), var(--primary-alt));
    padding: 8px 22px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
}

.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(112, 0, 255, 0.4);
    color: white !important;
}

/* Mobile Specific Enhancements */
@media (max-width: 768px) {
    .btn-cyber, .page-btn, .tab-btn, .admin-actions button {
        padding: 12px 20px; /* Larger hit area */
        font-size: 0.9rem;
    }
    
    .news-card, .project-card {
        margin-bottom: 20px;
        transition: none; /* Disable transitions on mobile for better scroll performance */
    }
    
    .news-card:hover, .project-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* Performance Optimizations for Mobile */
    .glass-panel, .news-card, .project-card, .team-card, .lang-switch {
        backdrop-filter: none; /* Disable blur on mobile to reduce GPU load */
        background: rgba(15, 15, 20, 0.95); /* More opaque background as fallback */
    }

    .project-card:hover .project-title {
        animation: none; /* Disable title glitch on mobile to prevent jittery scroll */
    }

    .news-card::after {
        display: none; /* Disable news card sweep animation on mobile */
    }

    .stat-icon::after {
        animation: none; /* Disable icon sweep animation on mobile */
    }

    /* Reduce shadow complexity */
    .btn-cyber, .news-card, .project-card, .team-card {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    }

    .news-card:hover, .project-card:hover, .team-card:hover {
        transform: translateY(-5px); /* Smaller transform */
        box-shadow: 0 8px 20px rgba(0, 242, 255, 0.2);
    }

    /* Better touch targets */
    .nav-link, .btn-cyber, .page-btn, .tab-btn, .social-links a {
        min-height: 44px; /* Apple/Google recommended minimum touch target */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .admin-actions button {
        padding: 15px !important;
    }

    /* Improve touch scrolling */
    body {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden; /* Prevent horizontal scroll bugs */
    }
}

/* Cyber Buttons */
.btn-cyber {
    position: relative;
    padding: 15px 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    background: transparent;
    border: none;
    cursor: pointer;
    overflow: hidden;
    display: inline-block;
    transition: var(--transition);
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    background: var(--primary-alt);
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.4);
}

.btn-cyber::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.btn-cyber:hover::before {
    transform: translateX(100%);
}

.btn-cyber:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--primary);
    background: var(--primary);
    color: var(--darker);
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* Decorative Tech Elements */
.tech-decor {
    position: fixed;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--primary);
    opacity: 0.3;
    pointer-events: none;
    z-index: 100;
    text-transform: uppercase;
}

.decor-tl { top: 20px; left: 20px; }
.decor-tr { top: 20px; right: 20px; }
.decor-bl { bottom: 20px; left: 20px; }
.decor-br { bottom: 20px; right: 20px; }

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0f0f1a 100%);
}

/* Enhanced Hero Grid */
.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.1) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: center;
    transform: perspective(1000px) rotateX(60deg) translateY(-20%);
    top: -50%;
    opacity: 0.2;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    from { background-position: 0 0; }
    to { background-position: 0 50px; }
}

/* End of Hero */

/* End of Hero Area */

.btn {
    font-family: 'Orbitron', sans-serif;
    display: inline-block;
    padding: 14px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--primary-alt));
    color: white;
    box-shadow: 0 5px 20px rgba(0, 242, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(112, 0, 255, 0.5);
}

/* --- Trailers Section --- */
.trailers-section {
    padding: 80px 0;
    position: relative;
    background: linear-gradient(to bottom, transparent, rgba(0, 242, 255, 0.02), transparent);
}

.trailers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.trailer-card {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.trailer-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 242, 255, 0.15);
}

.trailer-video-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    border-bottom: 2px solid rgba(0, 242, 255, 0.1);
}

.trailer-video-box iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.trailer-info {
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0, 242, 255, 0.05), transparent);
}

.trailer-card h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.trailer-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.75rem;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .trailers-grid {
        grid-template-columns: 1fr;
    }
}

/* Pagination Styles (Shared) */
.pagination {
    display: flex;
    gap: 10px;
}

.pagination button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(0, 242, 255, 0.3);
    background: rgba(0, 242, 255, 0.05);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
}

.pagination button.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

.pagination button:hover:not(.active) {
    background: rgba(0, 242, 255, 0.2);
    border-color: var(--primary);
}

/* News Section Refined - Clear & Sharp */
.news-section {
    padding: 100px 0;
    position: relative;
    contain: layout paint;
    content-visibility: auto;
    contain-intrinsic-size: 500px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.news-card {
    background: rgba(15, 15, 20, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 242, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.news-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 242, 255, 0.15);
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 242, 255, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.news-card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: saturate(0.8) contrast(1.1);
}

.news-card:hover .news-card-img img {
    transform: scale(1.1);
    filter: saturate(1.1) contrast(1.2);
}

.news-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 30%, rgba(10, 10, 15, 0.8) 100%);
    z-index: 1;
}

.news-scanlines {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 242, 255, 0.05) 50%
    ), linear-gradient(
        90deg, 
        rgba(255, 0, 0, 0.02), 
        rgba(0, 255, 0, 0.01), 
        rgba(0, 0, 255, 0.02)
    );
    background-size: 100% 3px, 3px 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.4;
}

.news-card:hover .news-scanlines {
    animation: scanline-flicker 0.2s infinite;
}

@keyframes scanline-flicker {
    0% { opacity: 0.4; }
    50% { opacity: 0.2; }
    100% { opacity: 0.4; }
}

.news-category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary);
    padding: 6px 14px;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    border-left: 3px solid var(--primary);
    z-index: 3;
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

[dir="rtl"] .news-category-tag {
    left: auto;
    right: 15px;
    border-left: none;
    border-right: 2px solid var(--primary);
}

.news-date-tag {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: var(--primary);
    color: #000;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
    z-index: 3;
}

[dir="rtl"] .news-date-tag {
    right: auto;
    left: 15px;
}

.news-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, rgba(15, 15, 20, 0) 0%, rgba(15, 15, 20, 0.4) 100%);
}

.news-meta-top {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.news-read-time {
    font-size: 0.7rem;
    color: var(--primary);
    background: rgba(0, 242, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.news-glitch-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.news-title {
    font-size: 1.35rem;
    color: #fff;
    margin: 0;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.3s;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.5px;
}

.news-card:hover .news-title {
    color: var(--primary);
}

.news-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transition: width 0.4s ease;
    z-index: 3;
}

.news-card:hover .news-progress-bar {
    width: 100%;
}

.news-excerpt {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.news-stats {
    display: flex;
    gap: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.news-stats span i {
    color: var(--primary);
    margin-left: 4px;
}

.news-more {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.news-more i {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.news-card:hover .news-more i {
    transform: translateX(-5px);
}

/* Card Corners */
.card-corner {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--primary);
    opacity: 0;
    transition: 0.3s;
}

.card-corner.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.card-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.news-card:hover .card-corner {
    opacity: 1;
    width: 20px;
    height: 20px;
}

/* Glitch line for news card */
.news-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 242, 255, 0.1),
        transparent
    );
    transform: skewX(-25deg);
    transition: none;
}

.news-card:hover::after {
    left: 150%;
    transition: all 0.6s ease;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.2);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 10px var(--primary);
}

.error-msg {
    text-align: center;
    padding: 100px;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Pagination Styling */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 60px;
}

.page-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #101015;
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
    transform: scale(1.1);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--darker);
    box-shadow: 0 0 20px var(--primary);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.projects-section {
    padding: 120px 0;
    position: relative;
    contain: layout paint;
    content-visibility: auto;
    contain-intrinsic-size: 800px;
}

/* Section Title Enhancement removed for consolidation */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.project-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.project-info {
    padding: 30px;
}

.project-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.status-completed { background: rgba(0, 255, 136, 0.15); color: var(--success); }
.status-inprogress { background: rgba(255, 204, 0, 0.15); color: var(--warning); }
.status-cancelled { background: rgba(255, 68, 68, 0.15); color: var(--danger); }

.project-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.project-desc {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Admin Panel Styles */
.admin-container {
    margin-top: 120px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.admin-dashboard {
    display: none;
    flex-direction: column;
}

.admin-dashboard.active {
    display: flex;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
    padding-bottom: 15px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.1);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
    border-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 15px;
    background: #0a0a0c;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
}

.project-list-admin {
    margin-top: 40px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #111;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #222;
    transition: var(--transition);
}

.admin-item:hover {
    border-color: var(--primary);
    background: #16161a;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.admin-actions button {
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 6px;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.edit-btn { background: var(--warning); color: #000; }
.edit-btn:hover { background: #e6b800; transform: translateY(-2px); }

.delete-btn { background: var(--danger); color: #fff; }
.delete-btn:hover { background: #e63e3e; transform: translateY(-2px); }

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success);
    color: #000;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    transform: translateY(100px);
    transition: transform 0.5s ease;
    z-index: 2000;
}

.notification.show {
    transform: translateY(0);
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    contain: layout paint;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    margin-top: 50px;
}

.contact-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

.info-text h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary);
}

.info-text p {
    color: rgba(255, 255, 255, 0.7);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--darker);
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--primary);
}

.contact-form-container {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 242, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

/* Footer */
footer {
    padding: 60px 0 30px;
    border-top: 1px solid var(--glass-border);
    margin-top: 100px;
    background: var(--darker);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Animations */
/* --- Tablet & Small Desktop (768px to 1024px) --- */
@media (min-width: 769px) and (max-width: 1100px) {
    .container {
        max-width: 95%;
    }

    .news-grid, .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        padding-top: 100px;
    }

    .reveal-text {
        font-size: 5rem;
    }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }

 .news-grid, .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .news-card-img {
        height: 180px;
    }

    .news-card-content {
        padding: 20px;
    }

    .news-title {
        font-size: 1.15rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .tech-decor { display: none; }

    html {
        scroll-padding-top: 70px;
    }

    header {
        height: 70px;
        backdrop-filter: none !important;
        background: rgba(5, 5, 8, 0.98) !important;
    }

    /* Fix Header Overlap & Lag - Mobile Optimized */
    .vg-box {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
        border-radius: 6px !important;
    }

    .brand-text {
        font-size: 1rem !important;
        letter-spacing: 0.5px !important;
    }

    .logo {
        gap: 6px !important;
    }

    .lang-switch {
        top: 15px !important;
        right: 15px !important; /* Move to the right side to avoid logo overlap on left */
        left: auto !important;
        backdrop-filter: none !important;
        background: rgba(0, 0, 0, 0.9) !important;
        padding: 4px !important;
        z-index: 1001 !important;
        border: 1px solid rgba(0, 242, 255, 0.3) !important;
    }

    .mobile-menu-btn {
        margin-right: 10px; /* Space from lang-switch if needed */
    }

    .lang-btn {
        padding: 3px 8px !important;
        font-size: 0.6rem !important;
    }

    .lang-btn.active {
        box-shadow: none !important;
    }

    /* Consolidated section title handled below */

    .glass-panel {
        padding: 25px;
    }

    /* Header & Navigation */
    nav ul {
        display: none; /* Hide standard menu on mobile */
    }

    .mobile-menu-btn {
        display: block !important;
        font-size: 1.8rem;
        color: var(--primary);
        cursor: pointer;
        transition: var(--transition);
    }
    
    .mobile-menu-btn:hover {
        transform: scale(1.1);
        text-shadow: 0 0 10px var(--primary);
    }

    /* Hero */
    .hero {
        height: auto;
        min-height: 90vh;
        padding: 120px 20px 60px;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .hero-content {
        padding-top: 0;
        width: 100%;
    }

    .reveal-text {
        font-size: 3rem;
        letter-spacing: 4px;
        white-space: normal;
        line-height: 1.2;
        margin-bottom: 20px;
    }

    .hero-frame-top, .hero-frame-bottom {
        width: 200px;
        height: 30px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        margin-top: 40px;
    }

    .stat-item {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }

    .stat-divider {
        display: none;
    }

    /* Grid Layouts */
    .news-grid, .projects-grid, .team-grid {
        grid-template-columns: 1fr !important;
        gap: 25px;
        padding: 0 10px;
    }

    /* Projects Mobile Optimization */
    .project-card-inner {
        flex-direction: column;
    }

    .project-image-container {
        height: 220px;
    }

    .project-content {
        padding: 20px;
    }

    .project-title {
        font-size: 1.25rem;
    }

    .project-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .project-serial {
        top: 10px;
        left: 10px;
        font-size: 0.6rem;
    }

    [dir="rtl"] .project-serial {
        right: 10px;
    }

    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .project-status-tag {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    /* News Section */
    .news-card-img {
        height: 200px;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .news-stats {
        width: 100%;
        justify-content: space-between;
    }

    .projects-section, .team-section, .news-section, .contact-section {
        padding: 80px 0;
    }

    .ad-banner {
        height: 140px !important;
        margin: 20px 10px !important;
    }

    /* Team Section */
    .team-card {
        max-width: 100%;
        margin: 0;
    }

    .member-img-wrapper {
        width: 140px;
        height: 140px;
    }

    /* Footer */
    footer {
        padding: 40px 0 20px;
        margin-top: 60px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    /* Admin Panel */
    .admin-container {
        padding: 25px 15px;
        margin: 100px 10px 40px;
        width: auto;
    }

    .admin-tabs {
        overflow-x: auto;
        display: flex;
        gap: 8px;
        padding-bottom: 15px;
        scrollbar-width: none; /* Firefox */
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-tabs::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .tab-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .admin-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .admin-item > div:first-child {
        margin-bottom: 5px;
    }

    .admin-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .admin-actions button, .admin-actions .btn {
        width: 100%;
        margin: 0;
    }

    /* News Detail Mobile Enhancement */
    .news-detail-container {
        padding-top: 70px;
    }

    .news-hero-wrapper {
        height: 300px !important;
    }

    .news-title-large {
        font-size: 1.8rem !important;
    }

    .news-article-content {
        padding: 20px !important;
        font-size: 1rem !important;
    }

    .news-gallery-grid {
        grid-template-columns: 1fr !important;
    }

    .news-hero-overlay {
        padding: 30px 20px !important;
    }
}

@media (max-width: 480px) {
    .vg-box {
        padding: 4px 8px;
        font-size: 1.1rem;
    }

    .brand-text {
        font-size: 1.3rem;
    }

    .news-grid, .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .btn-cyber {
        padding: 12px 25px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .contact-info, .contact-form-container {
        padding: 25px 15px;
    }

    .team-card {
        padding: 30px 20px;
    }

    .member-img-wrapper {
        width: 130px;
        height: 130px;
    }

    .news-card, .project-card {
        padding: 20px;
    }
    
    .project-image-container {
        height: 180px;
    }
}

/* Mobile Menu Overlay Enhancement */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 10, 15, 0.98), rgba(2, 2, 3, 1));
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 20px;
}

.mobile-overlay.active {
    display: flex;
    animation: fadeInOverlay 0.4s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-overlay a {
    color: #fff;
    font-size: 1.6rem;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    transition: var(--transition);
    position: relative;
    padding: 5px 15px;
}

.mobile-overlay a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--primary);
}

.mobile-overlay a:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.mobile-overlay a:hover::after {
    width: 80%;
}

.close-mobile {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 2.2rem;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

[dir="rtl"] .close-mobile {
    right: auto;
    left: 25px;
}

.close-mobile:hover {
    transform: rotate(90deg);
    color: #fff;
}
