/* =======================
   Core Fix - CSS Theme
   Target: Midnight Tech
   ======================= */

:root {
    --bg-dark: #0a0f1a;
    --bg-secondary: #0d1323;
    --bg-card: rgba(18, 26, 47, 0.6);
    
    --primary-cyan: #00e5ff;
    --primary-blue: #2979ff;
    --primary-gradient: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    
    --text-main: #f0f4f8;
    --text-muted: #8b9bb4;
    
    --border-light: rgba(255, 255, 255, 0.05);
    --border-glow: rgba(0, 229, 255, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --font-tajawal: 'Tajawal', sans-serif;
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-tajawal);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography & Utilities */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
}

.highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.text-center {
    text-align: center;
}
.mt-4 {
    margin-top: 2rem;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-cyan));
    z-index: -1;
    transition: var(--transition);
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-cyan);
    transform: translateY(-2px);
}

.btn-primary-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--primary-cyan);
    padding: 10px 24px;
    border: 1px solid var(--primary-cyan);
    border-radius: var(--radius-md);
    font-weight: 700;
}

.btn-primary-outline:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border-light);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    padding: 8px 24px;
    border-radius: 50px;
    border: 1.5px solid rgba(0, 229, 255, 0.4);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 229, 255, 0.2);
    transition: var(--transition);
}

.logo:hover {
    border-color: rgba(0, 229, 255, 0.7);
    box-shadow:
        0 6px 30px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(0, 229, 255, 0.4);
    transform: translateY(-2px);
}

.logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
}

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

.nav-links a {
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
}

.nav-links a:not(.btn-primary-outline):hover {
    color: var(--primary-cyan);
}

.nav-links a:not(.btn-primary-outline)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.nav-links a:not(.btn-primary-outline):hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-cyan);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-tajawal);
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
}

.lang-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 229, 255, 0.3);
}

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

.hero-bg-glow {
    position: absolute;
    top: 20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(41, 121, 255, 0.15) 0%, rgba(10, 15, 26, 0) 70%);
    z-index: -1;
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.1) 0%, rgba(10, 15, 26, 0) 70%);
    z-index: -1;
    border-radius: 50%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--primary-cyan);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* Hero Image & Animations */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: var(--bg-secondary);
    border-radius: 40px;
    border: 4px solid #1a253c;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0, 229, 255, 0.2);
    position: relative;
    padding: 10px;
    animation: float 6s ease-in-out infinite;
}

/* Dynamic screen simulation */
.screen {
    width: 100%;
    height: 100%;
    background: #060913;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--primary-cyan);
    font-family: monospace;
}

.scanning-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-cyan);
    box-shadow: 0 0 10px var(--primary-cyan);
    animation: scan 3s linear infinite;
}

.rotating-icon {
    font-size: 3rem;
    animation: spin 4s linear infinite;
    margin-bottom: 15px;
}

.status-ok {
    margin-top: 20px;
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    opacity: 0;
    animation: fadeInOut 4s linear infinite;
}

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

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

@keyframes scan {
    0% { top: 0; opacity: 1; }
    90% { top: 100%; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@keyframes fadeInOut {
    0%, 40% { opacity: 0; }
    50%, 90% { opacity: 1; }
    100% { opacity: 0; }
}


/* Tracking Widget Section */
.tracking-section {
    padding: 60px 0;
    background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.05) 0%, transparent 70%);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.tracking-center {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.tracking-badge-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-cyan));
    border-radius: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    box-shadow: 0 6px 25px rgba(0, 229, 255, 0.35);
}

.tracking-center h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tracking-center > p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.tracking-search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.tracking-search-row input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(0, 229, 255, 0.4);
    border-radius: 12px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    padding: 14px 18px;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: inset 0 0 20px rgba(0,229,255,0.03);
}

.tracking-search-row input:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15), inset 0 0 20px rgba(0,229,255,0.05);
}

.tracking-search-row input::placeholder {
    color: rgba(139, 155, 180, 0.6);
    text-transform: none;
    letter-spacing: 0;
    font-family: var(--font-tajawal);
    font-size: 0.9rem;
}

.tracking-search-row button {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-tajawal);
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 24px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
    transition: var(--transition);
}

.tracking-search-row button:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.tracking-full-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    opacity: 0.7;
    transition: var(--transition);
}

.tracking-full-link:hover { opacity: 1; }

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    text-align: right;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(0, 229, 255, 0.05), transparent 60%);
    opacity: 0;
    transition: var(--transition);
}

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

.service-card:hover::before {
    opacity: 1;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(41, 121, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 25px;
    transition: var(--transition);
}

.service-card:hover .icon-wrapper {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.4);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
}

/* Brand Tabs */
.brand-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-tajawal);
}

.brand-tab:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
}

.brand-tab.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.brand-grid {
    display: none !important;
}

.brand-grid.active {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.part-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Shop Section */
.dark-bg {
    background-color: var(--bg-secondary);
}

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

.product-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(41, 121, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.product-image {
    height: 220px;
    background: linear-gradient(180deg, rgba(26, 37, 60, 0.5) 0%, rgba(10, 15, 26, 1) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.part-icon {
    font-size: 5rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.product-card:hover .part-icon {
    color: var(--primary-cyan);
    transform: scale(1.1);
}

.product-info {
    padding: 30px;
}

.category {
    font-size: 0.85rem;
    color: var(--primary-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-cyan);
    margin-bottom: 20px;
}

.btn-buy {
    width: 100%;
    padding: 12px;
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.3);
    color: #25D366;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    text-decoration: none;
}

.product-card:hover .btn-buy,
.btn-buy:hover {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* Features / Why Us */
.features-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.features-list {
    margin-top: 40px;
}

.features-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.features-list h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.features-list p {
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 30px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}

.stat-box:hover {
    border-color: var(--primary-blue);
    transform: translateY(-5px);
}

.counter {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-cyan);
    margin-bottom: 10px;
}

.stat-box p {
    color: var(--text-muted);
    font-weight: 500;
}

/* Footer */
.footer {
    background: #05080e;
    padding-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 55px;
    width: auto;
    margin-bottom: 20px;
    object-fit: contain;
    background: #fff;
    padding: 8px 18px;
    border-radius: 40px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 229, 255, 0.1);
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 400px;
}

.footer-links h3, .footer-contact h3 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after, .footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-cyan);
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    color: var(--text-muted);
}

.footer-links ul li a:hover {
    color: var(--primary-cyan);
    padding-right: 5px;
}

.footer-contact ul li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.footer-contact ul li i {
    color: var(--primary-blue);
    font-size: 1.2rem;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-main);
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--primary-gradient);
    transform: translateY(-3px);
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content, .features-wrapper, .footer-top {
        grid-template-columns: 1fr;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        margin-top: 40px;
    }
    
    .features-text {
        text-align: center;
    }
    
    .features-list li {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links h3::after, .footer-contact h3::after {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
    
    .footer-links, .footer-contact, .footer-brand p {
        text-align: center;
        margin: 0 auto;
    }
    
    .footer-contact ul li {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .nav-links {
        display: none; /* In a real app, add a JS mobile menu toggle */
    }
    
    .mobile-menu-btn {
        display: block;
    }
}
