/* PWA Install Button Styles */
.pwa-install-btn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 1000;
    background: linear-gradient(135deg, #38bdf8, #1d4ed8);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
}

.pwa-install-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.pwa-install-btn i {
    font-size: 1.2rem;
}

/* Global Reset & Box Sizing */
:root {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --primary-color: #38bdf8;
    /* Sky Blue */
    --secondary-color: #eab308;
    /* Yellow/Gold */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --gold-gradient: linear-gradient(135deg, #fcd34d 0%, #d97706 100%);

    --font-main: 'Cairo', sans-serif;
    --transition: all 0.3s ease;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --container-width: 1200px;
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --surface-hover: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    /* Slightly darker blue for contrast */
    --primary-color: #0284c7;
    /* Adjust gradient to be stronger in light mode */
    --accent-gradient: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);

    /* Shadow tweaks for light mode */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .hero {
    background: radial-gradient(circle at 20% 50%, rgba(2, 132, 199, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(234, 179, 8, 0.05) 0%, transparent 40%);
}

[data-theme="light"] .form-control {
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .form-control:focus {
    background: white;
}

[data-theme="light"] footer {
    background: #f1f5f9;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .social-icon {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

[data-theme="light"] .social-icon:hover {
    color: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 5rem 0;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color);
}

.text-gold {
    color: var(--secondary-color);
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: inline-block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Theme Toggle Button */
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

#lang-toggle span {
    font-size: 0.85rem;
    font-weight: 800;
    font-family: var(--font-main);
}

.list-icon {
    margin-left: 10px;
}

[dir="ltr"] .list-icon {
    margin-left: 0;
    margin-right: 10px;
}

.nav-menu-group {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-contact-btn {
    padding: 0.5rem 1.4rem;
    border-radius: 50px;
    font-size: 1rem;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

[data-theme="light"] .theme-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Typography */
h1,
h2,
h3,
h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 800;
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.logo-img {
    height: 45px;
    /* Slightly smaller to balance with text */
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links li a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at 20% 50%, rgba(56, 189, 248, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(234, 179, 8, 0.05) 0%, transparent 40%);
    padding-top: 80px;
    /* Offset for fixed header */
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
}

.hero-text h1 span {
    color: var(--primary-color);
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
    border: 4px solid rgba(255, 255, 255, 0.1);
    background-color: #ffffff;
    /* White background */
    padding: 3rem;
    /* Generous padding for the logo */
}

[data-theme="light"] .hero-image img {
    border: 4px solid rgba(0, 0, 0, 0.1);
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 4px solid var(--secondary-color);
    border-radius: 20px;
    z-index: 1;
}

/* Services / Cards Common */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.15);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Specific Sections */
.bg-surface {
    background-color: var(--surface-color);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 3rem;
    border-radius: 20px;
    margin-top: 3rem;
}

[data-theme="light"] .stats-container {
    background: rgba(0, 0, 0, 0.03);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Consultation Form */
.form-box {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 20px;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .form-box {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.8);
}

/* Footer */
footer {
    background: #0b1120;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: white;
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text p {
        margin: 0 auto 2.5rem;
    }

    .cta-group {
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hamburger {
        display: block;
        color: var(--text-primary);
        /* Changed to variable */
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        /* Left since RTL, wait... fixed positioned relative to viewport */
        right: 0;
        background: var(--surface-color);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        border-bottom: 2px solid var(--primary-color);
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .hero-image {
        max-width: 400px;
        margin: 0 auto;
    }

    /* Hide desktop button and show mobile one */
    .desktop-only {
        display: none;
    }

    .logo-img {
        height: 32px;
    }

    .logo {
        gap: 0.4rem;
    }

    .mobile-only {
        display: block;
    }

    /* Show logo text on mobile but smaller */
    .logo-text {
        display: block;
        font-size: 1.1rem;
    }

    .nav-menu-group {
        gap: 0.3rem;
    }

    .nav-controls {
        gap: 0.3rem;
    }

    .theme-btn {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    h2 {
        font-size: 2rem;
    }
}

/* Team Section Styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-card {
    background: var(--surface-color);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
}

[data-theme="light"] .team-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
}

.team-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.15);
}

.team-image {
    width: 100%;
    height: 350px;
    /* Tall portrait style */
    overflow: hidden;
    position: relative;
    background-color: var(--bg-color);
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image img {
    transform: scale(1.05);
}

.team-info {
    padding: 1.5rem;
}

.team-info h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.team-info p {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

/* WhatsApp Floating Widget */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-direction: row;
}

[dir="ltr"] .whatsapp-widget {
    right: auto;
    left: 30px;
    flex-direction: row-reverse;
}

.whatsapp-btn {
    width: 65px;
    height: 65px;
    background: #25d366;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-tooltip {
    background: var(--surface-color);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
    pointer-events: none;
    position: relative;
}

[dir="ltr"] .whatsapp-tooltip {
    transform: translateX(20px);
}

.whatsapp-widget:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Tooltip Arrow */
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent var(--surface-color);
    display: block;
}

[dir="ltr"] .whatsapp-tooltip::after {
    right: auto;
    left: -10px;
    border-color: transparent var(--surface-color) transparent transparent;
}

/* Pulse Animation */
.pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #25d366;
    border-radius: 50%;
    z-index: -1;
    animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@media (max-width: 600px) {
    .whatsapp-widget {
        bottom: 20px;
        right: 20px;
    }

    [dir="ltr"] .whatsapp-widget {
        left: 20px;
        right: auto;
    }

    .whatsapp-btn {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }

    .whatsapp-tooltip {
        display: none;
    }
}

/* Pricing Section Styles */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    align-items: center;
    margin-top: 2rem;
}

.pricing-card {
    background: var(--surface-color);
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .pricing-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 20px 40px rgba(56, 189, 248, 0.1);
}

.pricing-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.pricing-header {
    margin-bottom: 2rem;
}

.pricing-header h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 1.5rem 0;
}

.currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.badge {
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--gold-gradient);
    color: #000;
    padding: 8px 45px;
    font-size: 0.8rem;
    font-weight: 800;
    transform: rotate(45deg);
    box-shadow: 0 5px 15px rgba(217, 119, 6, 0.3);
}

[dir="ltr"] .badge {
    right: auto;
    left: -35px;
    transform: rotate(-45deg);
}

.pricing-features {
    text-align: right;
    margin-bottom: 2.5rem;
}

[dir="ltr"] .pricing-features {
    text-align: left;
}

.pricing-features li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
}

.pricing-features li i {
    color: var(--secondary-color);
}

@media (max-width: 900px) {
    .pricing-card.featured {
        transform: scale(1);
    }

    .pricing-card.featured:hover {
        transform: translateY(-10px);
    }
}