/*
 * Main Styles for Hello Elementor Child Theme
 * QuestionBank Custom Styles
 * Version: 1.0.0
 */

/* Basic Reset for ease of use */
* {
    box-sizing: border-box;
}

body {
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    background-color: #f4f6f8;
    margin: 0;
}

:root {
    --mfl-ink: #10233f;
    --mfl-ink-soft: #324b68;
    --mfl-sun: #fbc02d;
    --mfl-sky: #3aa0ff;
    --mfl-mint: #5bd6c6;
    --mfl-berry: #ff6fa3;
    --mfl-card: #ffffff;
    --mfl-bg: #f4f8ff;
    --mfl-border: #e2e8f0;
    --mfl-shadow: 0 12px 30px rgba(16, 35, 63, 0.12);
}

body {
    background-color: var(--mfl-bg);
    color: var(--mfl-ink);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--mfl-ink);
    letter-spacing: -0.01em;
}

a {
    color: var(--mfl-sky);
}

a:hover {
    color: #1a7ad9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Logo Styling */
.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    max-height: 50px; /* Limits the height to keep header clean */
    width: auto;      /* Maintains aspect ratio */
    display: block;
}

.site-logo a {
    text-decoration: none;
    color: #1a202c;
    font-size: 24px;
}

/* Ensure the Custom Logo link doesn't add weird padding */
.custom-logo-link {
    display: inline-block;
    line-height: 0;
}

/* Navigation Base */
.menu-item > a {
    text-decoration: none;
    color: #2d3748;
    font-weight: 700;
    padding: 25px 20px;
    display: inline-block;
    font-size: 16px;
}

/* Mega Menu Panel (The Dropdown) */
.mega-menu-panel {
    position: absolute;
    top: 80px; 
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-top: 3px solid #007bff; /* Added blue line to match standard submenus */
    border-bottom: 4px solid #fbc02d;
    padding: 20px 0; 
    
    /* Remove visibility/opacity from CSS hover control */
    display: none; 
    z-index: 9999;
}

.has-mega-menu > a::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

/* This creates an invisible 20px area above the panel so the mouse 
   never technically 'leaves' the hover zone while moving down. */
.mega-menu-panel::before {
    content: "";
    position: absolute;
    top: -25px; /* Taller bridge */
    left: 0;
    width: 100%;
    height: 25px;
    background: transparent;
    display: block;
}

/* Hover Trigger */
/* Ensure the hover works on the classes WP generates */
.nav-menu li.has-mega-menu {
    position: static; /* Required for full-width panel */
}

.has-mega-menu:hover .mega-menu-panel {
    display: block;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Ensure the top-level <li> stays active when hovering the panel */
.has-mega-menu:hover > a {
    color: #007bff;
}

.no-data {
    font-size: 13px;
    color: #a0aec0;
    font-style: italic;
    list-style: none !important;
    padding-left: 0 !important;
}

/* MEGA GRID ADJUSTMENT */
.mega-grid {
    display: grid;
    /*grid-template-columns: repeat(4, 1fr); 4 Columns */
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    list-style: none; /* Remove bullets from the grid itself */
    margin: 0;
    padding: 0;
    padding-top: 0;
    list-style: none;
}

/* Treat the depth-1 list items as the containers for the columns */
.mega-grid > li {
    display: block;
}

/* Hide the default empty sub-menu generated by WP because we manually built the course list */
.mega-grid .sub-menu {
    display: none !important;
}

.mega-column h4 {
    font-size: 14px;
    text-transform: uppercase;
    color: #a0aec0;
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f4f8;
    padding-top: 5px;
    padding-bottom: 8px;
    font-weight: 800;
}

.mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
	margin-top: 0;
    padding-top: 0;
}

.nav-menu .mega-column li {
    margin-bottom: 12px;
}

.mega-column li a {
    text-decoration: none;
    color: #4a5568;
    font-size: 16px;
    font-weight: 600;
    display: block;
}

.mega-column li a:hover {
    color: #007bff;
}

/* Mini Gold Badge */
.mini-badge-gold {
    background: #fff9c4;
    color: #fbc02d;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 8px;
}

/* General Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    line-height: 1.2;
    height: 45px;
    box-sizing: border-box;
    background: linear-gradient(135deg, var(--mfl-sky), #7b8cff);
    color: #fff;
    border: none;
    box-shadow: 0 10px 20px rgba(58, 160, 255, 0.25);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(58, 160, 255, 0.3);
}

/* Home Hero */
.home-hero {
    background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.25), transparent 40%),
        linear-gradient(120deg, #142d4c 0%, #1d3f73 45%, #204a87 100%);
    color: #fff;
    padding: 110px 0;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.25), transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(91, 214, 198, 0.35), transparent 35%),
        url('/wp-content/uploads/2026/01/main_banner.png');
    background-size: cover, cover, cover;
    background-position: left top, right center, 100% center;
    background-repeat: no-repeat;
}

.badge-new {
    background: linear-gradient(135deg, var(--mfl-sun), #ffd86a);
    color: #1b1300;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 20px;
    display: inline-block;
    box-shadow: 0 8px 16px rgba(251, 192, 45, 0.3);
}

.hero-flex { display: flex; align-items: center; gap: 50px; }
.hero-text { flex: 1; }
.hero-text h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 25px; }
.hero-text p { font-size: 1.2rem; opacity: 0.85; margin-bottom: 35px; }

.hero-btns { display: flex; gap: 15px; }
.btn-rv-outline-white {
    border: 2px solid #fff;
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
	margin-top: 19px;
    text-decoration: none;
	font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

.btn-rv-outline-white:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.nav-btn-gold,
.btn-rv-gold,
.btn-rv-outline-white {
	font-size: 17px;
}

/* Course Grid */
.home-courses { padding: 80px 0; background: #f8fafc; }
.section-title { text-align: center; margin-bottom: 50px; font-size: 2.5rem; }

.home-courses,
.home-features,
.home-cta {
    position: relative;
}

.home-courses::before,
.home-features::before,
.home-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(16, 35, 63, 0.08) 1px, transparent 0);
    background-size: 26px 26px;
    opacity: 0.25;
    pointer-events: none;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.home-course-card {
    background: #fff;
    border: 1px solid var(--mfl-border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--mfl-ink);
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(16, 35, 63, 0.06);
}

.home-course-card:hover {
    transform: translateY(-5px);
    border-color: var(--mfl-sun);
    box-shadow: var(--mfl-shadow);
}

.course-icon { font-size: 40px; color: var(--mfl-berry); margin-bottom: 20px; }
.course-icon img { height: 60px; width: auto; }

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 15px;
    font-weight: bold;
    color: var(--mfl-sky);
}

.badge-mini-gold {
    background: #fff6d6;
    color: #b37300;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Features */
.home-features { padding: 80px 0; text-align: center; }
.feature-row { display: flex; gap: 40px; }
.feature-col { flex: 1; }
.feature-col i { font-size: 3rem; color: var(--mfl-sky); margin-bottom: 20px; }

.feature-col {
    background: var(--mfl-card);
    border-radius: 18px;
    padding: 30px 24px;
    border: 1px solid rgba(16, 35, 63, 0.08);
    box-shadow: 0 12px 24px rgba(16, 35, 63, 0.08);
}

/* Home CTA */
.home-cta { padding: 80px 0; }
.cta-box {
    background: linear-gradient(120deg, #152b4b 0%, #1f3c6d 45%, #214a7e 100%);
    color: #fff;
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(91, 214, 198, 0.25);
    right: -60px;
    top: -80px;
}
.btn-large { display: inline-block; padding: 20px 40px; font-size: 1.2rem; margin-top: 20px; }

/* Responsive */
@media (max-width: 992px) {
    .hero-flex { flex-direction: column; text-align: center; }
    .hero-text h1 { font-size: 2.5rem; }
    .hero-btns { justify-content: center; }
}

.footer-container {
	display: block !important;
    background-color: #0f233b; /* Same as the Hero area */
    color: #a0aec0;
    padding: 80px 0 40px 0;
    font-size: 16px;
    border-top: 1px solid #1b263b;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 25px;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #fff;
}

/* Branding Column */
.footer-logo {
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    display: block;
    margin-bottom: 20px;
}

.branding p {
    line-height: 1.6;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: #fff;
    font-size: 20px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.footer-social a:hover {
    opacity: 1;
}

/* Disclaimer */
.footer-disclaimer {
    padding: 30px 0;
    border-top: 1px solid #1b263b;
    border-bottom: 1px solid #1b263b;
    margin-bottom: 30px;
    font-size: 12px;
    line-height: 1.6;
}

/* Bottom Bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.copy-right a {
    color: #a0aec0;
    text-decoration: none;
    margin-left: 20px;
}

.copy-right a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* 1. RESET DEFAULT LIST PADDING (Crucial for alignment) */
.nav-menu, .nav-menu ul, .nav-menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 2. HEADER BASE */
.site-header {
    display: block !important;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(16, 35, 63, 0.08);
    position: sticky;
    top: 0;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

/* 3. THE FLEX CONTAINER */
.header-container {
    max-width: 1400px; /* Adjust this to how far you want them to go */
    margin: 0 auto;    /* Centers the container on the screen */
    padding: 0 0px;   /* Small safety gap from the screen edge */
    display: flex;
    justify-content: space-between; /* Pushes groups to far ends */
    align-items: center;
    height: 100%;
}

/* 4. LEFT GROUP ALIGNMENT */
.header-left-group {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Hard align left */
    gap: 40px; 
}

/* Fix for WordPress Custom Logo padding */
.site-logo a, .custom-logo-link {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}

.site-logo img {
    display: block;
    max-height: 50px;
}

/* 5. RIGHT GROUP ALIGNMENT */
.header-right-group {
    display: flex;
    align-items: center; /* Vertical center */
    height: 100%;
}

.nav-right .nav-menu {
    display: flex;
    align-items: center; /* Vertical center for all LI items */
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
}

.nav-right .nav-menu li {
    display: flex;
    align-items: center; /* Center the links inside the LI */
    height: 100%;
    margin: 0 10px; /* Space between the button and account link */
}

/* 6. NAV LINK STYLING */
.nav-menu {
    display: flex;
    align-items: stretch;
}

.nav-left, 
.nav-menu, 
.nav-menu > li {
    height: 100%;
}

.nav-menu > li {
    display: flex;
    align-items: stretch;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 80px;
    text-decoration: none;
    color: var(--mfl-ink);
    font-weight: 700;
    transition: color 0.2s;
}

/* 7. GOLD BUTTON */
.nav-btn-gold {
    background: linear-gradient(135deg, var(--mfl-sun), #ffd65f);
    color: #1b1300 !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 800;
    text-decoration: none;
    line-height: 1; /* Prevents text from shifting within the button */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    height: auto;
    margin-left: 10px;
}

.nav-btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(251, 192, 45, 0.35);
}

.nav-menu > li > a.nav-btn-gold {
    font-weight: 500;
}

.header-right-group .nav-menu li a:not(.nav-btn-gold) {
    text-decoration: none;
    color: var(--mfl-ink);
    font-weight: 700;
    font-size: 17px;
    display: flex;
    align-items: center;
    height: 100%;
    line-height: 1; /* Keeps text centered */
}

.header-right-group .nav-menu li a:not(.nav-btn-gold):hover {
    color: var(--mfl-sky);
}

/* This makes the list items sit side-by-side instead of stacked */
.subjects-row ul {
    display: flex;
    flex-wrap: wrap; /* Allows them to jump to a new row if they run out of space */
    gap: 20px;       /* Horizontal space between items */
}

.subjects-row ul li {
    margin-bottom: 0; /* Remove vertical margin */
}

.subjects-row ul li a {
    white-space: nowrap;
    background: rgba(255,255,255,0.05); /* Optional: add a slight bubble effect */
    padding: 8px 15px;
    border-radius: 4px;
}

.nav-menu li {
    position: relative;
}

/* Hide all submenus by default */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%; /* Sits below the header */
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid #edf2f7;
    border-top: 3px solid #007bff; /* Accent color */
    padding: 10px 0;
    list-style: none;
    display: none; /* Controlled by JS hover */
    z-index: 999;
}

/* Submenu Link Styling */
.nav-menu .sub-menu li a {
    display: block;
    padding: 12px 20px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.nav-menu .sub-menu li a:hover {
    background: #f7fafc;
    color: #007bff;
}

/* --- JS-HOVER COMPATIBILITY --- */

/* Ensure our JS logic opens standard submenus too */
/* Update this in qb-scripts.js if needed, or use CSS for simple submenus */
.nav-menu li:hover > .sub-menu {
    display: block;
}

/* Ensure the Mega Menu still uses its full-width logic */
.nav-menu li.has-mega-menu {
    position: static; /* Subjects stays static for full-width panel */
}

/* Course Content Section - Blue Background on full row */
.rv-course-main-content:has(.course-content-section),
.rv-course-main-content.has-course-content {
    background-color: #4F59B9 !important;
    border-top: none !important;
}

.course-content-section {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 60px 20px !important;
    display: block !important;
    background-color: transparent !important;
}

.course-content-inner {
    padding: 32px;
    color: #FAF7F7;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.3em;
    line-height: 1.7;
}

.course-content-section h2 {
    color: #FAF7F7 !important;
    margin-top: 0;
    font-size: 1.5em;
    font-weight: 700;
}

.course-content-section .course-tips-title {
    color: #FAF7F7 !important;
    margin-top: 30px;
    font-size: 1.5em;
    font-weight: 700;
}

.course-content-section p,
.course-content-section li,
.course-content-section ul,
.course-content-section ol {
    color: #FAF7F7 !important;
}

.course-content-section ul,
.course-content-section ol {
    margin: 15px 0;
    padding-left: 30px;
}

.course-content-section li {
    margin-bottom: 15px;
}