/* Basic Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: white; /* Light background */
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
}

/* ======== NAVBAR ======== */
/* ======== NAVBAR ======== */
nav {
    background-color: #ffffff;
    padding: 0.8rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* --- ADD THESE 3 LINES TO FIX THE NAVBAR --- */
    position: sticky; /* Makes it stick */
    top: 0;           /* Sticks exactly at the top */
    z-index: 1000;    /* Ensures it stays ON TOP of other content */
}

nav .logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: #004d99;
    display: flex;
    align-items: center;
}

nav .logo img {
    height: 40px;
    margin-right: 10px;
    width: auto;
}

/* This is the wrapper for your menu items */
/* On desktop, it's a flex row */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

nav .nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

nav .nav-links a {
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav .nav-links a:hover {
    color: #007bff;
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 10;
    list-style: none;
    border-radius: 5px;
    overflow: hidden;
}
.nav-dropdown-content li a {
    padding: 12px 16px;
    display: block;
    color: #333;
    font-weight: 500;
}
.nav-dropdown-content li a:hover {
    background-color: #f1f1f1;
}
.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

/* Auth Button Styles */
nav .auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

nav .auth-buttons .btn {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav .auth-buttons .btn-login {
    background-color: #0B1D42;
    color: white;
}
nav .auth-buttons .btn-login:hover {
    background-color: #D08A32;
}
nav .auth-buttons .btn-signup {
    background-color: #0B1D42;
    color: white;
}
nav .auth-buttons .btn-signup:hover {
    background-color: #D08A32;
}
/* Hamburger Menu (Hidden on Desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.4s;
}

/* Hamburger Toggle - THIS IS HIDDEN ON DESKTOP */
.nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    color: #004d99;
    cursor: pointer;
}
/* --- MOBILE RESPONSIVE CSS (Updated) --- */
@media (max-width: 900px) {
    
    /* 1. NAVBAR CONTAINER */
    nav {
        display: flex !important;
        flex-direction: row !important; /* Force horizontal row */
        flex-wrap: wrap !important;     /* Allow wrapping for the menu items */
        justify-content: space-between !important; /* Push items to edges */
        align-items: center !important;
        padding: 10px 20px !important;
    }

    /* 2. HAMBURGER MENU (Force Left - Order 1) */
    .menu-toggle {
        display: flex !important;
        order: 1 !important;
        flex-grow: 0 !important; /* Don't let it grow */
        margin-right: auto !important; /* Push everything else to the right */
    }

    /* 3. LOGO (Force Right - Order 2) */
    .logo {
        display: flex !important;
        order: 2 !important;
        flex-grow: 0 !important;
        margin-left: auto !important; /* Push itself to the right */
        margin-right: 0 !important;
        width: auto !important;
    }
    
    .logo img {
        height: 35px !important; /* Slightly smaller for mobile */
        width: auto !important;
    }

    /* 4. HERO SLIDER RESPONSIVENESS */
    /* Using aspect-ratio keeps the shape consistent like a video player */
    #hero-swiper {
        width: 100% !important;
        height: auto !important; 
        aspect-ratio: 16 / 9 !important; /* Calculate height automatically based on width */
        min-height: 180px; /* Prevent it from getting too small */
    }

    .hero-slide {
        /* Forces the whole image to fit inside the box */
        background-size: 100% 100% !important; 
        background-position: center center !important;
        background-repeat: no-repeat !important;
    }

    /* 5. HIDDEN MENU ITEMS (Drop down below) */
    nav .nav-links,
    nav .auth-buttons {
        display: none;
        order: 3 !important; /* Force below the top row */
        width: 100% !important;
        flex-direction: column !important;
        text-align: center !important;
        background-color: #fff;
        padding-top: 15px;
        border-top: 1px solid #eee;
        margin-top: 10px;
    }

    nav .nav-links li {
        margin: 10px 0;
        display: block;
    }

    /* Show menu when active */
    nav .nav-links.active,
    nav .auth-buttons.active {
        display: flex !important;
    }
    
    nav .auth-buttons {
        gap: 15px;
        padding-bottom: 15px;
    }
}
/* ======== MAIN CONTENT ======== */
main {
    flex-grow: 1;
    /* padding: 1.5rem 2rem; 
     max-width: 1200px; */
    margin: 0 auto;
    width: 100%;
    margin-top: 20p;
}

/* ======== HERO SLIDER ======== */
.hero-slider-section {
    margin-bottom: 2.5rem;
    margin-top: 30px;
}

#hero-swiper {
    width: 1100px;
    height: 300px; /* Adjust this height as needed, it will set the overall slider height */
    border-radius: 10px;
    overflow: hidden;
}

.hero-slide {
    background-size: cover; /* Cover the entire slide area */
    background-position: center; /* Center the image */
    background-repeat: no-repeat;
    width: 100%;
    height: 100%; /* Important: Make slide fill the swiper height */
    display: flex; /* Flexbox for potential inner content, even if empty */
    align-items: center;
    justify-content: center;
    position: relative; /* Needed for absolute positioning of slide-link */
}

.hero-slide .slide-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* Make sure the link is clickable over the background */
}

/* Remove previous text/image elements that are no longer needed */
.hero-slide-content,
.hero-slide .hero-text,
.hero-slide-image {
    display: none; /* Hide old elements that were used for separate text/image */
}

/* Swiper Navigation/Pagination Colors */
:root {
    --swiper-navigation-color: #ffffff;
    --swiper-pagination-color: #ffffff;
}

/* Responsive styles for the slider */
@media (max-width: 900px) {
    #hero-swiper {
        height: 250px; /* Adjust height for smaller screens */
    }
    /* No need for specific hero-slide-content or text adjustments, as the image handles it */
}

/* ======== FEATURE BOXES ======== */
.features-section {
    margin-bottom: 2.5rem;
    text-align: center;
    background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
}

.features-section h2 {
    font-size: 2rem;
    color: #004d99;
    margin-bottom: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.feature-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card .icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #004d99;
    margin-bottom: 0.8rem;
}

.feature-card p {
    font-size: 0.95rem;
    color: #666;
}

/* ======== COURSE LISTING ======== */
.course-listing{
    background-color: #c7a458;
}
.course-listing h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 1.5rem;
    text-align: center;
}

.course-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.course-card-image-placeholder {
    width: 100%;
    height: 180px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.course-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.course-card-title {
    color: #004d99;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.course-card-expiry {
    color: #dc3545;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.course-card-price {
    font-size: 1.3rem;
    color: #004d99;
}

.course-card-price strong {
    font-weight: 800;
}

.course-card-price span {
    text-decoration: line-through;
    color: #888;
    font-size: 0.9em;
    margin-left: 5px;
    font-weight: 400;
}

.btn-details {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.btn-details:hover {
    background-color: #218838;
}

.course-card-grid {
    display: grid;
    /* This creates a responsive grid that fits as many 300px cards as possible */
    grid-template-columns: repeat(auto-fit, 300px); 
    gap: 2rem; /* Space between cards */
    justify-content: center;
    background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
}

/* ================================================================
  APP DOWNLOAD SECTION 
================================================================
*/
.app-download-section {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%); /* Light Blue Gradient */
    padding: 4rem 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

/* --- Left Side: Text Features --- */
.app-features {
    flex: 1;
    text-align: right; /* Aligns text to point towards the phone */
}

.app-feature-item {
    margin-bottom: 2rem;
}

.app-feature-item h3 {
    font-size: 1.2rem;
    color: #004d99; /* Dark Blue Header */
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.app-feature-item p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* --- Center: Phone Image --- */
.app-phone {
    flex: 0 0 auto;
    width: 280px; /* Adjust based on your image size */
    z-index: 2;
}

.app-phone img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2)); /* Adds shadow to phone */
}

/* --- Right Side: CTA --- */
.app-cta {
    flex: 1;
    text-align: left;
}

.play-store-btn {
    width: 180px; /* Adjust size of Play Store button */
    height: auto;
    transition: transform 0.2s;
}

.play-store-btn:hover {
    transform: scale(1.05);
}

.download-text {
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #004d99;
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
        text-align: center;
    }

    .app-features {
        text-align: center; /* Center text on mobile */
        order: 2; /* Put text below phone on mobile */
    }

    .app-phone {
        order: 1; /* Phone on top */
        margin-bottom: 2rem;
    }

    .app-cta {
        order: 3;
        text-align: center;
    }
}

/* ======== FOOTER ======== */
footer {
    background-color: #212529;
    color: white;
    padding: 2.5rem;
    text-align: center;
    margin-top: auto;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ======== AUTHENTICATION FORMS ======== */
.auth-container {
    max-width: 500px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.auth-container h2 {
    text-align: center;
    color: #004d99;
    margin-bottom: 1.5rem;
}

.form-field {
    margin-bottom: 1.2rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-field input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.form-field .helptext {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.form-field .errorlist {
    list-style-type: none;
    margin: 5px 0 0 0;
    padding: 0;
    color: #dc3545;
    font-size: 0.9rem;
}

.auth-container .auth-button {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-container .btn-login {
    background-color: #007bff;
    color: white;
}
.auth-container .btn-login:hover {
    background-color: #0056b3;
}

.auth-container .btn-signup {
    background-color: #28a745;
    color: white;
}
.auth-container .btn-signup:hover {
    background-color: #218838;
}

.auth-container .auth-switch {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-container .auth-switch a {
    color: #007bff;
    text-decoration: underline;
    font-weight: 600;
}

/*
================================================================
  NTA-STYLE INSTRUCTIONS & TEST
================================================================
*/

/* --- Base --- */
.nta-container, .nta-test-container {
    width: 100%;
    max-width: 1200px;
    margin: 1.5rem auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.nta-test-container {
    max-width: 95%; /* Make test wider */
    margin: 1rem auto;
}

.nta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    background-color: #337ab7; /* NTA Blue */
    color: white;
}
.nta-header h1 {
    font-size: 1.3rem;
    margin: 0;
}
.user-profile {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}
.user-profile .fa-user-circle {
    font-size: 1.8rem;
    margin-left: 10px;
}
.timer-section {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}
.timer {
    font-size: 1.2rem;
    font-weight: 600;
    background-color: #ffc107;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-left: 10px;
}

/* --- Buttons --- */
.nta-btn-primary, .nta-btn-secondary, .nta-btn-danger-outline {
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}
.nta-btn-primary {
    background-color: #008000; /* Green */
    color: white;
}
.nta-btn-primary.submit-test {
    background-color: #007bff; /* Blue */
    width: 100%;
    margin-top: 1rem;
}
.nta-btn-secondary {
    background-color: #c47618; /* Yellow/Orange */
    color: white;
}
.nta-btn-danger-outline {
    background-color: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
}

/* --- Instructions Page --- */
.nta-instructions-body {
    padding: 2rem;
    line-height: 1.7;
    font-size: 0.95rem;
}
.nta-instructions-body h4 {
    color: #333;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.palette-legend {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}
.palette-legend li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.palette-item-legend {
    width: 25px;
    height: 25px;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}
.nta-instructions-footer {
    padding: 1.5rem 2rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}
.instructions-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.instructions-checkbox input { margin-top: 5px; }
.instructions-checkbox label {
    font-size: 0.9rem;
    color: #dc3545;
    font-weight: 500;
}
.ready-button-container {
    text-align: right;
    margin-top: 1.5rem;
}
#ready-to-begin-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* --- Test Page --- */
.nta-test-body {
    display: flex;
}
.nta-question-area {
    flex-grow: 1;
    padding: 1rem 1.5rem;
    background: #fdfdfd;
}
.nta-question-header {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    background: #f5f5f5;
    border-radius: 5px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}
.nta-question-content {
    padding: 1.5rem 0.5rem;
    min-height: 400px;
    border-bottom: 1px solid #eee;
}
.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.options-area .option {
    margin-bottom: 1rem;
    font-size: 1rem;
    padding: 0.8rem;
    border: 1px solid #eee;
    border-radius: 5px;
}
.options-area .option:hover {
    background: #f0f8ff;
}
.options-area label {
    margin-left: 10px;
}
.numerical-input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-left: 10px;
}
.nta-question-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 1.5rem;
}

/* --- Palette Area --- */
.nta-palette-area {
    width: 320px;
    flex-shrink: 0;
    background: #f5f5f5;
    padding: 1.5rem;
    border-left: 1px solid #ddd;
}
.palette-header p {
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 1rem;
}
.palette-legend-compact {
    font-size: 0.8rem;
    margin-bottom: 1rem;
}
.palette-legend-compact div {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}
.palette-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 10px;
}
.palette-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    border: 1px solid #ccc;
}

/* --- Palette Colors --- */
.palette-item.not-visited, .palette-item-legend.not-visited {
    background-color: #f5f5ff;
    color: #333;
    border: 1px solid #ccc;
}
.palette-item.not-answered, .palette-item-legend.not-answered {
    background-color: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}
.palette-item.answered, .palette-item-legend.answered {
    background-color: #28a745;
    color: white;
    border: 1px solid #28a745;
}
.palette-item.marked, .palette-item-legend.marked {
    background-color: #ffc107;
    color: #333;
    border: 1px solid #ffc107;
}
.palette-item.marked-answered, .palette-item-legend.marked-answered {
    background-color: #904caf;
    color: white;
    border: 1px solid #904caf;
}

/* --- Responsive Media Queries --- */
@media (max-width: 900px) {
    nav {
        padding: 0.8rem 1rem;
    }
    nav .nav-links {
        gap: 15px;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
    nav .auth-buttons {
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
    nav .logo {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    .hero-section {
        padding: 3rem 1.5rem;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section p {
        font-size: 1rem;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    /* Responsive Test Layout */
    .nta-test-body {
        flex-direction: column;
    }
    .nta-palette-area {
        width: 100%;
        border-left: none;
        border-top: 2px solid #ddd;
    }
}

@media (max-width: 600px) {
    main {
        padding: 1rem;
    }
    nav .nav-links {
        flex-direction: column;
        align-items: center;
    }
    nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
    }
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .nta-question-footer {
        flex-direction: column;
        gap: 10px;
    }
    .nta-question-footer button {
        width: 100%;
    }
}

/* --- ADD THIS NEW CSS --- */

/* --- Section Tabs --- */
.nta-section-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1rem;
}
.nta-tab-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px; /* Aligns with the container's border */
}
.nta-tab-btn.active {
    color: #337ab7;
    border-bottom-color: #337ab7;
}

/* --- Palette Section --- */
.palette-section {
    margin-bottom: 1rem;
}
.palette-section-title {
    font-weight: 700;
    color: #333;
    background-color: #e0e0e0;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}

/* --- Responsive Update for Palette --- */
@media (max-width: 900px) {
    .nta-palette-area {
        display: flex;
        flex-direction: column;
    }
    .palette-section {
        flex-grow: 1;
    }
}

/* ======== FOOTER ======== */
footer {
    background-color: #2a2a2a; /* Dark background from image */
    color: #aaa;
    padding: 2rem 2.5rem;
    margin-top: auto;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-left p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-center {
    display: flex;
    gap: 1.5rem;
    margin-right: 100px;
}

.footer-center a {
    color: #ddd;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
}

.footer-center a:hover {
    color: #fff;
}

.footer-right {
    display: flex;
    gap: 1rem;
    margin-right: 20px;
}

.social-icon {
    color: #aaa;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #fff;
}

.back-to-top-btn {
    position: absolute;
    right: 2.5rem; /* Aligns with padding */
    top: 50%; /* Center vertically */
    transform: translateY(-50%);
    background-color: #fff;
    color: #333;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.back-to-top-btn:hover {
    background-color: #eee;
}
@media (max-width: 900px) {
    /* ... (your existing nav, hero, etc. rules) ... */

    /* ADD THESE RULES for the footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .back-to-top-btn {
        top: auto; /* Unset vertical centering */
        bottom: 1rem;
        right: 1rem;
        transform: none;
    }
    /* Responsive Report Card */
    .report-nav {
        flex-direction: column;
    }

    .report-tab-btn {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #ddd;
    }

    .report-tab-btn.active {
        border-bottom: 3px solid #007bff;
    }

    .score-card-layout {
        flex-direction: column;
    }

    .chart-container {
        width: 100%;
        max-width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    .legend-container {
        width: 100%;
    }

    .summary-bar {
        grid-template-columns: 1fr 1fr; /* Stack into 2 columns */
    }

    /* Make tables scrollable */
    .report-table {
        display: block;
        width: 100%;
        overflow-x: auto; /* Allows horizontal scrolling */
        white-space: nowrap;
    }
}
/*
================================================================
  STUDENT PORTAL
================================================================
*/

/* --- Portal Layout --- */
.portal-layout {
    display: grid;
    grid-template-columns: 240px 1fr; /* Sidebar and content */
    grid-template-rows: 60px 1fr; /* Topbar and content */
    grid-template-areas:
        "sidebar topbar"
        "sidebar content";
    height: 100vh;
}

/* --- 1. Top Bar (White) --- */
.portal-topbar {
    grid-area: topbar;
    background-color: #ffffff; /* New: White */
    color: #333; /* New: Dark text */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Softer shadow */
    z-index: 10; /* Keep it on top */
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.topbar-user .fa-user-circle {
    font-size: 1.8rem;
    color: #007bff; /* Blue icon */
}

/* --- 2. Left Sidebar (White) --- */
.portal-sidebar {
    grid-area: sidebar;
    background-color: #ffffff; /* New: White */
    color: #333; /* New: Dark text */
    padding: 1rem 0;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05); /* Add shadow */
    z-index: 20; /* Keep it on top */
}
.portal-nav {
    display: flex;
    flex-direction: column;
}
.portal-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0.9rem 1.5rem;
    color: #555; /* New: Darker, readable text */
    text-decoration: none;
    font-weight: 600; /* Bolder text */
    transition: background-color 0.2s ease, color 0.2s ease;
}
.portal-nav-link .fas {
    width: 20px;
    text-align: center;
    color: #888; /* New: Softer icon color */
}
.portal-nav-link:hover {
    background-color: #f0f5ff; /* New: Light blue hover */
    color: #007bff;
}
.portal-nav-link:hover .fas {
    color: #007bff;
}
.portal-nav-link.active {
    background-color: #007bff; /* New: Bright blue active */
    color: #fff;
}
.portal-nav-link.active .fas {
    color: #fff;
}


/* --- 3. Main Content Area (Light Grey) --- */
.portal-content {
    grid-area: content;
    overflow-y: auto;
    padding: 2rem;
    background-color: #f0f2f5; /* Light grey background */
}

/* --- Dashboard Homepage (Unchanged) --- */
.portal-content-nav {
    background-color: #fff;
    padding: 0 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}
.portal-content-nav a {
    display: inline-block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    border-bottom: 3px solid transparent;
}
.portal-content-nav a.active,
.portal-content-nav a:hover {
    color: #007bff;
    border-bottom-color: #007bff;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}
.dashboard-hero .hero-text {
    max-width: 50%;
}
.dashboard-hero h2 {
    font-size: 2rem;
    color: #004d99;
}
.dashboard-hero p {
    font-size: 1.1rem;
    color: #555;
    margin: 0.5rem 0 1.5rem 0;
}
.btn-primary-dashboard {
    background-color: #ffc107;
    color: #333;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
}
.dashboard-hero img {
    max-height: 150px;
}

.course-icons {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}
.course-icons h3 {
    font-size: 1.5rem;
    color: #004d99;
    margin-bottom: 1.5rem;
}
.icons-grid {
    display: flex;
    gap: 2rem;
}
.icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}
.icon-card img {
    height: 60px;
    width: 60px;
}
.icon-card:hover {
    color: #007bff;
}
.portal-mobile-toggle {
    display: none !important; /* Force hidden by default */
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
    color: #333;
}
/* Responsive Portal (Unchanged) */
/* --- MOBILE RESPONSIVE RULES --- */
@media (max-width: 992px) {
    .portal-layout {
        /* Mobile: Single column, sidebar is hidden/fixed */
        grid-template-columns: 1fr;
        grid-template-rows: 60px 1fr;
        grid-template-areas:
            "topbar"
            "content";
    }

    .portal-mobile-toggle {
      
        display: block !important; /* Only show on small screens */

    }

    /* Hide Sidebar Off-Screen */
    .portal-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 260px;
        transform: translateX(-100%); /* Slide it out */
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    /* Class to Slide Sidebar IN */
    .portal-sidebar.active {
        transform: translateX(0);
    }

    .portal-overlay.active {
        display: block;
    }

    /* Fix Main Content Padding */
    .portal-content {
        padding: 1rem;
    }

    /* --- FIX THE DASHBOARD GRID (Chat box dropping down) --- */
    .dashboard-container {
        grid-template-columns: 1fr !important; /* Stack columns */
    }
    
    /* Hide the "topbar-left" links on very small screens to save space */
    .desktop-nav-links {
        display: none; 
    }

  
    .portal-nav {
        flex-direction: row;
    }
    .portal-nav-link {
        padding: 1rem;
        justify-content: center;
    }
    .portal-nav-link span {
        display: none;
    }
    .dashboard-hero {
        flex-direction: column;
        text-align: center;
    }
    .dashboard-hero .hero-text {
        max-width: 100%;
    }
    .dashboard-hero img {
        margin-top: 1.5rem;
    }
    .icons-grid {
        justify-content: space-around;
    }
}
/*
================================================================
  RESPONSIVE TABLE (FOR MY ORDERS)
================================================================
*/

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.9em;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.responsive-table thead tr {
    background-color: #004d99;
    color: #ffffff;
    text-align: left;
}

.responsive-table th,
.responsive-table td {
    padding: 12px 15px;
}

.responsive-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.responsive-table tbody tr:last-of-type {
    border-bottom: none;
}

.responsive-table tbody tr:hover {
    background-color: #f8f9fa;
}

.status-success {
    padding: 5px 10px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 15px;
    font-weight: 600;
}

/* --- This is the Responsive "Card" magic --- */
@media (max-width: 900px) {
    .responsive-table {
        border: 0;
        box-shadow: none;
    }

    .responsive-table thead {
        /* Hide the desktop header */
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    .responsive-table tr {
        /* Each row becomes a card */
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        background-color: #fff;
    }

    .responsive-table td {
        display: block;
        text-align: right; /* Value on the right */
        padding-left: 50%; /* Make space for the label */
        position: relative;
        border-bottom: 1px solid #f0f0f0;
    }

    .responsive-table td:last-child {
        border-bottom: 0;
    }

    .responsive-table td::before {
        /* This is the data-label */
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        text-align: left; /* Label on the left */
        font-weight: 600;
        color: #004d99;
    }
}

.bookmark-btn {
    background: transparent;
    border: none;
    color: #555;
    font-size: 1.2rem;
    cursor: pointer;
}
.bookmark-btn.bookmarked {
    color: #007bff; /* Blue when bookmarked */
}

/* --- Notification Bell & Dropdown --- */
.notification-bell {
    position: relative;
    font-size: 1.5rem;
    color: #555; /* Changed to dark */
    margin-right: 1.5rem;
    cursor: pointer;
}
.notification-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #dc3545;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    top: 55px; /* Position it below the top bar */
    right: 1.5rem;
    width: 350px;
    max-height: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 100;
    overflow: hidden;
}
.notification-header {
    padding: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #f0f0f0;
}
.notification-list {
    max-height: 330px;
    overflow-y: auto;
}
.notification-item {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item:hover {
    background-color: #f8f9fa;
}
.notification-item.is-unread {
    background-color: #f0f5ff; /* Light blue for unread */
}
.notification-title {
    font-weight: 600;
    margin-bottom: 5px;
}
.notification-text {
    font-size: 0.9rem;
    color: #555;
}
.notification-time {
    font-size: 0.8rem;
    color: #999;
    margin-top: 8px;
}

/*
================================================================
  NEW NUMERICAL KEYPAD STYLES
================================================================
*/

/* This new container will hold the input and keypad */
.numerical-answer-container {
    display: flex;
    flex-wrap: wrap; /* Allows keypad to drop below on small screens */
    gap: 2rem;
    align-items: flex-start;
}

.numerical-input-area {
    flex-grow: 1; /* Input area takes up available space */
}

/* Make the numerical input box a bit wider */
.numerical-input {
    width: 200px;
    padding: 0.8rem;
    font-size: 1.1rem;
    margin-top: 5px;
}

/* This is the existing .numerical-keypad class */
.numerical-keypad {
    /* 1. HIDDEN BY DEFAULT */
    display: none; 
    
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 300px; /* Keypad width */
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #ddd;
    flex-shrink: 0; /* Prevents it from shrinking */
}

/* * 2. THIS IS THE MAGIC:
 * When the parent .question-slide is visible (has display: block),
 * this rule will make the keypad visible, too.
*/
.question-slide[style*="block"] .numerical-keypad {
    display: grid; 
}

/* Keep your button styles the same */
.keypad-btn {
    padding: 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.keypad-btn:hover {
    background-color: #eee;
}

.keypad-btn.keypad-op {
    background-color: #e0e0e0;
    color: #333;
    font-weight: bold;
}
/* --- VIRTUAL CALCULATOR STYLES --- */
.calculator-draggable {
    display: none; /* Hidden initially */
    position: fixed;
    top: 100px;
    left: 50px;
    width: 320px;
    background: #f2f2f2;
    border: 1px solid #999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    border-radius: 5px;
    font-family: monospace;
}

.calc-header {
    background: #004d99;
    color: white;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move; /* Indicates draggable */
}

.calc-header button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.calc-display {
    background: #fff;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    text-align: right;
}

#calc-input {
    width: 100%;
    border: none;
    font-size: 1.2rem;
    text-align: right;
    margin-bottom: 5px;
    color: #555;
}

#calc-result {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    height: 30px;
}

.calc-keys {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 10px;
}

.btn-calc {
    padding: 10px 0;
    font-size: 1rem;
    border: 1px solid #ccc;
    background: #e6e6e6;
    cursor: pointer;
    border-radius: 3px;
}

.btn-calc:hover { background: #d9d9d9; }
.btn-calc.num { background: #fff; font-weight: bold; }
.btn-calc.op { background: #f0f0f0; }
.btn-calc.fn { font-size: 0.9rem; }
.btn-calc.action { background: #ffcccc; color: red; }
.btn-calc.result-btn { background: #4caf50; color: white; grid-row: span 2; height: 100%; }

/* ================================================================
  REVIEWS SECTION 
================================================================
*/
.reviews-section {
    padding: 4rem 2rem;
    background-color: #f8f9fa;
    text-align: center;
}

.reviews-section h2 {
    font-size: 2rem;
    color: #0B1D42;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.reviews-swiper {
    width: 100%;
    padding-bottom: 50px !important; /* Space for dots */
    padding-left: 10px; /* Space for shadow */
    padding-right: 10px;
}

.review-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    text-align: left;
    position: relative;
    height: 100%; /* Equal height cards */
    transition: transform 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}

/* Round Image Styling */
.review-img-wrapper {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e0f7fa; /* Light blue border */
}

.review-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    width: 100%;
    height: 100%;
    background: #004d99;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.review-info h3 {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
    font-weight: 700;
}

.review-info span {
    font-size: 0.85rem;
    color: #777;
    display: block;
    margin-bottom: 5px;
}

.stars {
    color: #ffc107; /* Gold color */
    font-size: 0.8rem;
}

.review-text {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    font-style: italic;
}

.quote-icon {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 3rem;
    color: #f0f0f0;
    z-index: 0;
}

/* ================================================================
   PACKAGES CAROUSEL STYLES (COMPACT VERSION)
================================================================ */
.packages-section {
    background-color: rgb(249 250 251 / 1);
    padding: 3rem 2rem; /* Reduced top/bottom padding */
    border-top: 1px solid #e1e4e8;
}

.packages-header {
    text-align: center;
    margin-bottom: 2rem;
}

.packages-header h2 {
    color: #004d99;
    font-size: 1.8rem; /* Slightly smaller header */
    margin-bottom: 0.5rem;
}

/* Vertical Card Design - Fixed Size */
.package-card-vertical {
    background: #fff;
    border-radius: 10px; /* Slightly smaller radius */
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    height: 100%; 
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    
    /* --- FIX: LIMIT WIDTH --- */
    max-width: 320px; 
    margin: 0 auto; /* Centers card in the slide if slide is wider */
}

.package-card-vertical:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.pkg-img-box {
    height: 160px; /* Reduced height for compact look */
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
}

.pkg-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills box nicely */
    transition: transform 0.3s;
}

.package-card-vertical:hover .pkg-img-box img {
    transform: scale(1.05); 
}

.pkg-placeholder {
    width: 100%;
    height: 100%;
    background: #004d99;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
}

.pkg-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffc107;
    color: #333;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pkg-content {
    padding: 1rem; /* Reduced padding */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pkg-content h3 {
    margin: 0 0 0.4rem 0;
    color: #333;
    font-size: 1rem; /* Compact font */
    line-height: 1.3;
}

.pkg-content p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

.pkg-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 0.8rem;
}

.pkg-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #004d99;
}

.btn-pkg-view {
    background-color: #007bff;
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-pkg-view:hover {
    background-color: #0056b3;
}