* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Poppins', sans-serif; 
    background: #f9f9f9; 
    color: #333; 
    line-height: 1.6; 
}

/* Header */
header {
    background: #fff; 
    border-bottom: 1px solid #e0e0e0; 
    padding: 1rem 2rem; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: #0a3d91; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
}
.logo img { height: 100px; }
.search-bar { 
    flex: 1; 
    max-width: 400px; 
    margin: 0 2rem; 
}
.search-bar input { 
    width: 100%; 
    padding: 0.75rem 1rem; 
    border: 1px solid #ddd; 
    border-radius: 25px; 
    font-size: 1rem; 
}
nav ul { 
    list-style: none; 
    display: flex; 
    gap: 2rem; 
}
nav a { 
    color: #666; 
    text-decoration: none; 
    font-weight: 500; 
    transition: color 0.3s; 
}
nav a:hover { color: #0a3d91; }
.header-right { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
}
.bell { 
    font-size: 1.2rem; 
    cursor: pointer; 
    color: #666; 
}
.user-profile {
    background: #0a3d91; 
    color: white; 
    padding: 0.5rem 1rem; 
    border-radius: 20px; 
    font-weight: 500;
    display: flex; 
    align-items: center; 
    gap: 0.5rem;
}
.my-courses {
    background: #28a745; 
    color: white; 
    padding: 0.75rem 1.5rem; 
    border-radius: 25px;
    text-decoration: none; 
    font-weight: 600; 
    transition: background 0.3s;
}
.my-courses:hover { background: #1e7e34; }
.logout-link {
    color: white; 
    text-decoration: underline; 
    cursor: pointer; 
    font-weight: 500;
}
.logout-link:hover { text-decoration: none; }
.auth-section { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.login-btn { 
    background: white; 
    color: #000000; 
    padding: 8px 16px; 
    border-radius: 20px; 
    text-decoration: none; 
    font-weight: 600; 
}
.user-info { 
    color: white; 
    font-weight: 500; 
}
.logout-link { 
    color: #fff; 
    text-decoration: underline; 
    cursor: pointer; 
}

/* Banner Section */
.banner {
    background: #f9f9f9; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 120px 2rem 4rem; 
    max-width: 1200px; 
    margin: 0 auto; 
    gap: 4rem;
}
.banner-content { flex: 1; }
.banner h1 { 
    font-size: 3rem; 
    font-weight: 700; 
    margin-bottom: 1rem; 
    color: #0a3d91; 
    line-height: 1.2; 
}
.banner-subtitle { 
    font-size: 1.5rem; 
    color: #666; 
    margin-bottom: 1rem; 
}
.banner-desc { 
    font-size: 1.1rem; 
    color: #777; 
    margin-bottom: 2rem; 
    max-width: 600px; 
}
.typewrite {
    font-size: inherit; 
    font-weight: inherit; 
    display: inline;
    white-space: nowrap; 
    overflow: hidden;
}
@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: currentColor; }
}
.cta-btn { 
    background: #28a745; 
    color: white; 
    padding: 1rem 2rem; 
    border: none; 
    border-radius: 30px;
    font-size: 1.2rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: transform 0.3s; 
}
.cta-btn:hover { transform: scale(1.05); }
.banner-illustration { 
    flex: 1; 
    text-align: center; 
}
.banner-illustration img { 
    max-width: 100%; 
    height: auto; 
}

/* Sections */
.section { 
    max-width: 1346px; 
    margin: 4rem auto; 
    padding: 0 2rem; 
}
.section h2 { 
    text-align: center; 
    font-size: 2.5rem; 
    margin-bottom: 2rem; 
    color: #0a3d91; 
}

/* Carousel */
.carousel {
    display: flex; 
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    gap: 1rem; 
    padding: 1rem 0;
    scrollbar-width: none; 
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-card {
    flex: 0 0 300px; 
    height: 300px; 
    background: white; 
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); 
    scroll-snap-align: start; 
    padding: 1.5rem;
    text-align: center; 
    transition: transform 0.3s; 
    cursor: pointer;
}
.carousel-card:hover { transform: translateY(-10px); }
.carousel-card img { 
    width: 100%; 
    height: 150px; 
    object-fit: cover; 
    border-radius: 10px; 
    margin-bottom: 1rem; 
}
.carousel-card h3 { 
    font-size: 1.2rem; 
    color: #0a3d91; 
    margin-bottom: 0.5rem; 
}
.carousel-card p { 
    color: #666; 
    font-size: 0.9rem; 
}

/* Grid */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; 
    margin-top: 2rem; 
}
.grid-card {
    aspect-ratio: 1; 
    background: white; 
    border-radius: 15px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    transition: transform 0.3s; 
    cursor: pointer; 
    overflow: hidden;
    position: relative;
    text-decoration: none;
}
.grid-card:hover:not(.disabled) { transform: scale(1.05); }
.grid-card img { 
    width: 100%; 
    height: 60%; 
    object-fit: cover; 
}
.grid-card h3 { 
    padding: 1rem; 
    text-align: center; 
    color: #0a3d91; 
    font-size: 1.1rem; 
    margin: 0; 
}
.grid-card p { 
    padding: 0 1rem 1rem; 
    text-align: center; 
    color: #666; 
    font-size: 0.9rem; 
    margin: 0; 
}
.grid-card.disabled { 
    opacity: 0.6; 
    cursor: not-allowed; 
    transform: none !important; 
}
.grid-card.disabled h3 { color: #999; }

/* Quiz/Bundle Specific */
.container {
    max-width: 1200px;
    margin: 100px auto 2rem; /* Offset for header */
    padding: 0 15px;
}
#welcome-header {
    background: linear-gradient(135deg, #0a3d91, #082f70);
    color: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}
.full-access-box {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    padding: 25px;
    border-radius: 18px;
    border-left: 6px solid #28a745;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    display: none;
}
.pay-btn {
    position: absolute; 
    bottom: 1rem; 
    right: 1rem;
    background: #28a745; 
    color: white; 
    padding: 0.5rem 1rem;
    border-radius: 20px; 
    font-size: 0.9rem; 
    border: none; 
    cursor: pointer;
}
.pay-btn:hover { background: #1e7e34; }
.paid-label {
    position: absolute; 
    bottom: 1rem; 
    right: 1rem;
    color: #28a745; 
    font-weight: bold; 
    font-size: 1rem;
}
.login-to-pay {
    position: absolute; 
    bottom: 1rem; 
    right: 1rem;
    background: #ffc107; 
    color: #212529; 
    padding: 0.5rem 1rem;
    border-radius: 20px; 
    font-size: 0.9rem; 
    border: none; 
    cursor: pointer;
}
.login-to-pay:hover { background: #e0a800; }
h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #0a3d91;
}
.btn {
    border: none;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    background: #28a745;
    color: white;
}
.btn:hover {
    background: #1e7e34;
}

/* Login/Signup Forms */
.login-box, .container.form-container {
    width: 100%;
    max-width: 420px;
    margin: 60px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-align: center;
}
h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #0a3d91;
    font-weight: 600;
}
input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    font-size: 15px;
}
button, .form-btn {
    width: 100%;
    padding: 12px;
    background: #0a3d91;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: 600;
}
button:hover, .form-btn:hover {
    background: #082f70;
}
/* Google button */
.google-btn {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: bold;
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
}
.google-btn:hover {
    background: #f5f5f5;
}
.google-btn img {
    width: 20px;
    height: 20px;
}
.text-center {
    text-align: center;
    margin-top: 12px;
}
a {
    color: #0a3d91;
    text-decoration: none;
    font-weight: 600;
}
a:hover {
    text-decoration: underline;
}

/* Footer */
footer { 
    background: #0a3d91; 
    color: white; 
    text-align: center; 
    padding: 2rem; 
    margin-top: 4rem; 
}
.carousel-card {
    position: relative; /* Ensures the ribbon positions relative to the card */
    /* Add any existing styles here */
}

.free-ribbon {
    position: absolute;
    top: 35px;
    right: 5px;
    background-color: #ff0000; /* Red color */
    color: white;
    font-weight: bold;
    font-size: 12px;
    padding: 4px 12px;
    transform: rotate(45deg);
    transform-origin: top right;
    width: 60px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Optional shadow for depth */
}

/* Optional: Add triangular tails for a more ribbon-like effect */
.free-ribbon::before,
.free-ribbon::after {
    content: '';
    position: absolute;
    display: block;
    width: 0;
    height: 0;
    border: 5px solid transparent;
}

.free-ribbon::before {
    bottom: -5px;
    left: -5px;
    border-top-color: #ff0000;
    border-left-color: #ff0000;
}

.free-ribbon::after {
    top: -5px;
    right: -5px;
    border-bottom-color: #ff0000;
    border-right-color: #ff0000;
}

/* Media Queries */
@media (max-width: 1024px) {
    .banner { 
        gap: 2rem; 
        padding: 120px 1.5rem 3rem; 
    }
    .banner h1 { font-size: 2.8rem; }
    .banner-subtitle { font-size: 1.3rem; }
}

@media (max-width: 768px) {
    header { 
        padding: 1rem; 
        flex-wrap: wrap; 
    }
    nav ul { 
        gap: 1rem; 
        font-size: 0.9rem; 
    }
    .search-bar { 
        max-width: 200px; 
        margin: 0 1rem; 
        order: 3; 
        width: 100%; 
    }
    .banner { 
        flex-direction: column; 
        text-align: center; 
        padding: 80px 1rem 2rem; 
        gap: 2rem; 
    }
    .banner h1 { 
        font-size: 2.5rem; 
        line-height: 1.3; 
    }
    .banner-subtitle { font-size: 1.2rem; }
    .banner-desc { font-size: 1rem; }
    .carousel-card { 
        flex: 0 0 250px; 
        height: 250px; 
    }
    .grid { 
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
        gap: 1rem; 
    }
}

@media (max-width: 480px) {
    .banner { padding: 70px 1rem 2rem; }
    .banner h1 { font-size: 2rem; }
    .banner-subtitle { font-size: 1.1rem; }
    header { padding: 0.75rem; }
    nav ul { 
        gap: 0.5rem; 
        font-size: 0.8rem; 
        flex-wrap: wrap; 
        justify-content: center; 
    }
}
