:root {
--color-blue: #1976D2;
--color-green: #4CAF50; 
--color-yellow: #FFC107;
--color-orange: #FF5722;
--color-dark-blue: #1565C0; 
--color-white: #FFFFFF;
--color-grey: #616161;
--color-light-grey: #F5F5F5;
--color-text-dark: #333333;
    
    /* NEW COLORS */
    --color-general: #2196F3;     /* Light Blue */
    --color-azhar: #009688;       /* Teal/Cyan */
    --color-tahfeez: #8BC34A;     /* Lime Green */
    --color-ai: #9C27B0;          /* Purple */
    --color-guidance: #FF9800;    /* Deep Orange */
}
* {
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-white);
    color: var(--color-text-dark);
    direction: rtl; 
    text-align: right;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    margin-top: 0;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s, border-bottom 0.3s;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s, opacity 0.3s;
    font-size: 16px;
    white-space: nowrap; 
}

/* --- Navigation Bar --- */
.navbar {
    background-color: var(--color-white);
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.navbar .container {
    display: flex;
    /* Ensure elements are properly spaced and aligned on a single line */
    justify-content: space-between; 
    align-items: center;
    position: relative; 
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 60px !important; 
    height: 60px !important;
    border-radius: 50%;
}

.logo-text {
    font-size: 26px;
    font-weight: 900;
    color: var(--color-blue);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 0;
    margin: 0;
    /* Allow nav-links to grow and push nav-actions to the end if space permits,
       but usually we just rely on justify-content: space-between on the container */
    flex-grow: 1; 
    justify-content: center; /* Center the links on large screens */
}

.nav-links a {
    color: var(--color-grey);
    font-weight: 500;
    padding: 5px 0;
}

/* Subtle Hover for Nav Links */
.nav-links a:hover {
    color: var(--color-blue); 
    border-bottom: 2px solid var(--color-blue); 
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-login {
    background-color: transparent;
    border: 1px solid var(--color-blue);
    color: var(--color-blue);
    padding: 10px 20px;
}

.btn-login:hover {
    background-color: var(--color-light-grey);
}

.btn-enroll {
    background-color: var(--color-orange);
    color: var(--color-white);
}

.btn-enroll:hover {
    background-color: #e64a19; 
}

/* Mobile Menu Toggle (Hamburger Icon) */
.menu-toggle {
    display: none; 
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-blue);
    cursor: pointer;
    padding: 0;
    order: 3; 
}
/* Ensure the close icon is the same size and color */
.menu-toggle i {
    font-size: 28px;
}


/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(to left, var(--color-blue), var(--color-green)); 
    padding: 60px 0 0;
    color: var(--color-white);
    overflow: hidden; 
}

.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0;
    text-align: right;
}

.hero-content {
    flex: 1;
    max-width: 50%;
    padding-left: 20px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
    color: #f0f0f0;
}

.btn-start-lesson {
    background-color: var(--color-orange);
    color: var(--color-white);
    padding: 18px 40px;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-start-lesson:hover {
    background-color: #e64a19;
}

.hero-image {
    flex: 1;
    text-align: left; 
    padding-top: 20px;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* --- Stages Section (Why Choose) --- */
.stages-section, .features-section {
    padding: 80px 0;
    text-align: center;
}

.stages-section h2, .features-section h2 {
    font-size: 38px;
    margin-bottom: 50px;
    color: var(--color-dark-blue);
}


.stage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.stage-card i {
    font-size: 35px;
    margin-bottom: 15px;
    display: block;
}

.stage-card h3 {
    font-size: 26px;
    margin-bottom: 10px;
    font-weight: 900;
}

/* --- Stages Section (Why Choose) --- */

.stages-section, .features-section {
padding: 80px 0;
text-align: center;
}

.stages-section h2, .features-section h2 {
font-size: 38px;
margin-bottom: 50px;
color: var(--color-dark-blue);
}

/* [CRITICAL CHANGE] Set the stages-grid to CSS Grid for 5 columns */
.stages-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columns, equal width */
    gap: 20px; 
}

/* [CRITICAL CHANGE] Define the base style for 5 stage cards */
.stage-card {
    padding: 30px 15px; 
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: var(--color-white); /* Ensures text visibility */
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    min-height: 220px; /* Set a fixed height to keep alignment */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
}

.stage-card:hover {
transform: translateY(-5px);
box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.stage-card i {
    font-size: 32px; 
    margin-bottom: 15px;
    display: block;
}

.stage-card h3 {
    font-size: 20px; 
    margin-bottom: 10px;
    font-weight: 900;
}

.stage-card p {
    font-size: 14px; 
    margin: 0;
}

/* [CRITICAL CHANGE] Applying 5 unique background colors */
.stage-primary {
    background-color: var(--color-general); 
}

.stage-azhar {
    background-color: var(--color-azhar); 
}

.stage-tahfeez {
    background-color: var(--color-tahfeez); 
}

.stage-ai {
    background-color: var(--color-ai); 
}

.stage-guidance {
    background-color: var(--color-guidance); 
}

/* --- Features Section --- */
.features-grid {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-bottom: 50px;
}

.feature-card {
    flex: 1;
    background-color: var(--color-light-grey);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.feature-card i {
    font-size: 40px;
    color: var(--color-blue);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    color: var(--color-text-dark);
    font-weight: 700;
    margin-bottom: 10px;
}

/* --- Footer --- */
.footer {
    background-color: var(--color-white);
    padding: 30px 0;
    border-top: 1px solid #eee;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    width: 40px; 
    height: 40px;
}

.footer-links a {
    color: var(--color-grey);
    margin-left: 25px;
    font-size: 14px;
}

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

.social-icons a {
    color: var(--color-grey);
    font-size: 22px;
    margin-right: 15px;
}

.social-icons a:hover {
    color: var(--color-blue);
}


/* --- Responsive Design (Media Queries) --- */

@media (max-width: 992px) {
       .stages-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 5 columns, equal width */
    gap: 20px; 
}
    /* Navbar Alignment Fix */
    /* Hide desktop navigation elements */
    .nav-links, .nav-actions {
        display: none;
        flex-basis: 100%; /* Important for pushing mobile menu below navbar */
        order: 4; /* Push links below everything else */
    }
    
    /* Show mobile menu toggle */
    .menu-toggle {
        display: block;
    }

    /* Adjust nav actions and links container for mobile */
    .navbar .container {
        flex-wrap: wrap; 
    }

    /* Mobile Navigation Menu Styling - Links */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: absolute; 
        top: 80px; 
        right: 0;
        background-color: var(--color-white);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        z-index: 1000; 
        transition: none; /* Disable transition during display change */
    }

    .stages-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 5 columns, equal width */
    gap: 20px; 
}
    .nav-links.active li {
        text-align: right;
        padding: 12px 30px;
        border-bottom: 1px solid var(--color-light-grey);
    }
    
    .nav-links.active li:last-child {
        border-bottom: none;
    }

    .nav-links.active a {
        font-weight: 700;
        color: var(--color-text-dark);
        display: block;
    }
    
    /* Hide nav actions when the menu is active */
    .nav-actions.mobile-hidden {
        display: none;
    }

    /* Hero section stacked for better viewing on tablets */
    .hero-section .container {
        flex-direction: column;
        text-align: center;
        padding-bottom: 20px;
    }

    .hero-content {
        max-width: 100%;
        padding-left: 0;
        margin-bottom: 30px;
    }
    
    /* Make buttons full width in content on tablet */
    .btn-start-lesson, .btn-sign-up {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        display: block;
    }
}


@media (max-width: 768px) {
       .stages-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 5 columns, equal width */
    gap: 20px; 
}
    .hero-content h1 {
        font-size: 32px;
    }

    .stages-section, .features-section {
        padding: 50px 0;
    }

    /* Stack cards vertically */
    .stages-grid, .features-grid {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Footer adjustments */
    .footer .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
}


@media (max-width: 480px) {
       .stages-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 5 columns, equal width */
    gap: 20px; 
}
    /* Hide action buttons by default on small mobile screens */
    .nav-actions {
        display: none;
    }

    /* Ensure logo image size is reduced */
    .logo img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .logo-text {
        font-size: 20px;
    }
}
#preloader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity .5s ease;
}


.founders-section {
    padding: 80px 0;
    background-color: var(--color-light-grey); /* خلفية رمادية فاتحة لتمييز القسم */
    text-align: center;
}

.founders-section h2 {
    font-size: 38px;
    margin-bottom: 50px;
    color: var(--color-dark-blue);
}

.founders-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.founder-card {
    flex: 1;
    max-width: 350px;
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.founder-card:hover {
    transform: translateY(-8px);
}

.founder-card img {
    width: 150px; /* حجم الصورة */
    height: 150px;
    object-fit: cover;
    border-radius: 50%; /* شكل دائري */
    margin-bottom: 20px;
    border: 5px solid var(--color-blue); /* إطار حول الصورة */
}

.founder-card h3 {
    font-size: 24px;
    color: var(--color-text-dark);
    margin-bottom: 5px;
}

.founder-card span {
    display: block;
    font-size: 16px;
    color: var(--color-orange);
    font-weight: 700;
    margin-bottom: 15px;
}

.founder-card p {
    font-size: 15px;
    color: var(--color-grey);
    line-height: 1.6;
}


/* --- Responsive Design for Founders Section --- */

@media (max-width: 768px) {
    .founders-grid {
        flex-direction: column; /* ترتيب البطاقات عمودياً */
        align-items: center;
    }
    .founder-card {
        max-width: 90%; /* جعل البطاقة تأخذ عرضاً أكبر على الموبايل */
    }
}