/* ==========================================================================
   CSS Variables & Resets
   ========================================================================== */
   :root {
    /* Brand Colors */
    --primary: #007C77;
    --primary-light: #009e99;
    --primary-dark: #005F5B;
    --secondary: #FF7043;
    --secondary-hover: #ff8a66;
    
    /* Light Mode Background & Surface */
    --bg-main: #F5F7FA;
    --surface-main: #FFFFFF;
    --surface-alt: #F0F2F5;
    --surface-border: rgba(0, 0, 0, 0.08);
    
    /* Text */
    --text-main: #111827;
    --text-muted: #6B7280;
    
    /* System */
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-border);
    transition: all var(--transition-fast);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 1rem;
    transition: color var(--transition-fast);
    color: var(--text-muted);
}

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

.btn-primary-outline {
    border: 1px solid var(--primary);
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    color: var(--primary) !important;
    font-weight: 700;
    transition: all var(--transition-fast) !important;
}

.btn-primary-outline:hover {
    background: var(--primary);
    color: #fff !important;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Subtle background glow, no harsh shadows */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 124, 119, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 112, 67, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(255, 112, 67, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.play-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface-main);
    border: 1px solid var(--surface-border);
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.play-store-btn:hover {
    background: #f8fafc;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 124, 119, 0.05);
}

.play-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.play-text {
    display: flex;
    flex-direction: column;
}

.play-text span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.play-text strong {
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-main);
}

/* Hero Visual & Mockup */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.phone-wrapper {
    position: relative;
    display: inline-block;
}

.abstract-shape {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 5%;
    left: -5%;
    background: linear-gradient(135deg, rgba(0,124,119,0.05), rgba(0,95,91,0.1));
    border-radius: 40px;
    transform: rotate(-5deg);
    z-index: 0;
    border: 1px solid rgba(0,124,119,0.1);
}

.phone-mockup {
    position: relative;
    z-index: 1;
    width: 300px;
    height: 600px;
    background: var(--surface-alt);
    border-radius: 40px;
    padding: 10px;
    position: relative;
    z-index: 1;
    border: 1px solid var(--surface-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.phone-screen-container {
    width: 100%;
    height: 100%;
    background: var(--surface-main);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--surface-border);
}

.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}


/* ==========================================================================
   Courses Section (Horizontal Expanding Cards)
   ========================================================================== */
.courses-section {
    padding: 6rem 5%;
    position: relative;
    background: var(--surface-main);
    border-top: 1px solid var(--surface-border);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.section-header h2 span {
    color: var(--secondary);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Expanding Cards Container */
.expanding-cards-container {
    display: flex;
    width: 100%;
    height: 450px;
    gap: 1rem;
}

.expand-card {
    position: relative;
    flex: 0.5;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: flex var(--transition-slow);
    border: 1px solid var(--surface-border);
}

.expand-card.active {
    flex: 3;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-slow);
}

.expand-card:hover .card-bg {
    transform: scale(1.05);
}

.expand-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 100%);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.card-icon {
    font-size: 2.5rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all var(--transition-fast);
}

.expand-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    opacity: 0;
    color: #fff;
    transform: translateY(20px);
    transition: all var(--transition-fast) 0.1s;
}

.expand-card p {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-fast);
    /* Hide long text */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* State changes for active card */
.expand-card.active .card-icon {
    background: var(--primary);
    border-color: var(--primary-light);
}

.expand-card.active h3,
.expand-card.active p {
    opacity: 1;
    transform: translateY(0);
    white-space: normal;
}


/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--surface-main);
    border-top: 1px solid var(--surface-border);
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
    font-weight: 600;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--surface-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-visual {
        margin-top: 4rem;
        justify-content: center;
    }
    
    .expanding-cards-container {
        flex-direction: column;
        height: 600px;
    }
    
    .expand-card {
        flex: 1;
    }
    
    .expand-card h3,
    .expand-card p {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   App Mockup UI (Screenshot Replication)
   ========================================================================== */
.app-ui {
    width: 100%;
    height: 100%;
    background-color: #F8F9FA;
    display: flex;
    flex-direction: column;
    position: relative;
    font-family: 'Tajawal', sans-serif;
}

.app-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
}

.status-icons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.app-ui-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    margin-top: 10px;
    text-align: center;
}

.app-ui-logo {
    width: 45px;
    height: 45px;
    margin-bottom: 8px;
}

.app-ui-title-group h2 {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.app-ui-title-group p {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 600;
}

.app-ui-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    gap: 10px;
    margin: 10px 0;
}

.app-ui-divider .line {
    flex: 1;
    height: 1px;
    background-color: #d1d5db;
}

.app-ui-divider span {
    font-weight: 800;
    color: #111827;
    font-size: 0.95rem;
}

.app-ui-card {
    margin: 10px 15px;
    background-color: #e8f3f1;
    border-radius: 16px;
    border: 1px solid #d1e7e4;
    padding: 15px 12px;
}

.app-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.app-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-card-title .vertical-bar {
    width: 4px;
    height: 16px;
    background-color: var(--primary);
    border-radius: 4px;
}

.app-card-title h3 {
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 700;
}

.app-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-num {
    background-color: var(--primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.chevron-up {
    color: var(--primary);
}

.app-card-inner {
    background-color: #f1f5f9;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}

.app-card-inner::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 80px;
    height: 80px;
    background-color: #e2e8f0;
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
}

.inner-content-left, .inner-content-right {
    position: relative;
    z-index: 1;
}

.inner-content-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inner-content-left h4 {
    color: #334155;
    font-size: 1rem;
    font-weight: 800;
}

.inner-content-left p {
    color: #64748b;
    font-size: 0.75rem;
}

.member-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #d1fae5;
    color: #059669;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-top: 8px;
    width: fit-content;
    border: 1px solid #a7f3d0;
}

.inner-content-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.percent-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #fca5a5;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 800;
    background-color: white;
}

.arrow-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
}

.app-ui-bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #f1f5f9;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #e2e8f0;
}

.app-ui-bottom-nav::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background-color: #94a3b8;
    border-radius: 4px;
    margin-bottom: 6px;
}

.nav-item {
    color: #64748b;
    padding: 10px;
}

.nav-item.active {
    color: var(--primary);
}

.fab-container {
    position: relative;
    top: -20px;
}

.fab-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 124, 119, 0.3);
}
