body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
}

/* Navigation Bar */
header {
    background-color: #1a3046;
    padding: 15px 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #d3d9e1;
    font-weight: bold;
    transition: 0.3s;
    padding: 10px;
}

.nav-links a:hover {
    color: yellow;
    text-decoration: underline;
    background-color: black;
    border-radius: 7.5px;
    text-shadow: 0 0 10px #ffcc00, 0 0 20px #ffcc00, 0 0 30px #ff9900;
    box-shadow: 0 0 10px #ffcc00, 0 0 20px #ff9900;
}

/* Login Button */
.btn-login {
    background-color: white;
    color: #007bff;
    padding: 5px 10px;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-login:hover {
    background-color: #0056b3;
    color: white;
}

/* Hero Section */
.hero {
    background: url('https://clickzter.com/click/educlicks/assets/images/banner-hero-bg.jpg') center/cover no-repeat;
    text-align: center;
    color: white;
    padding: 80px 20px;
}

.hero img {
    opacity: 0.5;
}

.hero-content h1 {
    font-size: 40px;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: #ffcc00;
    color: black;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-primary:hover {
    background-color: #e6b800;
}

/* Course Section */
.courses {
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.course-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
    width: 100%;
}

.course-card img {
    width: 100%;
    border-radius: 5px;
}

.btn-secondary {
    display: block;
    margin-top: 10px;
    text-decoration: none;
    background-color: #007bff;
    color: white;
    padding: 8px;
    text-align: center;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-secondary:hover {
    background-color: #0056b3;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--background-dark);
        color: var(--text-light);
    }
}

/* Confetti Animation */
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: red;
    opacity: 0.7;
    animation: confetti-fall 3s ease-out infinite;
}

@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(500px) rotate(720deg); opacity: 0; }
}

/* Footer */
footer {
    background-color: #847dbd;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
}

/* Mobile & Tablet Styles */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        text-align: center;
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #1f4b7b;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        text-align: center;
        padding: 10px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .hero {
        padding: 40px 15px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }
}
   /* Fix for extra left-side space on mobile */
@media (max-width: 768px) {
    .course-grid {
        display: grid;
        grid-template-columns: 1fr; /* Forces full width on small screens */
        gap: 15px;
        padding: 10px; /* Reduces padding to remove extra space */
    }

    .course-card {
        width: 84.5%; /* Ensures full width on mobile */
        max-width: 84.5%; /* Prevents unwanted margins */
        margin: 0; /* Removes any unwanted extra space */
    }
}
