        /* Reset and Base Styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

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

        body {
            font-family: 'Cairo', sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #ffffff;
            direction: rtl;
        }

        /* Color Variables */
        :root {
            --golden-yellow: #FFD700;
            --sky-blue: #87CEEB;
            --light-purple: #DDA0DD;
            --neon-green: #32CD32;
            --bright-orange: #B45309;
            --electric-blue: #00BFFF;
            --vibrant-pink: #FF69B4;
            --lime-green: #7FFF00;
            --purple-800: #3A006A;
            --white: #ffffff;
            --gray-600: #4A5568;
            --gray-300: #D1D5DB;
            --gray-900: #111827;
        }

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

        /* Animations */
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-50px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(50px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInLeft {
            from {
                opacity: 0;
                transform: translateX(-100px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes fadeInRight {
            from {
                opacity: 0;
                transform: translateX(100px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.05);
            }
        }

        @keyframes bounce {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-20px);
            }
        }

        @keyframes rotate {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }

        /* Smooth diagonal fly path for graduation cap */
        @keyframes flyDiagonal {
            0% {
                transform: translate(-10px, 10px) rotate(-10deg);
                opacity: 0.9;
            }
            50% {
                transform: translate(10px, -10px) rotate(10deg);
                opacity: 1;
            }
            100% {
                transform: translate(-10px, 10px) rotate(-10deg);
                opacity: 0.9;
            }
        }

        @keyframes glow {
            0%, 100% {
                box-shadow: 0 0 5px currentColor;
            }
            50% {
                box-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
            }
        }

        @keyframes gradientShift {
            0% {
                background-position: 0% 50%;
            }
            50% {
                background-position: 100% 50%;
            }
            100% {
                background-position: 0% 50%;
            }
        }

        @keyframes typewriter {
            from {
                width: 0;
            }
            to {
                width: 100%;
            }
        }

        @keyframes blink {
            0%, 50% {
                opacity: 1;
            }
            51%, 100% {
                opacity: 0;
            }
        }

        @keyframes float {
            0%, 100% {
                transform: translateY(0px) rotate(0deg);
            }
            50% {
                transform: translateY(-20px) rotate(180deg);
            }
        }

        @keyframes floatReverse {
            0%, 100% {
                transform: translateY(0px) rotate(0deg);
            }
            50% {
                transform: translateY(20px) rotate(-180deg);
            }
        }

        @keyframes wiggle {
            0%, 100% {
                transform: rotate(0deg);
            }
            25% {
                transform: rotate(-3deg);
            }
            75% {
                transform: rotate(3deg);
            }
        }

        @keyframes scaleIn {
            from {
                opacity: 0;
                transform: scale(0);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* Header */
        .header {
            background: linear-gradient(135deg, var(--light-purple), var(--sky-blue), var(--electric-blue));
            padding: 1rem 0;
            position: fixed;
            top: 0;
            width: 100%;
            z-index: 1000;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            border-bottom: 4px solid var(--golden-yellow);
            animation: fadeInDown 0.6s ease-out;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            transition: transform 0.3s ease;
        }

        .logo:hover {
            transform: scale(1.05);
        }

        .calculator-icon {
            color: var(--white);
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
            animation: rotate 2s ease-in-out infinite;
            animation-delay: 3s;
        }

        .logo h1 {
            color: var(--white);
            font-size: 1.25rem;
            font-weight: 800;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }

        /* Header button glow on hover */
        .header .btn:hover {
            box-shadow: 0 0 0 3px #ffffff33, 0 0 24px var(--golden-yellow);
        }

        /* Buttons */
        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-family: inherit;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
            font-size: 1rem;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }

        .btn-primary {
            background-color: var(--sky-blue);
            color: var(--purple-800);
        }

        .btn-primary:hover {
            background-color: #FFE55C;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
        }

        .btn-hero-primary {
            background-color: var(--sky-blue);
            color: var(--purple-800);
            padding: 16px 32px;
            font-size: 1.25rem;
            animation: pulse 3s ease-in-out infinite;
        }

        .btn-hero-primary:hover {
            animation: none;
            transform: scale(1.05);
        }

        .btn-hero-secondary {
            background: transparent;
            color: var(--white);
            border: 2px solid var(--white);
            padding: 16px 32px;
            font-size: 1.25rem;
        }

        .btn-hero-secondary:hover {
            background-color: var(--white);
            color: var(--purple-800);
        }

        .btn-outline {
            background: transparent;
            border: 2px solid currentColor;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.3s ease;
        }

        .btn-cta-primary {
            background-color: var(--golden-yellow);
            color: var(--purple-800);
            padding: 20px 40px;
            font-size: 1.25rem;
            border: 4px solid var(--white);
            animation: glow 2s ease-in-out infinite;
        }

        .btn-cta-secondary {
            background: transparent;
            color: var(--white);
            border: 4px solid var(--white);
            padding: 20px 40px;
            font-size: 1.25rem;
        }

        .btn-cta-secondary:hover {
            background-color: var(--white);
            color: var(--purple-800);
        }

        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, var(--sky-blue) 0%, var(--light-purple) 50%, var(--golden-yellow) 100%);
            padding: 140px 0 80px;
            position: relative;
            overflow: hidden;
            min-height: 100vh;
            display: flex;
            align-items: center;
        }

        .hero-bg-animation {
            position: absolute;
            inset: 0;
            opacity: 0.2;
            background: radial-gradient(circle at 20% 50%, var(--bright-orange) 0%, transparent 50%);
            /* Reduced gradient animation for better battery life */
            animation: gradientShift 12s ease infinite;
            background-size: 200% 200%;
        }

        .hero-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 3rem;
            align-items: center;
            position: relative;
            z-index: 10;
        }

        .hero-text {
            text-align: right;
            animation: fadeInLeft 0.8s ease-out 0.2s both;
        }

        .free-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background-color: var(--neon-green);
            color: var(--white);
            padding: 12px 16px;
            border-radius: 25px;
            margin-bottom: 2rem;
            font-size: 1.125rem;
            font-weight: 600;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            animation: fadeInUp 0.5s ease-out 0.5s both;
        }

        .gift-icon {
            animation: rotate 2s linear infinite;
        }

        /* Gift icon subtle glow */
        .gift-glow {
            animation: glow 2s ease-in-out infinite;
        }

        .hero-title h1 {
            font-size: 3.5rem;
            color: var(--white);
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
            margin-bottom: 1rem;
            animation: fadeInUp 0.6s ease-out 1s both;
            position: relative;
            padding: 20px 30px;
            border-radius: 16px;
            background: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        }

        .typewriter-container {
            font-size: 2.5rem;
            font-weight: 800;
            color: var(--purple-800);
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
            margin-bottom: 2rem;
            position: relative;
            padding: 15px 25px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
            display: inline-block;
        }

        .typewriter-text {
            overflow: hidden;
            border-right: 3px solid var(--purple-800);
            white-space: nowrap;
            animation: typewriter 4s steps(40, end), blink 0.8s infinite;
        }

        .cursor {
            animation: blink 0.8s infinite;
        }

        .hero-description {
            font-size: 1.25rem;
            color: var(--white);
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
            margin-bottom: 2rem;
            line-height: 1.8;
            animation: fadeInUp 0.6s ease-out 1.5s both;
            position: relative;
            padding: 20px 25px;
            border-radius: 12px;
            background: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        }

        .hero-buttons {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            animation: fadeInUp 0.6s ease-out 2s both;
        }

        .hero-image {
            position: relative;
            animation: fadeInRight 0.8s ease-out 0.4s both;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
            border-radius: 24px;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .hero-img {
            width: 100%;
            max-height: 400px;
            height: auto;
            object-fit: contain;
            border-radius: 24px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
            border: 4px solid var(--white);
            /* Removed bounce animation for better battery life */
        }

        .floating-element {
            position: absolute;
            padding: 12px;
            border-radius: 50%;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }

        .floating-element.sparkles {
            top: -16px;
            right: -16px;
            background-color: var(--golden-yellow);
            color: var(--purple-800);
            /* Reduced animation frequency for better battery life */
            animation: float 8s ease-in-out infinite;
        }

        .floating-element.zap {
            bottom: -16px;
            left: -16px;
            background-color: var(--neon-green);
            color: var(--white);
            /* Reduced animation frequency for better battery life */
            animation: floatReverse 10s ease-in-out infinite;
        }

        .trophy-icon {
            /* Reduced pulse animation for better battery life */
            animation: pulse 3s ease-in-out infinite;
        }

        /* Globe spins on hover (للجميع) */
        .icon-globe {
            transition: transform 0.3s ease;
        }
        .icon-globe:hover {
            /* Reduced rotation speed for better battery life */
            animation: rotate 4s linear infinite;
        }

        /* Graduation cap flies gently */
        .grad-cap {
            display: inline-block;
            /* Reduced animation frequency for better battery life */
            animation: flyDiagonal 8s ease-in-out infinite;
        }

        /* Wiggle utility for playful emphasis 
        .wiggle-hover:hover {
            animation: wiggle 0.6s ease-in-out;
        }
        */
        /* CTA / primary button extra glow */
        .btn-glow {
            box-shadow: 0 0 0 3px #ffffff40, 0 0 30px #ffd70080;
        }
        .btn-glow:hover {
            transform: translateY(-2px) scale(1.03);
            box-shadow: 0 0 0 4px #ffffff55, 0 0 40px #ffd700a6;
        }

        /* Section Headers */
        .section-header {
            text-align: center;
            margin-bottom: 3rem;
        }

        .section-header h2 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            position: relative;
            padding: 15px 25px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
            display: inline-block;
        }

        .section-header p {
            font-size: 1.25rem;
            color: var(--gray-600);
            max-width: 800px;
            margin: 0 auto;
        }

        /* Features Section */
        .features {
            padding: 4rem 0;
            background: linear-gradient(to bottom, #dbeafe, #f3e8ff);
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }

        .feature-card {
            background: var(--white);
            padding: 2rem;
            border-radius: 16px;
            text-align: center;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            border: 2px solid transparent;
            transition: all 0.3s ease;
            opacity: 0;
            transform: translateY(50px);
            animation: fadeInUp 0.6s ease-out forwards;
        }

        .feature-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        }

        .feature-card:nth-child(2) {
            animation-delay: 0.1s;
        }

        .feature-card:nth-child(3) {
            animation-delay: 0.2s;
        }

        .feature-icon {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            transition: all 0.3s ease;
        }

        .feature-card:hover .feature-icon {
            transform: scale(1.1) rotate(360deg);
        }

        .feature-card h3 {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--purple-800);
            margin-bottom: 1rem;
        }

        .feature-card p {
            font-size: 1.125rem;
            color: var(--gray-600);
            line-height: 1.6;
        }

        /* Grade Levels Section */
        .grade-levels {
            padding: 4rem 0;
            background: linear-gradient(135deg, var(--light-purple), var(--sky-blue));
            background-size: 200% 200%;
            /* Reduced gradient animation for better battery life */
            animation: gradientShift 16s ease infinite;
            position: relative;
            overflow: hidden;
        }

        .grade-levels::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
            animation: float 6s ease-in-out infinite;
        }

        .grade-levels .section-header {
            position: relative;
            z-index: 10;
        }

        .grade-levels .section-header h2 {
            color: var(--purple-800);
            animation: fadeInDown 0.8s ease-out 0.2s both;
        }

        .grade-levels .section-header p {
            color: var(--gray-900);
            animation: fadeInUp 0.8s ease-out 0.4s both;
        }

        .levels-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
            position: relative;
            z-index: 10;
        }

        .level-card {
            background: var(--white);
            padding: 1.5rem;
            border-radius: 16px;
            text-align: center;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            border: 2px solid transparent;
            transition: all 0.3s ease;
            opacity: 0;
            transform: scale(0);
            animation: scaleIn 0.6s ease-out forwards;
            position: relative;
            overflow: hidden;
        }

        .level-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
            transform: translateX(-100%);
            transition: transform 0.6s ease;
        }

        .level-card:hover::before {
            transform: translateX(-100%);
        }

        .level-card:nth-child(2) {
            animation-delay: 0.1s;
        }

        .level-card:nth-child(3) {
            animation-delay: 0.2s;
        }

        .level-card:nth-child(4) {
            animation-delay: 0.3s;
        }

        .level-card:hover {
            transform: scale(1.05);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
            border-color: currentColor;
        }

        .level-icon {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            color: var(--white);
            font-weight: 700;
            font-size: 1.125rem;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            transition: all 0.5s ease;
            position: relative;
            overflow: hidden;
        }

        .level-icon::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s ease;
        }

        .level-card:hover .level-icon {
            transform: rotate(360deg) scale(1.1);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
        }

        .level-card:hover .level-icon::before {
            left: 100%;
        }

        .level-card h3 {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--purple-800);
            margin-bottom: 0.5rem;
        }

        .level-card p {
            font-size: 1.125rem;
            font-weight: 500;
            color: var(--gray-600);
        }

        /* Competitions Section */
        .competitions {
            padding: 4rem 0;
            background: linear-gradient(to bottom, #fed7aa, #fef3c7);
        }

        .competitions .section-header h2 {
            color: var(--bright-orange);
        }

        .competitions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
        }

        .competition-card {
            background: var(--white);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            border: 2px solid transparent;
            transition: all 0.3s ease;
            opacity: 0;
            transform: translateY(50px);
            animation: fadeInUp 0.6s ease-out forwards;
        }

        .competition-card:nth-child(n+2) {
            animation-delay: calc(0.1s * (var(--index, 1)));
        }

        .competition-card:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        }

        .card-image {
            height: 200px;
            overflow: hidden;
            position: relative;
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .card-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            transition: transform 0.3s ease;
        }

        .competition-card:hover .card-image img {
            transform: scale(1.1);
        }

        .card-image::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .competition-card:hover .card-image::after {
            opacity: 1;
        }

        .card-content {
            padding: 1.5rem;
        }

        .card-content h3 {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--purple-800);
            margin-bottom: 0.75rem;
        }

        .card-content p {
            font-size: 0.875rem;
            color: var(--gray-600);
            margin-bottom: 1rem;
            line-height: 1.6;
        }

        .competition-card:hover .btn-outline {
            opacity: 1;
            transform: translateY(0);
        }

        /* CTA Section */
        .cta {
            padding: 5rem 0;
            background: linear-gradient(135deg, var(--bright-orange), var(--golden-yellow), var(--neon-green), var(--sky-blue), var(--light-purple));
            background-size: 400% 400%;
            /* Reduced gradient animation for better battery life */
            animation: gradientShift 8s ease infinite;
            color: var(--white);
            position: relative;
            overflow: hidden;
        }

        .floating-shape {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
        }

        .shape1 {
            width: 80px;
            height: 80px;
            top: 10%;
            left: 10%;
            animation: float 20s ease-in-out infinite;
        }

        .shape2 {
            width: 120px;
            height: 120px;
            bottom: 10%;
            right: 10%;
            animation: floatReverse 15s ease-in-out infinite;
        }

        .cta-content {
            text-align: center;
            position: relative;
            z-index: 10;
        }

        .cta-content h2 {
            font-size: 3rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
            opacity: 0;
            transform: scale(0);
            animation: fadeInUp 0.6s ease-out forwards;
            position: relative;
            padding: 25px 35px;
            border-radius: 20px;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            display: inline-block;
        }

        .cta-content p {
            font-size: 1.5rem;
            margin-bottom: 2rem;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
            opacity: 0;
            transform: translateY(50px);
            animation: fadeInUp 0.6s ease-out 0.2s forwards;
            position: relative;
            padding: 20px 30px;
            border-radius: 16px;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.15);
            box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
        }

        .cta-buttons {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            align-items: center;
            opacity: 0;
            transform: translateY(50px);
            animation: fadeInUp 0.6s ease-out 0.4s forwards;
        }

        /* Footer */
        .footer {
            background: linear-gradient(to right, #581c87, #1e3a8a, #312e81);
            color: var(--white);
            padding: 3rem 0 1rem;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .footer-section {
            opacity: 0;
            transform: translateY(50px);
            animation: fadeInUp 0.6s ease-out forwards;
        }

        .footer-section:nth-child(2) {
            animation-delay: 0.1s;
        }

        .footer-section:nth-child(3) {
            animation-delay: 0.2s;
        }

        .footer-section:nth-child(4) {
            animation-delay: 0.3s;
        }

        .footer-logo {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 1rem;
            transition: transform 0.3s ease;
        }

        .footer-logo:hover {
            transform: scale(1.05);
        }

        .footer-logo .calculator-icon {
            color: var(--golden-yellow);
            transition: transform 0.5s ease;
        }

        .footer-logo:hover .calculator-icon {
            transform: rotate(360deg);
        }

        .footer-section h3,
        .footer-section h4 {
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .footer-section h4 {
            font-size: 1.25rem;
        }

        .footer-section p {
            color: #d1d5db;
            line-height: 1.6;
        }

        .footer-section ul {
            list-style: none;
        }

        .footer-section ul li {
            margin-bottom: 0.75rem;
            color: #d1d5db;
            transition: all 0.3s ease;
        }

        .footer-section ul li:hover {
            transform: translateX(5px);
            color: var(--golden-yellow);
        }

        .footer-section a {
            color: inherit;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer-section a:hover {
            color: var(--golden-yellow);
        }

        .footer-bottom {
            border-top: 1px solid #374151;
            padding-top: 2rem;
            text-align: center;
            color: #9ca3af;
            opacity: 0;
            animation: fadeInUp 0.6s ease-out 0.4s forwards;
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            /* Header */
            
            /* Hero */
            .hero {
                padding: 120px 0 60px;
                text-align: center;
                min-height: auto;
                overflow: hidden;
            }
            
            .hero-content {
                grid-template-columns: 1fr;
                gap: 2rem;
            }
            
            .hero-text {
                text-align: center;
            }
            
            .hero-title h1,
            .typewriter-container {
                font-size: 2.5rem;
            }
            
            .hero-title h1 {
                padding: 15px 20px;
                border-radius: 12px;
            }
            
            .typewriter-container {
                padding: 12px 18px;
                border-radius: 10px;
            }
            
            .hero-description {
                padding: 15px 20px;
                border-radius: 10px;
            }
            
            .hero-description {
                font-size: 1.125rem;
            }
            
            .hero-buttons {
                flex-direction: column;
                align-items: center;
            }
            
            .hero-img {
                max-height: 300px;
                height: auto;
            }
            
            /* Buttons */
            .btn-hero-primary,
            .btn-hero-secondary {
                padding: 14px 28px;
                font-size: 1.125rem;
            }
            
            .btn-cta-primary,
            .btn-cta-secondary {
                padding: 16px 32px;
                font-size: 1.125rem;
            }
            
            /* Sections */
            .section-header h2 {
                font-size: 2rem;
            }
            
            .section-header p {
                font-size: 1.125rem;
            }
            
            .cta-content h2 {
                font-size: 2.5rem;
                padding: 20px 25px;
                border-radius: 16px;
            }
            
            .cta-content p {
                font-size: 1.25rem;
                padding: 15px 20px;
                border-radius: 12px;
            }
            
            .cta-buttons {
                flex-direction: column;
            }
            
            /* Grids */
            .features-grid,
            .levels-grid,
            .competitions-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
            
            .footer-content {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }

            /* Hide floating elements on small screens */
            .floating-element {
                display: none;
            }
        }

        /* إضافة تحسينات للشاشات الصغيرة جداً */
        @media (max-width: 320px) {
            .hero-title h1 {
                font-size: 1.4rem;
                padding: 10px 12px;
                line-height: 1.3;
            }
            
            .typewriter-container {
                font-size: 1.2rem;
                padding: 8px 12px;
            }
            
            .hero-description {
                font-size: 0.85rem;
                padding: 12px 15px;
                line-height: 1.5;
            }
            
            .free-badge {
                font-size: 0.9rem;
                padding: 8px 12px;
            }
            
            .btn-hero-primary, 
            .btn-hero-secondary {
                padding: 10px 16px;
                font-size: 0.85rem;
            }
        }

        @media (max-width: 360px) {
            .hero-title h1,
            .typewriter-container {
                font-size: 1rem;
            }
            
            .hero-title h1 {
                padding: 12px 16px;
                border-radius: 10px;
            }
            
            .typewriter-container {
                padding: 10px 14px;
                border-radius: 8px;
            }
            
            .hero-description {
                padding: 12px 16px;
                border-radius: 8px;
            }

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

            .btn {
                padding: 8px 16px;
                font-size: 0.8rem;
            }

            .btn-hero-primary,
            .btn-hero-secondary {
                padding: 10px 20px;
                font-size: 0.9rem;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 0 15px;
            }
            
            .hero-title h1,
            .typewriter-container {
                font-size: 1.5rem;
            }
            
            .hero-description {
                font-size: 1rem;
            }
            
            .section-header h2 {
                font-size: 1.75rem;
            }
            
            .section-header p {
                font-size: 1rem;
            }
            
            .cta-content h2 {
                font-size: 2rem;
                padding: 15px 20px;
                border-radius: 12px;
            }
            
            .cta-content p {
                padding: 12px 16px;
                border-radius: 10px;
            }
            
            .cta-content p {
                font-size: 1.125rem;
            }
            
            .btn {
                padding: 10px 20px;
                font-size: 0.9rem;
            }
            
            .btn-hero-primary,
            .btn-hero-secondary {
                padding: 12px 24px;
                font-size: 1rem;
            }
            
            .btn-cta-primary,
            .btn-cta-secondary {
                padding: 14px 28px;
                font-size: 1rem;
            }
        }

        /* Utility Classes */
        .text-center {
            text-align: center;
        }

        .mb-4 {
            margin-bottom: 1rem;
        }

        .mb-8 {
            margin-bottom: 2rem;
        }

        .mt-8 {
            margin-top: 2rem;
        }

        /* Intersection Observer Classes */
        .fade-in {
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.6s ease;
        }

        .fade-in.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Animation Control Classes for Intersection Observer */
        .animate-on-scroll {
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.8s ease;
        }

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

        /* Pause animations when not visible */
        .pause-animations {
            animation-play-state: paused !important;
        }

        /* Resume animations when visible */
        .resume-animations {
            animation-play-state: running !important;
        }

        /* Reduced motion preferences */
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                animation-play-state: paused !important;
            }
            
            .hero-bg-animation,
            .grade-levels,
            .cta {
                animation: none !important;
            }
            
            .floating-element,
            .trophy-icon,
            .icon-globe:hover,
            .grad-cap {
                animation: none !important;
            }
        }

        /* Accessibility - Additional focus styles */

        /* Focus styles for accessibility */
        .btn:focus,
        a:focus {
            outline: 2px solid var(--golden-yellow);
            outline-offset: 2px;
        }

        /* High contrast mode support */
        @media (prefers-contrast: high) {
            .hero,
            .cta {
                background: #000;
                color: #fff;
            }
            
            .btn {
                border: 2px solid currentColor;
            }
        }

        /* تحسينات إضافية للهيرو سكشن على الشاشات الصغيرة */
        .hero-inner {
            position: relative;
            width: 100%;
            max-width: 100%;
            overflow: hidden;
        }

        @media (max-width: 768px) {
            .hero-inner {
                padding: 0 5px;
            }
        }

        /* تحسينات للنصوص العربية على الشاشات الصغيرة */
        @media (max-width: 480px) {
            body {
                line-height: 1.5;
            }
            
            .hero-title h1,
            .typewriter-container,
            .hero-description {
                text-align: center;
                word-spacing: -1px;
                letter-spacing: -0.5px;
            }
            
            .hero-buttons {
                align-items: center;
            }
        }
