/* ==================== CSS Variables ==================== */
:root {
    --primary-color: #5a67d8;
    --primary-dark: #4c51bf;
    --primary-light: #7c8ef6;
    --secondary-color: #6b46c1;
    --accent-color: #f093fb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --text-primary: #1a202c;
    --text-secondary: #2d3748;
    --text-light: #4a5568;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    
    --gradient-primary: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    --transition-speed: 0.3s;
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.8;
    direction: rtl;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== Navigation ==================== */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-speed);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(90, 103, 216, 0.2);
    letter-spacing: -0.02em;
}

.logo i {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 4px rgba(90, 103, 216, 0.3));
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color var(--transition-speed);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-speed);
}

.nav-links a:hover::after {
    width: 100%;
}

.admin-link {
    padding: 0.6rem 1.8rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white !important;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.25);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.admin-link::before {
    content: '🔐';
    margin-left: 0.5rem;
    font-size: 1rem;
}

.admin-link:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(90, 103, 216, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
}

.admin-link::after {
    width: 0 !important;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 2rem;
    transition: right var(--transition-speed);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

.mobile-menu a:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

/* ==================== Hero Section ==================== */
.hero {
    padding: 150px 0 100px;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.8rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-direction: row-reverse;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    line-height: 1.3;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    letter-spacing: -0.02em;
}

/* Gradient text - default for hero section (white on purple background) */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    font-weight: 900;
}

/* Gradient text for section headers (purple on white background) */
.section-header .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 1;
    line-height: 2;
    animation: fadeInUp 0.8s ease 0.4s backwards;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
    cursor: pointer;
    border: none;
    flex-direction: row-reverse;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(90, 103, 216, 0.3);
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(90, 103, 216, 0.4);
    background: #ffffff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-contact {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s backwards;
}

.hero-contact .contact-link {
    flex-direction: row-reverse;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 1.05rem;
    opacity: 1;
    transition: all var(--transition-speed);
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    direction: ltr;
    unicode-bidi: embed;
}

/* Keep icon on the right side for RTL */
.contact-link i {
    order: 1;
}

.contact-link:hover {
    opacity: 1;
    transform: translateX(5px);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ==================== Sections ==================== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #1a1a2e;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.section-header p {
    font-size: 1.2rem;
    color: #2d3748;
    line-height: 1.8;
    font-weight: 500;
}

/* ==================== Problem & Solution Cards ==================== */
.problem-solution {
    background: var(--bg-secondary);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-speed);
    opacity: 0;
    transform: translateY(30px);
}

.card-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
}

.card-icon.problem {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: var(--danger-color);
}

.card-icon.solution {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--primary-color);
}

.card-icon.result {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: var(--success-color);
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.card p {
    color: var(--text-secondary);
    line-height: 2;
    font-size: 1.05rem;
    font-weight: 400;
}

/* ==================== Features Section ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-item {
    padding: 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.feature-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.8rem;
    transition: all var(--transition-speed);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-item h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 2;
    font-size: 1.05rem;
    font-weight: 400;
}

/* ==================== How It Works Timeline ==================== */
.how-it-works {
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 49px;
    top: 45px;
    bottom: 45px;
    width: 4px;
    background: var(--gradient-primary);
    border-radius: 4px;
    z-index: 0;
}

.timeline-item {
    position: relative;
    padding: 0 0 4rem 0;
    padding-right: 110px;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s ease;
    margin-bottom: 2rem;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
}

.timeline-number {
    position: absolute;
    left: auto;
    right: 15px;
    top: 10px;
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(90, 103, 216, 0.35);
    z-index: 100;
    border: 5px solid white;
}

.timeline-content {
    background: white;
    padding: 2rem 2.5rem 2.5rem 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-speed);
    position: relative;
    z-index: 5;
    margin-left: 0;
    max-width: calc(100% - 100px);
}

.timeline-item:hover .timeline-content {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.timeline-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.4;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 2;
    font-size: 1.05rem;
    font-weight: 400;
}

/* ==================== Screenshots Section ==================== */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.screenshot-item {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s ease;
}

.screenshot-item.visible {
    opacity: 1;
    transform: scale(1);
}

.screenshot-placeholder {
    aspect-ratio: 9/16;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-speed);
}

.screenshot-placeholder:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.screenshot-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.screenshot-placeholder p {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==================== FAQ Section ==================== */
.faq {
    background: var(--bg-secondary);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.faq-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.faq-question {
    width: 100%;
    padding: 1.8rem;
    background: none;
    border: none;
    text-align: right;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-speed);
    font-family: 'Cairo', sans-serif;
    line-height: 1.5;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question i {
    transition: transform var(--transition-speed);
    color: var(--primary-color);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 1.8rem 1.8rem;
    color: var(--text-secondary);
    line-height: 2;
    font-size: 1.05rem;
    font-weight: 400;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-speed);
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.contact-list i {
    color: var(--primary-light);
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* ==================== Animations ==================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .cards-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        right: 33px;
        width: 3px;
        top: 28px;
        bottom: 28px;
    }
    
    .timeline-number {
        right: 0;
        width: 66px;
        height: 66px;
        font-size: 1.4rem;
        border: 4px solid white;
    }
    
    .timeline-item {
        padding-right: 90px;
        padding-left: 0;
        padding-bottom: 4rem;
        min-height: 110px;
    }
    
    .timeline-item:last-child {
        padding-bottom: 0;
        min-height: auto;
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .hero-contact {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .navbar,
    .mobile-menu,
    .hero-cta,
    .footer {
        display: none;
    }
}
