/* ===== FUTURISTIC SMART HOME CSS ===== */

/* JF Flat Font Face Definition */
@font-face {
    font-family: 'JF Flat';
    src: url('fonts/JFFlat-regular.woff2') format('woff2'),
         url('fonts/JFFlat-regular.woff') format('woff'),
         url('fonts/JFFlat-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JF Flat';
    src: url('fonts/JFFlat-medium.woff2') format('woff2'),
         url('fonts/JFFlat-medium.woff') format('woff'),
         url('fonts/JFFlat-medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JF Flat';
    src: url('fonts/JFFlat-semibold.woff2') format('woff2'),
         url('fonts/JFFlat-semibold.woff') format('woff'),
         url('fonts/JFFlat-semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JF Flat';
    src: url('fonts/JFFlat-bold.woff2') format('woff2'),
         url('fonts/JFFlat-bold.woff') format('woff'),
         url('fonts/JFFlat-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JF Flat';
    src: url('fonts/JFFlat-black.woff2') format('woff2'),
         url('fonts/JFFlat-black.woff') format('woff'),
         url('fonts/JFFlat-black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables for consistent theming */
:root {
    /* Day Theme (Default) */
    --primary-color: #dc2626; /* Deep red */
    --secondary-color: #991b1b; /* Darker red */
    --bg-secondary: #f8fafc; /* Light gray-white */
    --bg-card: rgba(255, 255, 255, 0.95); /* Light card background */
    --text-primary: #1f2937; /* Dark text */
    --text-secondary: #6b7280; /* Gray text */
    --text-muted: #9ca3af; /* Light gray text */
    --glow-primary: 0 0 20px rgba(220, 38, 38, 0.5);
    --glow-accent: 0 0 15px rgba(220, 38, 38, 0.4);
    --glow-secondary: 0 0 10px rgba(220, 38, 38, 0.3);
    --border-glow: 0 0 10px rgba(220, 38, 38, 0.3);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'JF Flat', 'Orbitron', monospace;
    --font-secondary: 'JF Flat', sans-serif;
    --theme-transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Day Theme Star Colors */
    --star-color: rgba(220, 38, 38, 0.6);
    --star-glow: rgba(220, 38, 38, 0.3);
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #ff0000; /* Neon red */
    --secondary-color: #cc0000; /* Dark red */
    --accent-color: #ff3333; /* Bright neon red */
    --bg-primary: #000000; /* Pure black */
    --bg-secondary: #111111; /* Dark gray */
    --bg-tertiary: #1a1a1a; /* Darker gray */
    --bg-card: rgba(26, 26, 26, 0.95); /* Dark card background */
    --text-primary: #ffffff; /* White text */
    --text-secondary: #cccccc; /* Light gray text */
    --text-muted: #888888; /* Medium gray text */
    --glow-primary: 0 0 30px rgba(255, 0, 0, 0.8), 0 0 60px rgba(255, 0, 0, 0.4);
    --glow-secondary: 0 0 20px rgba(204, 0, 0, 0.6);
    --glow-accent: 0 0 25px rgba(255, 51, 51, 0.7);
    --border-glow: 0 0 15px rgba(255, 0, 0, 0.5);
    
    /* Dark Theme Star Colors */
    --star-color: rgba(255, 51, 51, 0.8);
    --star-glow: rgba(255, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'JF Flat', var(--font-secondary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--theme-transition);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
}

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

/* Enhanced Navigation System */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(220, 38, 38, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .navbar {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 0, 0, 0.2);
    box-shadow: 0 2px 20px rgba(255, 0, 0, 0.1);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 4px 30px rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 4px 30px rgba(255, 0, 0, 0.3);
}

/* Navigation Container */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Brand Section */
.nav-brand {
    flex-shrink: 0;
    z-index: 1001;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.brand-link:hover {
    transform: translateY(-2px);
}

.brand-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

.brand-link:hover .brand-logo {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
    transform: rotate(5deg);
}

.brand-text {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.brand-link:hover .brand-text {
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.8);
}

/* Navigation Menu */
.nav-menu-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .nav-menu {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.nav-text {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.2);
}

.nav-link:hover .nav-indicator {
    width: 80%;
}

.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.action-group {
    display: flex;
    align-items: center;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 25px;
    padding: 0.3rem;
    backdrop-filter: blur(10px);
    gap: 0.2rem;
}

[data-theme="dark"] .language-switcher {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 0, 0.4);
}

.lang-btn {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-width: 45px;
    text-align: center;
}

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

.lang-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.lang-btn:hover {
    color: white;
    transform: translateY(-1px);
}

.lang-btn:hover .lang-indicator {
    opacity: 0.2;
}

.lang-btn.active {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.lang-btn.active .lang-indicator {
    opacity: 1;
}

/* Theme Switcher */
.action-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

[data-theme="dark"] .action-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 0, 0.4);
}

.action-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.3);
    border-color: var(--primary-color);
}

.action-btn i {
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.action-btn:hover i {
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.action-btn:hover .btn-glow {
    width: 100px;
    height: 100px;
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .nav-toggle {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 0, 0.4);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    margin: 2px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    position: relative;
    z-index: 2;
}

.hamburger-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.nav-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.3);
    border-color: var(--primary-color);
}

.nav-toggle:hover .hamburger-line {
    background: var(--primary-color);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.nav-toggle:hover .hamburger-bg {
    width: 80px;
    height: 80px;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Company Slogan */
.company-slogan {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 1.5rem; /* Additional top margin for navbar clearance */
    animation: fadeInDown 1s ease-out 0.2s forwards;
    opacity: 0;
    transform: translateY(-30px);
    position: relative;
    z-index: 50; /* Higher z-index to ensure visibility */
    padding-top: 1.5rem; /* Increased padding */
}

.slogan-text {
    font-family: var(--font-primary);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    position: relative;
    z-index: 100;
    animation: glow 2s ease-in-out infinite alternate;
}

/* Hero Slogan Styles */
.hero-slogan {
    text-align: center;
    margin: 1.5rem 0;
    animation: fadeInUp 1s ease-out 0.8s both;
    opacity: 0;
    transform: translateY(20px);
}

.hero-slogan-text {
    font-family: var(--font-primary);
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: var(--glow-accent);
    letter-spacing: 2px;
    display: inline-block;
    position: relative;
    z-index: 50;
    animation: typewriterGlow 3s ease-in-out infinite;
}

[data-theme="dark"] .hero-slogan-text {
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
}

@keyframes typewriterGlow {
    0%, 100% { 
        text-shadow: var(--glow-accent);
        transform: scale(1);
    }
    50% { 
        text-shadow: var(--glow-accent), 0 0 20px currentColor;
        transform: scale(1.02);
    }
}

@keyframes sloganGlow {
    0%, 100% { opacity: 0; transform: translateX(-100%); }
    50% { opacity: 0.3; transform: translateX(100%); }
}

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

/* Star Animation Keyframes */
@keyframes starTwinkle {
    0%, 100% { 
        opacity: 0.3;
        filter: brightness(0.8);
    }
    25% { 
        opacity: 0.8;
        filter: brightness(1.2);
    }
    50% { 
        opacity: 0.6;
        filter: brightness(1);
    }
    75% { 
        opacity: 0.9;
        filter: brightness(1.3);
    }
}

@keyframes starMove {
    0% { 
        transform: translateY(0px);
    }
    100% { 
        transform: translateY(-10px);
    }
}

[data-theme="dark"] .slogan-text {
    color: var(--accent-color);
    text-shadow: var(--glow-accent), 0 0 40px rgba(255, 51, 51, 0.5);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    transition: var(--theme-transition);
    padding-top: 120px; /* Increased padding for better navbar clearance */
    box-sizing: border-box;
}

/* Starry Background Animation */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, var(--star-color), transparent),
        radial-gradient(2px 2px at 40px 70px, var(--star-color), transparent),
        radial-gradient(1px 1px at 90px 40px, var(--star-color), transparent),
        radial-gradient(1px 1px at 130px 80px, var(--star-color), transparent),
        radial-gradient(2px 2px at 160px 30px, var(--star-color), transparent),
        radial-gradient(1px 1px at 200px 90px, var(--star-color), transparent),
        radial-gradient(2px 2px at 240px 50px, var(--star-color), transparent),
        radial-gradient(1px 1px at 280px 10px, var(--star-color), transparent),
        radial-gradient(1px 1px at 320px 70px, var(--star-color), transparent),
        radial-gradient(2px 2px at 360px 40px, var(--star-color), transparent),
        radial-gradient(1px 1px at 400px 80px, var(--star-color), transparent),
        radial-gradient(2px 2px at 440px 20px, var(--star-color), transparent),
        radial-gradient(1px 1px at 480px 60px, var(--star-color), transparent),
        radial-gradient(2px 2px at 520px 90px, var(--star-color), transparent),
        radial-gradient(1px 1px at 560px 30px, var(--star-color), transparent),
        radial-gradient(1px 1px at 600px 70px, var(--star-color), transparent),
        radial-gradient(2px 2px at 640px 10px, var(--star-color), transparent),
        radial-gradient(1px 1px at 680px 50px, var(--star-color), transparent),
        radial-gradient(2px 2px at 720px 80px, var(--star-color), transparent),
        radial-gradient(1px 1px at 760px 40px, var(--star-color), transparent);
    background-repeat: repeat;
    background-size: 800px 100px;
    animation: starTwinkle 8s linear infinite, starMove 20s linear infinite;
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(220, 38, 38, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: var(--glow-primary);
    animation: float 6s ease-in-out infinite;
}

.floating-particles::before {
    top: 20%;
    left: 20%;
    animation-delay: -2s;
}

.floating-particles::after {
    top: 60%;
    right: 30%;
    animation-delay: -4s;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    z-index: 20;
    position: relative;
    transition: var(--theme-transition);
}

.hero-text {
    max-width: 600px;
    position: relative;
    z-index: 25;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    transition: var(--theme-transition);
}

/* Typewriter Animation Styles */
.typewriter-line-1,
.typewriter-line-2 {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.title-line-spacing {
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
}

.typewriter-line-2 {
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
}

/* Smooth typewriter reveal animation */
@keyframes typewriterReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typewriter-char {
    display: inline;
    opacity: 0;
    animation: typewriterReveal 0.3s ease forwards;
}

/* Ensure smooth performance on all devices */
@media (prefers-reduced-motion: reduce) {
    .typewriter-char {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .typewriter-line-1,
    .typewriter-line-2 {
        opacity: 1;
    }
}

/* Mobile optimization for typewriter */
@media (max-width: 768px) {
    .typewriter-char {
        animation-duration: 0.2s; /* Faster on mobile for better UX */
    }
    
    .hero-title {
        font-size: clamp(2rem, 6vw, 3.5rem); /* Better mobile scaling */
    }
}

.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.6s; }

.title-line.glow {
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.8s forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 1s forwards;
    opacity: 0;
    transform: translateY(30px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--bg-primary);
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: var(--glow-primary);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    transform: translateY(-3px);
    box-shadow: var(--glow-primary);
}

.btn-catalog {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: var(--bg-primary);
    box-shadow: var(--glow-secondary);
}

.btn-catalog:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(153, 27, 27, 0.4);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-circle {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.inner-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: var(--bg-primary);
    box-shadow: var(--glow-primary);
    animation: pulse 2s ease-in-out infinite;
}

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

.orbit-ring {
    position: absolute;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    animation: rotate 10s linear infinite;
}

.ring-1 {
    width: 150px;
    height: 150px;
    border-color: var(--primary-color);
    animation-duration: 8s;
}

.ring-2 {
    width: 200px;
    height: 200px;
    border-color: var(--secondary-color);
    animation-duration: 12s;
    animation-direction: reverse;
}

.ring-3 {
    width: 250px;
    height: 250px;
    border-color: var(--accent-color);
    animation-duration: 15s;
}

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

/* Services Section */
.services {
    padding: 8rem 0;
    background: var(--bg-secondary);
    transition: var(--theme-transition);
}

[data-theme="dark"] .services {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.service-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
    transition: var(--transition);
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--glow-primary), 0 8px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--bg-primary);
    box-shadow: var(--glow-primary);
}

.service-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.feature-tag {
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

/* About Section */
.about {
    padding: 8rem 0;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    transition: var(--theme-transition);
}

[data-theme="dark"] .about {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.hero-content {
    position: relative;
    z-index: 20; /* Ensure content appears above stars */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: justify;
}

.story-content {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 1rem;
    margin-bottom: 2rem;
}

/* Mobile-specific improvements for Our Story section */
@media (max-width: 768px) {
    .story-content {
        max-height: 300px;
        padding-right: 2rem; /* More space from scrollbar */
        padding-left: 0.5rem;
        margin-bottom: 2.5rem;
    }
    
    .about-description {
        font-size: 0.95rem;
        line-height: 1.7;
        text-align: left; /* Left align on mobile for better readability */
        padding-right: 1rem; /* Extra space from edge */
    }
    
    /* RTL support for Arabic text on mobile */
    html[dir="rtl"] .story-content {
        padding-left: 2rem; /* More space from scrollbar on RTL */
        padding-right: 0.5rem;
        direction: rtl;
    }
    
    html[dir="rtl"] .about-description {
        text-align: right; /* Right align for Arabic */
        padding-left: 1rem; /* Extra space from edge on RTL */
        padding-right: 0;
        direction: rtl;
    }
}

@media (max-width: 480px) {
    .story-content {
        max-height: 250px;
        padding-right: 2.5rem; /* Even more space from scrollbar */
        padding-left: 0.75rem;
        margin-bottom: 3rem;
    }
    
    .about-description {
        font-size: 0.9rem;
        line-height: 1.8;
        padding-right: 1.5rem; /* More space on small screens */
        margin-bottom: 0.5rem;
    }
    
    /* RTL support for Arabic text on small mobile */
    html[dir="rtl"] .story-content {
        padding-left: 2.5rem; /* Even more space from scrollbar on RTL */
        padding-right: 0.75rem;
    }
    
    html[dir="rtl"] .about-description {
        padding-left: 1.5rem; /* More space on small screens RTL */
        padding-right: 0;
    }
}

.story-content::-webkit-scrollbar {
    width: 6px;
}

/* Mobile scrollbar improvements */
@media (max-width: 768px) {
    .story-content::-webkit-scrollbar {
        width: 8px; /* Slightly wider for easier touch interaction */
    }

    /* RTL scrollbar positioning */
    html[dir="rtl"] .story-content::-webkit-scrollbar {
        left: 0;
        right: auto;
    }
}

@media (max-width: 480px) {
    .story-content::-webkit-scrollbar {
        width: 10px; /* Even wider on very small screens */
    }

    /* RTL scrollbar positioning for small screens */
    html[dir="rtl"] .story-content::-webkit-scrollbar {
        left: 0;
        right: auto;
    }
}

.story-content::-webkit-scrollbar-track {
    background: rgba(220, 38, 38, 0.1);
    border-radius: 3px;
}

.story-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
    box-shadow: var(--glow-primary);
}

/* Statistics Section */
.statistics {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    transition: var(--theme-transition);
}

[data-theme="dark"] .statistics {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 15px;
    transition: var(--theme-transition);
}

[data-theme="dark"] .stat-item {
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.stat-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--border-glow);
}

.stat-number {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.about-visual {
    display: flex;
    justify-content: center;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 300px;
}

.tech-item {
    width: 80px;
    height: 80px;
    background: var(--bg-card-dark);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--glow-primary);
}

/* Footer */
.footer {
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--text-primary);
    transition: var(--theme-transition);
}

[data-theme="dark"] .footer {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-top: 1px solid rgba(255, 0, 0, 0.3);
    color: var(--text-primary);
}

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

.footer-section h3 {
    font-family: var(--font-primary);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    box-shadow: var(--glow-primary);
}

.footer-logo span {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-description {
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Custom X Icon Styling */
.x-icon {
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
}

.social-link {
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--theme-transition);
}

[data-theme="dark"] .social-link {
    background: var(--bg-card);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.social-link:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: var(--glow-primary);
    background: rgba(220, 38, 38, 0.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin-bottom: 2rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer Badge Container - Under Tagline */
.footer-badge-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* AbuseIPDB Badge Under Tagline - Small and Subtle */
.abuseipdb-badge-tagline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: var(--transition);
    text-decoration: none;
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(220, 38, 38, 0.03);
    border: 1px solid rgba(220, 38, 38, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.abuseipdb-badge-tagline:hover {
    opacity: 0.85;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 3px 12px rgba(220, 38, 38, 0.15);
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.15);
}

[data-theme="dark"] .abuseipdb-badge-tagline {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 0, 0, 0.25);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .abuseipdb-badge-tagline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3), 0 4px 15px rgba(0, 0, 0, 0.4);
}

.abuseipdb-badge-tagline img {
    display: block;
    width: 80px;
    height: auto;
    filter: grayscale(0.6) opacity(0.8) saturate(0.7);
    transition: var(--transition);
    border-radius: 3px;
}

.abuseipdb-badge-tagline:hover img {
    filter: grayscale(0.2) opacity(1) saturate(1);
}

[data-theme="dark"] .abuseipdb-badge-tagline img {
    filter: grayscale(0.3) opacity(0.9) brightness(1.1) saturate(0.9) contrast(1.1);
}

[data-theme="dark"] .abuseipdb-badge-tagline:hover img {
    filter: grayscale(0.1) opacity(1) brightness(1.2) contrast(1.15) saturate(1.2);
}

/* RTL Support for Tagline Badge */
html[dir="rtl"] .footer-badge-container {
    direction: ltr; /* Keep badge centered regardless of text direction */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .abuseipdb-badge-tagline img {
        width: 70px;
    }
    
    .footer-badge-container {
        margin-top: 18px;
    }
    
    .abuseipdb-badge-tagline {
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .abuseipdb-badge-tagline img {
        width: 65px;
    }
    
    .footer-badge-container {
        margin-top: 16px;
    }
    
    .abuseipdb-badge-tagline {
        padding: 5px 7px;
    }
}

/* Comprehensive RTL Support for Arabic */
html[dir="rtl"] {
    font-family: 'JF Flat', 'Cairo', sans-serif;
}

/* RTL Navigation */
html[dir="rtl"] .nav-container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .brand-link {
    flex-direction: row-reverse;
    gap: 15px;
}

html[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .language-switcher {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-menu-wrapper {
    margin: 0 2rem 0 2rem;
}

/* RTL Content Sections */
html[dir="rtl"] .hero-content {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

html[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
}

html[dir="rtl"] .services-grid {
    direction: rtl;
}

html[dir="rtl"] .about-content {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

html[dir="rtl"] .footer-content {
    direction: rtl;
}

html[dir="rtl"] .social-links {
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn i {
    order: -1;
    margin-right: 0;
    margin-left: 0.5rem;
}

/* RTL Text Alignment */
html[dir="rtl"] .brand-text,
html[dir="rtl"] .nav-text,
html[dir="rtl"] .lang-text {
    text-align: right;
}

/* RTL Indicators and Effects */
html[dir="rtl"] .nav-indicator {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

html[dir="rtl"] .lang-indicator {
    right: 0;
    left: auto;
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
    /* Enhanced Mobile Navigation */
    .navbar {
        min-height: 70px;
        padding: 0.5rem 0;
    }
    
    /* Hero Section Mobile Adjustments */
    .hero {
        padding-top: 90px; /* Increased padding for mobile navbar clearance */
        min-height: calc(100vh - 10px); /* Slight adjustment for mobile */
    }
    
    .company-slogan {
        margin-bottom: 1.5rem;
        margin-top: 1rem; /* Additional top margin for mobile */
        padding-top: 1rem; /* Increased padding for mobile */
    }
    
    .hero-slogan {
        margin: 1rem 0;
    }
    
    .hero-slogan-text {
        font-size: clamp(1rem, 2vw, 1.4rem);
        letter-spacing: 1.5px;
    }
    
    /* Mobile Star Adjustments */
    .hero::before {
        background-size: 400px 50px; /* Smaller pattern for mobile */
        opacity: 0.4; /* Slightly less opacity on mobile */
    }
    
    .nav-container {
        padding: 0.75rem 1.5rem;
    }
    
    /* Show Mobile Toggle */
    .nav-toggle {
        display: flex;
    }
    
    /* Mobile Menu Wrapper */
    .nav-menu-wrapper {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 999;
        margin: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    [data-theme="dark"] .nav-menu-wrapper {
        background: rgba(0, 0, 0, 0.95);
    }
    
    /* Active state for LTR */
    .nav-menu-wrapper.active {
        left: 0;
        transform: translateX(0);
    }
    
    /* Initial state for better animation */
    .nav-menu-wrapper {
        transform: translateX(-100%);
    }
    
    .nav-menu-wrapper.active {
        transform: translateX(0);
    }
    
    .nav-menu {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 1rem;
        gap: 1.5rem;
        background: transparent;
        border: none;
        border-radius: 0;
        height: 100%;
        overflow-y: auto;
    }
    
    .nav-item {
        width: 100%;
        max-width: 300px;
    }
    
    .nav-link {
        width: 100%;
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
        border: 1px solid rgba(220, 38, 38, 0.2);
        border-radius: 15px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        margin: 0.5rem 0;
        text-align: center;
        justify-content: center;
    }
    
    [data-theme="dark"] .nav-link {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 0, 0, 0.3);
    }
    
    .nav-link:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
        border-color: var(--primary-color);
    }
    
    /* Mobile Actions */
    .nav-actions {
        gap: 0.75rem;
    }
    
    .action-btn {
        width: 40px;
        height: 40px;
    }
    
    .action-btn i {
        font-size: 1rem;
    }
    
    /* Mobile Language Switcher */
    .language-switcher {
        padding: 0.2rem;
        gap: 0.1rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-width: 40px;
    }
    
    /* RTL Mobile Support */
    html[dir="rtl"] .nav-menu-wrapper {
        right: -100%;
        left: auto;
        transform: translateX(100%);
    }
    
    html[dir="rtl"] .nav-menu-wrapper.active {
        right: 0;
        left: auto;
        transform: translateX(0);
    }
    
    html[dir="rtl"] .nav-menu {
        flex-direction: column;
        text-align: right;
    }
    
    html[dir="rtl"] .nav-actions {
        flex-direction: row-reverse;
    }
    
    html[dir="rtl"] .nav-link {
        text-align: center; /* Keep centered for better mobile UX */
    }
    
    /* Force mobile layout for about section */
    .about .about-content {
        display: flex !important;
        flex-direction: column !important;
    }
}

/* Small screens - additional mobile optimizations */
@media (max-width: 480px) {
    /* Extra Small Screen Hero Adjustments */
    .hero {
        padding-top: 80px; /* Increased for better navbar clearance on small screens */
    }
    
    .company-slogan {
        margin-bottom: 1rem;
        margin-top: 0.75rem; /* Additional top margin for small screens */
        padding-top: 0.75rem; /* Increased padding for small screens */
    }
    
    .slogan-text {
        font-size: clamp(1rem, 4vw, 1.5rem);
        letter-spacing: 2px;
    }
    
    /* Small Screen Star Adjustments */
    .hero::before {
        background-size: 300px 40px; /* Even smaller pattern for small screens */
        opacity: 0.3; /* Reduced opacity for better text readability */
    }
    
    .nav-container {
        padding: 0.5rem 1rem;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .action-btn {
        width: 38px;
        height: 38px;
    }
    
    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        min-width: 35px;
    }
    
    .nav-menu {
        padding: 1.5rem 1rem;
        gap: 1.2rem;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        width: 90%;
        max-width: 280px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-out;
}

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

/* Get in Touch Button Styles */
.hero-cta {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
    padding: 0 1rem; /* Add padding for mobile edge spacing */
    animation: fadeInUp 1s ease-out 1.2s both;
}

.btn-get-in-touch {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(220, 38, 38, 0.9) 0%, 
        rgba(239, 68, 68, 0.9) 50%, 
        rgba(220, 38, 38, 0.9) 100%);
    border: 2px solid rgba(220, 38, 38, 0.6);
    border-radius: 50px;
    padding: 1.2rem 2.5rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(220, 38, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(0);
    animation: buttonFloat 3s ease-in-out infinite;
    margin: 0 auto; /* Ensure button is centered */
    display: block; /* Make it a block element for better centering */
    width: fit-content; /* Only take up necessary width */
}

[data-theme="dark"] .btn-get-in-touch {
    background: linear-gradient(135deg, 
        rgba(255, 0, 0, 0.8) 0%, 
        rgba(255, 51, 51, 0.8) 50%, 
        rgba(255, 0, 0, 0.8) 100%);
    border: 2px solid rgba(255, 0, 0, 0.6);
    box-shadow: 
        0 8px 32px rgba(255, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-get-in-touch:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(220, 38, 38, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(220, 38, 38, 0.8);
}

[data-theme="dark"] .btn-get-in-touch:hover {
    box-shadow: 
        0 15px 40px rgba(255, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 0, 0, 0.9);
}

.btn-get-in-touch:active {
    transform: translateY(-2px) scale(1.02);
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    z-index: 2;
}

.btn-content i {
    font-size: 1.2rem;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.btn-text {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-get-in-touch:hover .btn-arrow {
    transform: translateY(3px);
    animation: arrowBounce 1s ease-in-out infinite;
}

.btn-glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.btn-get-in-touch:hover .btn-glow-effect {
    width: 200px;
    height: 200px;
}

.btn-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 50px;
}

.btn-particles::before,
.btn-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: particleFloat 2s ease-in-out infinite;
}

.btn-particles::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.btn-particles::after {
    top: 70%;
    right: 20%;
    animation-delay: 1s;
}

/* Button Animations */
@keyframes buttonFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(3px);
    }
    50% {
        transform: translateY(8px);
    }
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(0px) scale(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0);
    }
}

/* RTL Support for Get in Touch Button */
html[dir="rtl"] .btn-content {
    flex-direction: row-reverse; /* Reverse order for RTL */
}

html[dir="rtl"] .btn-text {
    text-align: center; /* Center text for RTL */
}

html[dir="rtl"] .hero-cta {
    direction: ltr; /* Keep button content LTR for proper icon alignment */
}

/* Responsive Design for Get in Touch Button */
@media (max-width: 768px) {
    .hero-cta {
        margin-top: 1.5rem;
        padding: 0 1.5rem; /* Increased padding for better mobile spacing */
    }
    
    .btn-get-in-touch {
        padding: 1rem 2rem;
        width: auto; /* Changed from 100% to auto for better centering */
        max-width: 280px;
        margin: 0 auto; /* Ensure centering on mobile */
    }
    
    .btn-text {
        font-size: 1rem;
    }
    
    .btn-content i {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        padding: 0 1rem; /* Reduced padding for very small screens */
    }
    
    .btn-get-in-touch {
        padding: 0.9rem 1.8rem;
        max-width: 250px;
        margin: 0 auto; /* Ensure centering on small screens */
    }
    
    .btn-text {
        font-size: 0.95rem;
    }
    
    .btn-content {
        gap: 0.6rem;
    }
}

/* 404 Error Page Styles */
.error-page {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.error-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}

.error-background .grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(220, 38, 38, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

.error-background .floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.error-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
}

/* Error Navigation */
.error-nav {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .error-nav {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 0, 0, 0.3);
}

/* Error Content */
.error-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

.error-wrapper {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Error Code Display */
.error-code-section {
    position: relative;
    margin-bottom: 3rem;
}

.error-code-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.error-digit {
    font-family: var(--font-primary);
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
    position: relative;
    animation: digitGlow 2s ease-in-out infinite alternate;
}

.error-zero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zero-ring {
    width: 120px;
    height: 120px;
    border: 8px solid var(--primary-color);
    border-radius: 50%;
    position: relative;
    animation: rotate 10s linear infinite;
    box-shadow: 
        0 0 20px rgba(220, 38, 38, 0.5),
        inset 0 0 20px rgba(220, 38, 38, 0.2);
}

.zero-core {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.error-code-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(220, 38, 38, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulse 3s ease-in-out infinite;
}

/* Error Message */
.error-message {
    margin-bottom: 3rem;
}

.error-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    animation: fadeInUp 1s ease-out 0.5s both;
}

.error-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.7s both;
}

.error-description {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.9s both;
}

/* Company Branding */
.error-branding {
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 1.1s both;
}

.company-name-arabic {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

.company-slogan {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Error Actions */
.error-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 1.3s both;
}

.error-btn-home,
.error-btn-contact {
    position: relative;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.error-btn-home {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 2px solid transparent;
}

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

.error-btn-home:hover,
.error-btn-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.error-btn-contact:hover {
    background: var(--primary-color);
    color: white;
}

/* Error Links */
.error-links {
    animation: fadeInUp 1s ease-out 1.5s both;
}

.links-title {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.error-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

[data-theme="dark"] .error-link {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.error-link:hover {
    transform: translateY(-5px);
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.2);
}

.error-link i {
    font-size: 1.5rem;
}

.error-link span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Error Footer */
.error-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(220, 38, 38, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .error-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 0, 0, 0.2);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Animations */
@keyframes digitGlow {
    0% { text-shadow: 0 0 30px rgba(220, 38, 38, 0.5); }
    100% { text-shadow: 0 0 50px rgba(220, 38, 38, 0.8), 0 0 70px rgba(220, 38, 38, 0.4); }
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* RTL Support for 404 Page */
html[dir="rtl"] .error-code-display {
    flex-direction: row-reverse;
}

html[dir="rtl"] .error-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .links-grid {
    direction: rtl;
}

html[dir="rtl"] .error-link {
    text-align: center;
}

/* RTL Support for Hero Slogan */
html[dir="rtl"] .hero-slogan {
    text-align: center;
    direction: rtl;
}

html[dir="rtl"] .hero-slogan-text {
    text-align: center;
}

/* Responsive Design for 404 Page */
@media (max-width: 768px) {
    .error-digit {
        font-size: 5rem;
    }
    
    .zero-ring {
        width: 80px;
        height: 80px;
        border-width: 6px;
    }
    
    .zero-core {
        width: 25px;
        height: 25px;
    }
    
    .error-title {
        font-size: 2rem;
    }
    
    .error-subtitle {
        font-size: 1.1rem;
    }
    
    .company-name-arabic {
        font-size: 1.5rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .error-btn-home,
    .error-btn-contact {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .error-wrapper {
        padding: 1rem;
    }
    
    .error-digit {
        font-size: 4rem;
    }
    
    .zero-ring {
        width: 60px;
        height: 60px;
        border-width: 4px;
    }
    
    .zero-core {
        width: 20px;
        height: 20px;
    }
    
    .error-title {
        font-size: 1.8rem;
    }
    
    .company-name-arabic {
        font-size: 1.3rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
        max-width: 250px;
    }
    
    .error-link {
        padding: 0.8rem;
    }
}
@media (max-width: 480px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .nav-actions {
        gap: 0.25rem;
    }
    
    .theme-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .lang-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
        min-width: 32px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .nav-link {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 90%;
        max-width: 280px;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }

    .tech-circle {
        width: 200px;
        height: 200px;
    }
}

/* Additional responsive styles for very small screens */
@media (max-width: 360px) {
    .inner-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .ring-1 { width: 100px; height: 100px; }
    .ring-2 { width: 130px; height: 130px; }
    .ring-3 { width: 160px; height: 160px; }
    
    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .tech-item {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.2), transparent);
    animation: loading 1.5s infinite;
}

[data-theme="dark"] .loading::after {
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.3), transparent);
}

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

/* Additional Theme-Specific Enhancements */
[data-theme="dark"] .service-card:hover {
    box-shadow: var(--glow-primary), 0 8px 30px rgba(255, 0, 0, 0.2);
}

[data-theme="dark"] .tech-item:hover {
    box-shadow: var(--glow-accent);
}

[data-theme="dark"] .social-link:hover {
    background: rgba(255, 0, 0, 0.1);
}

/* Enhanced Mobile Responsiveness for Both Themes */
@media (max-width: 480px) {
    .theme-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .company-slogan {
        margin-bottom: 1.5rem;
    }
    
    .slogan-text {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    [data-theme="dark"] .slogan-text {
        text-shadow: var(--glow-accent), 0 0 20px rgba(255, 51, 51, 0.3);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .theme-transitioning * {
        transition: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --glow-primary: none;
        --glow-secondary: none;
        --glow-accent: none;
        --border-glow: none;
    }
    
    [data-theme="dark"] {
        --glow-primary: none;
        --glow-secondary: none;
        --glow-accent: none;
        --border-glow: none;
    }
}
