:root {
    /* Update this line */
    --primary-color: #455CE9;

    /* Optional: A slightly darker version for hover effect */
    --secondary-color: #3549c4;
    /* Dark Blue */
    --dark-bg: #0b1120;
    /* Very dark blue/black */
    --light-bg: #f8fafc;
    --text-dark: #1f2937;
    --text-light: #9ca3af;
    --white: #ffffff;
    --card-bg: #eff6ff;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
}

.btn-outline:hover {
    background-color: #455CE9;
    border-color: #455CE9;
    color: #ffffff;
    transform: translateY(-3px);
    /* effect in buttons */
    box-shadow: 0 4px 15px rgba(69, 92, 233, 0.4);
}

.btn-primary-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 5px;
}

/* Navbar */
.navbar {
    background-color: #0A0F1C;
    color: var(--white);
    padding: 20px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* 1. Makes the navbar wider than the rest of the page content */
    max-width: 1400px;

    /* 2. Reduces the empty space on the sides so they get closer to the edge */
    padding: 0 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    font-size: 0.9rem;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--white);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-btn {
    color: var(--white);
    font-size: 0.9rem;
}

.mobile-menu-btn {
    display: none;
    color: white;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    background-color: #060A16F2;
    color: var(--white);
    padding: 60px 0 100px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Abstract Graphic Styles */
.hero-graphic {
    width: 400px;
    height: 250px;
    background: #1e293b;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    padding: 15px;
}

.window-header {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #475569;
}

.dot:nth-child(1) {
    background-color: #ef4444;
}

.dot:nth-child(2) {
    background-color: #eab308;
}

.dot:nth-child(3) {
    background-color: #22c55e;
}

.window-body {
    display: flex;
    gap: 10px;
    height: 80%;
}

.panel.left {
    flex: 1;
    background-color: #334155;
    border-radius: 6px;
}

.panel.right {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bar {
    height: 10px;
    background-color: #475569;
    border-radius: 4px;
    width: 80%;
}

.bar.short {
    width: 50%;
}

.code-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background-color: #f3f6fc;
    padding: 30px;
    border-radius: 10px;
    transition: 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.center-card {
    grid-column: 2;
    /* Centers the 4th item in a specific layout */
}

.icon-box {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 8px;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.feature-card p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Courses Section */
.courses {
    padding: 60px 0;
}

.courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.subtitle {
    color: #6b7280;
    margin-bottom: 40px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
}

.course-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.course-img {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.course-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rating {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.course-info {
    padding: 20px;
}

.instructor {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.instructor img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.course-info h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.old-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.9rem;
    margin-right: 5px;
}

.free {
    color: #16a34a;
    font-weight: 600;
}

.view-more {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Categories */
.categories {
    padding: 60px 0;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cat-card {
    background-color: #f0f9ff;
    padding: 30px;
    text-align: center;
    border-radius: 12px;
}

.cat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.cat-card p {
    font-weight: 600;
    color: var(--text-dark);
}

/* Testimonials */
.testimonials {
    background-color: #f8fafc;
    padding: 80px 0;
}

.test-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.test-text {
    flex: 1;
}

.test-text h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.test-text p {
    color: #6b7280;
}

.test-card {
    flex: 1;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.quote {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #4b5563;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.user-profile img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #d1d5db;
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: #9ca3af;
    padding: 80px 0 20px;
    font-size: 0.9rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1f2937;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 900px) {

    .hero-container,
    .test-container,
    .footer-container {
        flex-direction: column;
        display: flex;
        text-align: center;
    }

    .hero-buttons,
    .features-grid,
    .cat-grid {
        justify-content: center;
    }

    .features-grid,
    .cat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .center-card {
        grid-column: span 2;
    }

    .nav-links,
    .nav-actions {
        display: none;
        /* Hide for simple mobile view, usually requires JS toggle */
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-graphic {
        width: 100%;
        max-width: 350px;
    }

    /* =========================================
   COURSES PAGE DESIGN (Fix for broken layout)
   ========================================= */

    /* 1. This makes the cards sit side-by-side (Grid Layout) */
    .course-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        /* Creates the columns */
        gap: 30px;
        /* Space between cards */
        margin-bottom: 50px;
    }

    /* 2. This styles the white card box */
    .course-card {
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        /* Rounded corners */
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

    .course-card:hover {
        transform: translateY(-5px);
        /* Moves up slightly on hover */
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }

    /* 3. Image Styling */
    .card-image-wrapper {
        position: relative;
        height: 180px;
        width: 100%;
        background-color: #f0f0f0;
    }

    .card-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* Ensures image covers the box without stretching */
        display: block;
    }

    /* 4. The "Rating" Star badge */
    .rating-badge {
        position: absolute;
        bottom: 10px;
        right: 10px;
        background-color: #455CE9;
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.8rem;
        font-weight: bold;
    }

    /* 5. Typography and Spacing inside the card */
    .card-content {
        padding: 20px;
    }

    .course-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #333;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    /* 6. Instructor Area */
    .instructor-info {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 15px;
    }

    .instructor-avatar {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        object-fit: cover;
    }

    /* 7. Icons Row (Clock, Video, Student) */
    .meta-tags {
        display: flex;
        justify-content: space-between;
        font-size: 0.85rem;
        color: #666;
        margin-bottom: 20px;
    }

    .meta-tags span {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    /* 8. Price and Button Area */
    .card-action {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #eee;
        padding-top: 15px;
    }

    .price-block {
        display: flex;
        flex-direction: column;
    }

    .old-price {
        font-size: 0.8rem;
        color: #999;
        text-decoration: line-through;
    }

    .new-price {
        color: #2ecc71;
        /* Green color */
        font-weight: bold;
        font-size: 1rem;
    }

    .enroll-text {
        color: #455CE9;
        font-weight: bold;
        text-decoration: none;
    }

    /* 9. Header Styling (Nursery, Elementary, etc) */
    .level-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 25px;
        border-bottom: 2px solid #f0f0f0;
        padding-bottom: 10px;
    }

    .level-title {
        font-size: 1.8rem;
        font-weight: bold;
        color: #111;
        margin: 0;
    }

    /* --- PASTE THIS IN YOUR STYLE.CSS --- */

    /* 1. FORCE THE 3-COLUMN LAYOUT */
    .course-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        /* Exactly 3 columns */
        gap: 30px;
        margin-bottom: 50px;
    }

    /* 2. RESPONSIVE (Optional: Stacks them on mobile) */
    @media (max-width: 900px) {
        .course-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 600px) {
        .course-grid {
            grid-template-columns: 1fr;
        }
    }

    /* 3. CARD STYLING */
    .courses-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 60px 20px;
    }

    .level-section {
        margin-bottom: 60px;
    }

    .level-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 25px;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 15px;
    }

    .course-card {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .course-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

    .card-image-wrapper {
        position: relative;
        height: 190px;
        width: 100%;
        background: #eee;
    }

    .card-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .rating-badge {
        position: absolute;
        bottom: 10px;
        right: 10px;
        background-color: #455CE9;
        color: white;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 0.8rem;
        font-weight: bold;
    }

    .card-content {
        padding: 20px;
    }

    .instructor-info {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    .instructor-avatar {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        object-fit: cover;
    }

    .course-title {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 15px;
    }

    .meta-tags {
        display: flex;
        justify-content: space-between;
        font-size: 0.85rem;
        color: #666;
        margin-bottom: 20px;
    }

    .card-action {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 15px;
        border-top: 1px solid #f3f4f6;
    }

    .old-price {
        text-decoration: line-through;
        color: #999;
        font-size: 0.85rem;
        display: block;
    }

    .new-price {
        color: #22c55e;
        font-weight: bold;
        font-size: 1rem;
    }

    .enroll-text {
        color: #455CE9;
        font-weight: 700;
        text-decoration: none;
    }

    .hide-view {
        display: none !important;
    }

    /* Ensure the modal is hidden by default */
    .modal-container {
        display: none;
        /* Hidden by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        /* Dark background overlay */
        z-index: 1000;
        /* High z-index to sit on top */
        justify-content: center;
        align-items: center;
    }

    /* When the 'active' class is added by JS, show it */
    .modal-container.active {
        display: flex !important;
        /* Force it to show */
    }

}