/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Arabic', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.7rem 1.2rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Main Content */
.main-content {
    margin-top: 80px;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0 8rem;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: white;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: white;
    bottom: 20%;
    left: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: white;
    top: 60%;
    right: 20%;
    animation-delay: 4s;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #a0679c;
}

.stat .label {
    font-size: 1rem;
    opacity: 0.9;
}

.hero-illustration {
    position: absolute;
    top: 20%;
    left: 0;
    width: 100%;
    height: 60%;
    pointer-events: none;
}

.floating-elements-hero {
    position: relative;
    width: 100%;
    height: 100%;
}

.letter-bubble,
.number-bubble,
.shape-bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 1rem;
    font-size: 2rem;
    animation: bubbleFloat 8s ease-in-out infinite;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.letter-bubble:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.letter-bubble:nth-child(2) {
    top: 40%;
    right: 15%;
    animation-delay: 2s;
}

.number-bubble {
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.shape-bubble {
    top: 60%;
    right: 25%;
    animation-delay: 6s;
}

@keyframes bubbleFloat {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 1;
    }
}

/* Wave Divider */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* Learning Sections */
.learning-sections {
    padding: 6rem 0;
    background: #ffffff;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.section-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
}

.arabic-card .card-background {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.english-card .card-background {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.numbers-card .card-background {
    background: linear-gradient(90deg, #a8edea 0%, #fed6e3 100%);
}

.colors-card .card-background {
    background: linear-gradient(90deg, #ff9a9e 0%, #fecfef 100%);
}

.shapes-card .card-background {
    background: linear-gradient(90deg, #a18cd1 0%, #fbc2eb 100%);
}

.games-card .card-background {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
}

.card-content {
    padding: 2rem 1.5rem 1rem;
    text-align: center;
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.section-card:hover .card-icon {
    transform: scale(1.1);
}

.section-card h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.section-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1.1rem;
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-footer {
    padding: 0 2rem 2rem;
}

.learn-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Noto Sans Arabic', Arial, sans-serif;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.learn-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.learn-btn:hover::before {
    left: 100%;
}

.learn-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.learn-btn .arrow {
    transition: transform 0.3s ease;
}

.learn-btn:hover .arrow {
    transform: translateX(-3px);
}

/* Mountain Divider */
.mountain-divider {
    margin-top: 3rem;
    overflow: hidden;
    line-height: 0;
}

.mountain-divider svg {
    position: relative;
    display: block;
    width: calc(80% + 1.3px);
    height: 80px;
    margin: 0 auto;
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

/* Floating Elements Animation */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-letter,
.floating-shape {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(102, 126, 234, 0.05);
    animation: float 8s ease-in-out infinite;
}

.floating-letter:nth-child(1) {
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.floating-letter:nth-child(2) {
    top: 25%;
    left: 85%;
    animation-delay: 1s;
}

.floating-letter:nth-child(3) {
    top: 45%;
    left: 10%;
    animation-delay: 2s;
}

.floating-letter:nth-child(4) {
    top: 75%;
    left: 80%;
    animation-delay: 3s;
}

.floating-shape:nth-child(5) {
    top: 35%;
    left: 75%;
    animation-delay: 1.5s;
}

.floating-shape:nth-child(6) {
    top: 65%;
    left: 15%;
    animation-delay: 2.5s;
}

.floating-shape:nth-child(7) {
    top: 55%;
    left: 50%;
    animation-delay: 3.5s;
}

.floating-shape:nth-child(8) {
    top: 85%;
    left: 60%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-25px) rotate(180deg);
    }
}

/* Footer */
.main-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 3rem 0;
}

.main-footer p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .hero-content h2 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .stat {
        padding: 1rem;
    }

    .sections-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .main-content {
        margin-top: 120px;
    }

    .hero-section {
        padding: 4rem 0 6rem;
        min-height: 70vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat .number {
        font-size: 2rem;
    }

    .card-content {
        padding: 2rem 1.5rem 1rem;
    }

    .sections-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Animation Delays */
.animate__fadeInUp {
    animation-delay: var(--delay, 0ms);
    animation-duration: 0.8s;
}

/* Interactive Hover Effects */
.section-card:hover .card-icon {
    animation: gentleBounce 0.6s ease-in-out;
}

@keyframes gentleBounce {

    0%,
    100% {
        transform: scale(1.1) translateY(0);
    }

    50% {
        transform: scale(1.15) translateY(-5px);
    }
}

/* Smooth fade in animation */
@keyframes smoothFadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
