/* ============================================
   Egypt Trains Landing Page Styles
   ============================================ */

/* CSS Variables - Colors from app_theme.dart */
:root {
    --primary-dark: #00796B;
    --primary-main: #26A69A;
    --primary-light: #4DB6AC;
    --accent-main: #FFB84D;
    --accent-dark: #D68910;
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-light: #6B6B6B;
    --surface-cream: #FAF9F6;
    --surface-white: #FFFFFF;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-dark: rgba(0, 0, 0, 0.16);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-primary);
    background-color: var(--surface-cream);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

/* ============================================
   Navbar
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow-light);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-main);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.nav-links a:hover {
    color: var(--primary-dark);
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid var(--primary-main);
    border-radius: var(--border-radius-md);
    background: transparent;
    color: var(--primary-main);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.lang-toggle:hover {
    background: var(--primary-main);
    color: white;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 20px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    padding: 12px 0;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-main) 0%, var(--primary-dark) 100%);
    padding-top: 70px;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding: 60px 0 120px;
}

.hero-text {
    color: white;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.title-ar {
    font-size: 3rem;
}

.title-en {
    font-size: 1.75rem;
    font-weight: 500;
    opacity: 0.9;
}

[dir="ltr"] .title-ar {
    font-size: 1.75rem;
    font-weight: 500;
    opacity: 0.9;
}

[dir="ltr"] .title-en {
    font-size: 3rem;
    font-weight: 700;
    opacity: 1;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.7;
}

/* Store Buttons */
.store-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-md);
    color: white;
    transition: all var(--transition-fast);
}

.store-btn:hover {
    background: white;
    color: var(--primary-dark);
    border-color: white;
}

.store-btn svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

[dir="rtl"] .store-text {
    align-items: flex-end;
}

.store-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.store-name {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    position: relative;
    z-index: 2;
}

.phone-frame {
    width: 280px;
    height: 280px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.app-icon-large {
    width: 180px;
    height: 180px;
    border-radius: var(--border-radius-xl);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 184, 77, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

/* Hero Wave */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: auto;
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 100px 0;
    background: var(--surface-cream);
}

.section-title {
    font-size: 2.25rem;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    position: relative;
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: 0 4px 16px var(--shadow-light);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px var(--shadow-medium);
}

.feature-card.featured {
    border: 2px solid var(--accent-main);
}

.feature-card.premium {
    background: linear-gradient(135deg, #FFF8E7 0%, #FFF2D6 100%);
    border: 2px solid var(--accent-main);
}

.feature-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--accent-main);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

[dir="ltr"] .feature-badge {
    right: auto;
    left: 16px;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-main) 100%);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.feature-icon.gold {
    background: linear-gradient(135deg, var(--accent-main) 0%, var(--accent-dark) 100%);
}

.feature-icon.premium-icon {
    background: linear-gradient(135deg, #FFC871 0%, var(--accent-dark) 100%);
}

.feature-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   How It Works Section
   ============================================ */
.how-it-works {
    padding: 100px 0;
    background: white;
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-main) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 20px;
    box-shadow: 0 4px 16px rgba(38, 166, 154, 0.3);
}

.step-content h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.step-connector {
    display: flex;
    align-items: center;
    padding-top: 18px;
    color: var(--primary-light);
}

[dir="rtl"] .step-connector {
    transform: scaleX(-1);
}

.step-connector svg {
    width: 40px;
    height: 24px;
}

/* ============================================
   Community Section
   ============================================ */
.community {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #004D40 100%);
    color: white;
}

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

.community-text h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.community-text > p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.community-features {
    list-style: none;
}

.community-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1.0625rem;
}

.community-features svg {
    width: 24px;
    height: 24px;
    color: var(--accent-main);
    flex-shrink: 0;
}

.community-visual {
    display: flex;
    justify-content: center;
}

.community-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.community-card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-main) 0%, var(--accent-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.community-card-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.community-stats {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-main);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ============================================
   Download CTA Section
   ============================================ */
.download-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-main) 0%, var(--primary-light) 100%);
    text-align: center;
    color: white;
}

.download-cta h2 {
    font-size: 2.25rem;
    margin-bottom: 12px;
}

.download-cta > .container > p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.download-cta .store-buttons {
    justify-content: center;
}

.download-cta .store-btn {
    background: white;
    color: var(--primary-dark);
    border-color: white;
}

.download-cta .store-btn:hover {
    background: transparent;
    color: white;
    border-color: white;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 40px 0;
    background: var(--text-primary);
    color: white;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-brand img {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
}

.footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-copy {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        order: 1;
    }

    .hero-visual {
        order: 0;
    }

    .hero-text h1 {
        align-items: center;
    }

    .store-buttons {
        justify-content: center;
    }

    [dir="rtl"] .store-text,
    [dir="ltr"] .store-text {
        align-items: flex-start;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .community-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .community-features {
        display: inline-block;
        text-align: start;
    }

    .phone-frame {
        width: 220px;
        height: 220px;
    }

    .app-icon-large {
        width: 140px;
        height: 140px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .lang-toggle {
        margin-right: 8px;
    }

    [dir="rtl"] .lang-toggle {
        margin-right: 0;
        margin-left: 8px;
    }

    .hero-content {
        padding: 40px 0 100px;
        min-height: auto;
    }

    .hero-text h1 {
        font-size: 2.25rem;
    }

    .title-ar {
        font-size: 2.25rem;
    }

    .title-en {
        font-size: 1.25rem;
    }

    [dir="ltr"] .title-ar {
        font-size: 1.25rem;
    }

    [dir="ltr"] .title-en {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .store-btn {
        padding: 10px 16px;
        width: 100%;
        justify-content: center;
    }

    .features {
        padding: 60px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .how-it-works {
        padding: 60px 0;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step {
        max-width: 100%;
    }

    .step-connector {
        transform: rotate(90deg);
        padding: 0;
        margin: 16px 0;
    }

    [dir="rtl"] .step-connector {
        transform: rotate(90deg) scaleX(-1);
    }

    .community {
        padding: 60px 0;
    }

    .community-text h2 {
        font-size: 1.5rem;
    }

    .download-cta {
        padding: 60px 0;
    }

    .download-cta h2 {
        font-size: 1.75rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
}

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

.feature-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

/* Scroll Animations - Applied via JS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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