/* ========================================
   مسارك - نظام التصميم
   IBM Plex Sans Arabic + Premium Design
======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --accent: #d4af37;
    --accent-light: #e6c55a;

    --bg-primary: #ffffff;
    --bg-secondary: #f0fdf4;
    --bg-dark: #0f172a;
    --bg-card: rgba(255, 255, 255, 0.8);

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(13, 148, 136, 0.3);

    /* Borders */
    --border-color: #e2e8f0;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    direction: rtl;
    overflow-x: hidden;
    letter-spacing: 0 !important;
    font-variant-ligatures: normal !important;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0 !important;
    text-rendering: optimizeLegibility;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

h4 {
    font-size: 1.125rem;
}

p {
    font-weight: 400;
    color: var(--text-secondary);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    box-shadow: var(--shadow-md), 0 0 0 0 rgba(13, 148, 136, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(13, 148, 136, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    text-decoration: none;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: var(--border-radius-xl);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.hero-title {
    margin-bottom: 2rem;
    line-height: 1.5;
}

.title-line {
    display: block;
    line-height: 1.4;
    padding: 0.15em 0;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Hero Card */
.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    overflow: hidden;
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
}

.card-icon {
    font-size: 1.5rem;
}

.card-title {
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.question-preview {
    text-align: right;
}

.question-label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.question-preview p {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.answer-options {
    display: flex;
    gap: 0.75rem;
}

.option {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.option.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Stats Section */
.stats {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
    color: var(--text-white);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-suffix {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
}

.stat-label {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
    border-radius: var(--border-radius-xl);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-note {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(13, 148, 136, 0.08);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: var(--border-radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.about-note svg {
    flex-shrink: 0;
    color: var(--primary);
}

.visual-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
}

.visual-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.visual-card h3 {
    margin-bottom: 0.5rem;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
    border-radius: var(--border-radius-md);
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
}

/* How It Works */
.how-it-works {
    background: var(--bg-secondary);
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 250px;
}

.step-number {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md), 0 0 20px rgba(13, 148, 136, 0.3);
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

.step-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 2px;
    margin-top: -3rem;
}

.cta-center {
    text-align: center;
}

/* Principles Section */
.principles {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 100%);
    color: var(--text-white);
}

.principles .section-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.principles .section-title {
    color: var(--text-white);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.principle-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-base);
}

.principle-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.principle-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.principle-card h4 {
    margin-bottom: 0.5rem;
}

.principle-card p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo-text {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: block;
}

.footer-brand p {
    color: var(--text-light);
    max-width: 300px;
}

.footer-links h4,
.footer-partners h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.partners-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-img {
    height: 60px;
    width: auto;
}

.footer-logo {
    margin-bottom: 1rem;
}

.partner-logo {
    height: 80px;
    width: auto;
    opacity: 0.9;
    transition: all var(--transition-base);
}

.partner-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.75rem !important;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin: 0 auto 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .hero-card {
        max-width: 350px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .steps-container {
        flex-direction: column;
    }

    .step-line {
        width: 3px;
        height: 40px;
        margin: 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto;
    }

    .partners-logos {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .principles-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 4rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }

    .btn-large {
        width: 100%;
    }

    .hero-cta {
        flex-direction: column;
        justify-content: center;
    }

    .hero {
        min-height: auto;
        padding-top: 6rem;
        padding-bottom: 6rem;
        height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-cta {
        flex-direction: column;
        justify-content: center;
        margin-bottom: 2rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}