/*
Theme Name: Car Star
Theme URI: https://carstar.sa
Author: Car Star Development Team
Author URI: https://carstar.sa
Description: قالب مخصص لمركز Car Star لصيانة السيارات الصينية - Custom theme for Car Star Chinese Car Maintenance Center. Features bilingual support (AR/EN), dark/light mode, and premium Apple/Tesla inspired design.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: carstar
Tags: one-page, rtl-language-support, custom-logo, custom-colors, featured-images

Car Star Theme - مركز صيانة السيارات الصينية
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* =====================================================
   CSS VARIABLES - DESIGN TOKENS
   ===================================================== */
:root {
    /* Colors - Light Mode */
    --color-primary: #1e4a7a;
    --color-primary-dark: #0f2942;
    --color-secondary: #2563a8;
    --color-accent: #f0c14b;
    --color-accent-bright: #ffd700;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-dark: #0f2942;
    
    /* Text Colors */
    --text-primary: #0f2942;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #ffffff;
    
    /* Gradient */
    --gradient-primary: linear-gradient(135deg, #1e4a7a 0%, #2563a8 100%);
    --gradient-gold: linear-gradient(135deg, #f0c14b 0%, #ffd700 100%);
    --gradient-dark: linear-gradient(180deg, #0f2942 0%, #1a3a5c 100%);
    
    /* Typography */
    --font-primary: 'Cairo', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 4rem;
    
    /* Font Weights */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 30px rgba(30, 74, 122, 0.3);
    --shadow-gold: 0 0 30px rgba(240, 193, 75, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-smooth: 300ms cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
    
    /* Container */
    --container-max: 1280px;
    --container-padding: 1.5rem;
    
    /* Navbar */
    --navbar-height: 80px;
}

/* =====================================================
   DARK MODE VARIABLES
   ===================================================== */
[data-theme="dark"] {
    --bg-primary: #0a1929;
    --bg-secondary: #0f2942;
    --bg-tertiary: #1a3a5c;
    --bg-dark: #050d18;
    
    --text-primary: #ffffff;
    --text-secondary: #cbd5e0;
    --text-muted: #a0aec0;
    
    --color-primary: #3b82f6;
    --color-secondary: #60a5fa;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.4);
}

/* =====================================================
   BASE STYLES
   ===================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: var(--navbar-height);
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-regular);
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* RTL Support */
html[dir="rtl"] body {
    text-align: right;
}

html[dir="ltr"] body {
    text-align: left;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-bold);
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--color-accent);
}

/* =====================================================
   CONTAINER
   ===================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-center { text-align: center; }
.text-gradient {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section {
    padding: var(--space-5xl) 0;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-extrabold);
    margin-bottom: var(--space-md);
    position: relative;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-3xl);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-semibold);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--color-primary-dark);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(240, 193, 75, 0.5);
    color: var(--color-primary-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
    background: var(--color-accent);
    color: var(--color-primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-outline:hover {
    background: var(--text-light);
    color: var(--color-primary-dark);
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-2xl);
    color: var(--text-light);
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-sm);
}

.card-text {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

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

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes scroll-indicator {
    0% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.5; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }
.animate-delay-6 { transition-delay: 0.6s; }

/* =====================================================
   RESPONSIVE TYPOGRAPHY
   ===================================================== */
@media (max-width: 768px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.5rem;
        --navbar-height: 70px;
    }
    
    .section {
        padding: var(--space-3xl) 0;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-5xl: 2rem;
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.25rem;
        --container-padding: 1rem;
    }
}
