/* -------------------------------------
   1. Root Variables & Reset
------------------------------------- */
:root {
    --primary-color: #10b981; /* زمردي جذاب */
    --primary-glow: rgba(16, 185, 129, 0.15);
    --bg-dark: #0f172a;
    --card-dark: #1e293b;
    --text-dark: #f8fafc;
    --text-muted-dark: #94a3b8;
    --border-dark: #334155;
    
    --bg-light: #f8fafc;
    --card-light: #ffffff;
    --text-light: #0f172a;
    --text-muted-light: #64748b;
    --border-light: #e2e8f0;
    
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* افتراضياً وضع داكن */
    --body-bg: var(--bg-dark);
    --card-bg: var(--card-dark);
    --text-color: var(--text-dark);
    --text-muted: var(--text-muted-dark);
    --border-color: var(--border-dark);
    --nav-bg: rgba(15, 23, 42, 0.7);
}

/* سمة الوضع الفاتح */
body.light-theme {
    --body-bg: var(--bg-light);
    --card-bg: var(--card-light);
    --text-color: var(--text-light);
    --text-muted: var(--text-muted-light);
    --border-color: var(--border-light);
    --nav-bg: rgba(248, 250, 252, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--body-bg);
    color: var(--text-color);
    transition: background-color var(--transition-fast), color var(--transition-fast);
    overflow-x: hidden;
}

ul {
    list-style: none;
}

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

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

.section-padding {
    padding: 100px 0;
}

/* -------------------------------------
   2. Components & Typography
------------------------------------- */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
}

.section-header .line {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    border: 1px solid var(--border-color);
    background-color: transparent;
}

.btn-secondary:hover {
    background-color: var(--card-bg);
    transform: translateY(-3px);
}

/* -------------------------------------
   3. Navbar
------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.navbar.sticky {
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.nav-logo span {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

#theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition-fast);
    border-radius: 2px;
}

/* -------------------------------------
   4. Hero Section
------------------------------------- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding: 120px 20px 60px;
}

.hero-container {
    max-width: 800px;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 25px;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero-bg-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary-glow);
    filter: blur(100px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

/* -------------------------------------
   5. Services Section
------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 100px));
    gap: 30px;
    justify-content: center;
}

.service-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 16px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-glow), transparent);
    opacity: 0;
    transition: var(--transition-fast);
}

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

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

.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    transition: var(--transition-fast);
}

.service-card:hover class-icon {
    background-color: var(--primary-color);
    color: #ffffff;
}

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

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* -------------------------------------
   6. Features Section
------------------------------------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 100px));
    gap: 40px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-item h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* -------------------------------------
   7. Portfolio Section
------------------------------------- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 100px));
    gap: 30px;
    justify-content: center;
}

.portfolio-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.portfolio-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.portfolio-info {
    padding: 25px;
}

.portfolio-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.portfolio-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* -------------------------------------
   8. Testimonials Section
------------------------------------- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(45%, 100px));
    gap: 30px;
    justify-content: center;
}

.testimonial-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card .stars {
    color: #fbbf24; /* لون ذهبي للنجوم */
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.testimonial-card .feedback {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
    font-style: italic;
    margin-bottom: 25px;
}

.client-info h5 {
    font-size: 1rem;
    font-weight: 700;
}

.client-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* -------------------------------------
   9. CTA Section
------------------------------------- */
.cta-section {
    background: linear-gradient(180deg, transparent, var(--primary-glow));
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 60px 40px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.cta-container h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.cta-container p {
    color: var(--text-muted);
    margin-bottom: 35px;
    line-height: 1.7;
}

.btn-cta {
    background-color: #25d366; /* لون واتساب الرسمي */
    color: #ffffff;
    font-size: 1.1rem;
    padding: 15px 40px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.btn-cta:hover {
    background-color: #20ba5a;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
}

/* -------------------------------------
   10. Footer
------------------------------------- */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    background-color: var(--body-bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-socials a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* -------------------------------------
   11. Floating UI & Animations
------------------------------------- */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999;
    transition: var(--transition-smooth);
}

.floating-whatsapp:hover {
    transform: scale(1.1) rotate(10deg);
    background-color: #20ba5a;
}

/* Scroll Reveal Engine Setup */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* -------------------------------------
   12. Responsive Design (Media Queries)
------------------------------------- */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.8rem;
    }
    .testimonials-grid {
        grid-template-columns: 100%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--body-bg);
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: var(--transition-smooth);
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btns .btn {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
