/* Qub Academy visual layer — intentionally isolated from the vendor theme. */
:root {
  --qub-ink: #14283d;
  --qub-muted: #66788a;
  --qub-navy: #0b2740;
  --qub-primary: #25b4d8;
  --qub-primary-dark: #187cb9;
  --qub-blue: #62cbe5;
  --qub-cyan: #8bd8ea;
  --qub-gold: #f2a93b;
  --qub-gold-soft: #fff5df;
  --qub-surface: #ffffff;
  --qub-canvas: #f5fafc;
  --qub-border: #dceaf0;
  --qub-radius: 18px;
  --qub-shadow: 0 18px 50px rgba(35, 45, 80, .10);
  --qub-gradient: linear-gradient(135deg, #187cb9 0%, #25b4d8 58%, #7dd7e9 100%);
  --qub-gradient-soft: linear-gradient(135deg, #f8fcfd 0%, #eaf7fb 55%, #fff7e8 100%);
}

html { scroll-behavior: smooth; }
body { color: var(--qub-ink); background: var(--qub-canvas); text-rendering: optimizeLegibility; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: 420px; z-index: -1; pointer-events: none; background: radial-gradient(circle at 8% 0%, rgba(98,203,229,.16), transparent 34%), radial-gradient(circle at 92% 8%, rgba(242,169,59,.16), transparent 30%); }
a, button, input, select, textarea { transition: border-color .2s ease, box-shadow .2s ease, color .2s ease, background-color .2s ease, transform .2s ease; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid rgba(37,180,216,.28) !important; outline-offset: 3px; }
::selection { color: #fff; background: var(--qub-primary); }

/* Navigation */
.header-navigation, .header-area, header { backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); }
.header-navigation, .header-top, .header-area { border-color: rgba(19,34,56,.08) !important; }
.header-navigation.sticky, .sticky-header.sticky-on { background: rgba(255,255,255,.94) !important; box-shadow: 0 12px 36px rgba(11,39,64,.11); }
.main-menu ul li > a, .nav-menu li > a { font-weight: 600; letter-spacing: -.01em; }
.main-menu ul li > a:hover, .main-menu ul li.active > a { color: var(--qub-primary) !important; }

/* Marketing surfaces */
.hero-area, .hero-section, [class*="hero-area"] { position: relative; overflow: hidden; background: var(--qub-gradient-soft) !important; }
.hero-area::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(37,180,216,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(37,180,216,.035) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero-area::after, .hero-section::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; top: 5%; border-radius: 50%; pointer-events: none; background: linear-gradient(145deg, rgba(37,180,216,.15), rgba(242,169,59,.12)); filter: blur(2px); }
.hero-area h1, .hero-section h1, .banner-content h1 { color: var(--qub-ink); letter-spacing: -.045em; line-height: 1.06; }
.section-title h2, .section-title-v2 h2, .section-title-v3 h3 { color: var(--qub-ink); letter-spacing: -.035em; }
.template-btn, .btn, button[type="submit"], input[type="submit"] { min-height: 46px; border-radius: 12px; font-weight: 700; box-shadow: 0 8px 22px rgba(37,180,216,.20); background: var(--qub-gradient); border-color: transparent; }
.template-btn:hover, .btn:hover, button[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,180,216,.28); background-color: var(--qub-primary-dark); border-color: var(--qub-primary-dark); }
.course-item, .course-item-v2, .course-card, .book-list-item, .instructor-item, .blog-post-item, .single-blog-post, .testimonial-item { border: 1px solid var(--qub-border) !important; border-radius: var(--qub-radius) !important; overflow: hidden; background: var(--qub-surface); box-shadow: 0 10px 30px rgba(35,45,80,.06) !important; }
.course-item:hover, .course-item-v2:hover, .course-card:hover, .instructor-item:hover, .blog-post-item:hover { transform: translateY(-6px); box-shadow: var(--qub-shadow) !important; }
.course-thumbnail img, .course-card img, .blog-post-item img, .instructor-item img { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.course-item:hover img, .course-card:hover img, .blog-post-item:hover img { transform: scale(1.035); }

/* Student account */
.profile-dashboard-section { background: linear-gradient(180deg, #f8f9ff 0%, #f5f8fc 100%); }
.profile-dashboard-section .dashboard-wrapper, .profile-dashboard-section .user-intro, .profile-dashboard-section .balance-box, .profile-dashboard-section .pending-order { border: 1px solid var(--qub-border); border-radius: var(--qub-radius); background: rgba(255,255,255,.92); box-shadow: 0 12px 36px rgba(35,45,80,.07); }
.profile-dashboard-section .dashboard-wrapper { padding: clamp(20px, 3vw, 36px); }
.profile-dashboard-section .profile-menu { border-radius: var(--qub-radius); overflow: hidden; background: #fff; border: 1px solid var(--qub-border); box-shadow: 0 12px 36px rgba(35,45,80,.07); }
.profile-menu li a { border-radius: 11px; margin: 3px 8px; font-weight: 560; }
.profile-menu li.active a, .profile-menu li a:hover { color: var(--qub-primary) !important; background: rgba(37,180,216,.10) !important; }
.profile-menu li.active svg path, .profile-menu li a:hover svg path { fill: var(--qub-primary); stroke: var(--qub-primary); }
.dboard-icon-box .icon-box { min-height: 128px; border: 1px solid var(--qub-border); border-radius: 16px !important; background: #fff; box-shadow: 0 8px 24px rgba(35,45,80,.06); }
.dboard-icon-box .icon-box:hover { transform: translateY(-4px); border-color: rgba(37,180,216,.28); box-shadow: var(--qub-shadow); }
.dboard-icon-box .icon-box-content h5 { color: var(--qub-ink); font-size: 28px; font-weight: 750; }
.balance-box { background: linear-gradient(135deg, var(--qub-navy), var(--qub-primary-dark) 56%, var(--qub-primary)) !important; color: #fff; }
.balance-box h4, .balance-box h6 { color: #fff !important; }

/* Forms, searchable AJAX/dependent selects */
.form-control, .form-select, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select { min-height: 48px; border: 1px solid #dce2ec; border-radius: 11px; background-color: #fff; color: var(--qub-ink); }
.form-control:focus, .form-select:focus, input:focus, textarea:focus, select:focus { border-color: rgba(37,180,216,.75); box-shadow: 0 0 0 4px rgba(37,180,216,.12); }
label { color: #34445c; font-weight: 600; }
.select2-container { width: 100% !important; }
.select2-container .select2-selection--single, .select2-container .select2-selection--multiple { min-height: 48px; border: 1px solid #dce2ec !important; border-radius: 11px !important; background: #fff; }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 46px; padding-left: 14px; color: var(--qub-ink); }
.select2-container .select2-selection--single .select2-selection__arrow { height: 46px; right: 8px; }
.select2-container--open .select2-selection--single, .select2-container--focus .select2-selection--multiple { border-color: rgba(37,180,216,.75) !important; box-shadow: 0 0 0 4px rgba(37,180,216,.12); }
.select2-dropdown { border: 1px solid var(--qub-border); border-radius: 12px; overflow: hidden; box-shadow: 0 18px 45px rgba(26,35,65,.16); }
.select2-search--dropdown { display: block !important; padding: 10px; background: #f8f9fc; }
.select2-search--dropdown .select2-search__field { height: 42px; border: 1px solid #dce2ec !important; border-radius: 9px; padding: 8px 12px; }
.select2-results__option { padding: 10px 13px; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--qub-primary); }
.select2-container--default .select2-results__option--selected { color: var(--qub-primary); background: #eaf7fb; font-weight: 700; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { width: 8px; height: 8px; margin-top: -6px; border: 0; border-right: 2px solid var(--qub-primary); border-bottom: 2px solid var(--qub-primary); transform: rotate(45deg); }
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { margin-top: -1px; transform: rotate(225deg); }
.select2-container--disabled .select2-selection { cursor: not-allowed; opacity: .62; background: #edf4f6 !important; }
.select2-selection__clear { color: #6b8490; font-size: 20px; }

/* Tables and feedback */
.table-responsive { border-radius: 15px; border: 1px solid var(--qub-border); background: #fff; }
.table { margin-bottom: 0; }
.table thead th { background: #f5f6fb; color: #42516a; border: 0; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.table tbody td { border-color: #edf0f5; vertical-align: middle; }
.pagination .page-link { margin: 0 3px; border: 0; border-radius: 9px !important; color: var(--qub-primary); }
.pagination .active .page-link { background: var(--qub-primary); box-shadow: 0 6px 16px rgba(37,180,216,.24); }
.modal-content { border: 0; border-radius: 20px; box-shadow: 0 24px 70px rgba(20,30,60,.2); }

/* Menus and dropdowns */
.dropdown-menu, .mega-menu, .user-profile-dropdown-content { padding: 10px !important; border: 1px solid var(--qub-border) !important; border-radius: 16px !important; background: rgba(255,255,255,.98) !important; box-shadow: 0 22px 60px rgba(11,39,64,.16) !important; backdrop-filter: blur(18px); }
.dropdown-menu .dropdown-item, .mega-menu a, .user-profile-dropdown-content a { min-height: 42px; display: flex; align-items: center; padding: 9px 12px !important; border-radius: 10px; color: var(--qub-ink) !important; font-weight: 600; }
.dropdown-menu .dropdown-item:hover, .dropdown-menu .dropdown-item:focus, .mega-menu a:hover, .user-profile-dropdown-content a:hover { color: var(--qub-primary) !important; background: #eaf7fb !important; transform: translateX(2px); }
.dropdown-toggle::after { border: 0 !important; width: 7px; height: 7px; margin-left: 8px; vertical-align: 3px; border-right: 2px solid currentColor !important; border-bottom: 2px solid currentColor !important; transform: rotate(45deg); }
.show > .dropdown-toggle::after { transform: rotate(225deg); vertical-align: -1px; }

/* Rhapsody-inspired public experience */
.template-header { z-index: 100; }
.template-header .header-navigation { min-height: 84px; }
.template-header .header-inner { min-height: 84px; }
.template-header .brand-logo img { max-height: 58px; width: auto; }
.template-header.nav-white-color .nav-menu > ul > li > a, .template-header.nav-white-color .header-extra > li > a { color: var(--qub-ink) !important; }
.template-header.nav-white-color .nav-menu > ul > li > a:hover { color: var(--qub-primary) !important; }
.template-header .header-extra > .shopping-mini-cart { flex: 0 0 auto; width: 38px; min-width: 38px; height: 38px; }
.template-header .header-extra > .shopping-mini-cart .cart-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; min-width: 38px; height: 38px; padding: 0; line-height: 1; flex: 0 0 38px; }
.template-header .header-extra > .shopping-mini-cart .cart-btn svg { display: block; width: 20px !important; min-width: 20px; max-width: none; height: 22px !important; flex: 0 0 20px; }
.template-header .header-extra > .shopping-mini-cart .cart-btn i { display: block; width: 22px; min-width: 22px; font-size: 21px; line-height: 1; text-align: center; flex: 0 0 22px; }
.template-header .header-extra > .shopping-mini-cart .badge { inset-inline-end: 0; top: -2px; min-width: 16px; width: 16px; height: 16px; line-height: 16px; pointer-events: none; }
.header-topbar .shopping-mini-cart { flex: 0 0 auto; }
.header-topbar .shopping-mini-cart .cart-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; min-width: 36px; height: 36px; flex: 0 0 36px; }
.header-topbar .shopping-mini-cart .cart-btn i { width: 22px; min-width: 22px; font-size: 21px; line-height: 1; text-align: center; flex: 0 0 22px; }
.template-header.position-absolute .header-navigation { background: rgba(255,255,255,.78); border-bottom: 1px solid rgba(37,180,216,.10); }
.template-header .login-btn .template-btn { background: var(--qub-gradient); color: #fff; border: 0; }
.hero-content { position: relative; z-index: 2; }
.hero-content .hero-subtitle, .qub-eyebrow { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 8px 13px; border: 1px solid rgba(242,169,59,.45); border-radius: 999px; color: #8f6200 !important; background: rgba(255,247,218,.88); font-size: 12px; line-height: 1.2; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.hero-content .hero-title { max-width: 720px; color: var(--qub-navy) !important; font-size: clamp(44px, 5.5vw, 76px); font-weight: 800; }
.hero-content .hero-title strong, .hero-content .hero-title span { color: var(--qub-primary); }
.hero-content > p { max-width: 600px; color: var(--qub-muted); font-size: 18px; line-height: 1.75; }
.hero-masonry-image img, .hero-image > img { position: relative; border-radius: 22px !important; box-shadow: 0 22px 60px rgba(11,39,64,.16); }
.hero-btns { gap: 12px; flex-wrap: wrap; }
.bordered-btn-secondary { color: var(--qub-primary) !important; border: 1px solid rgba(37,180,216,.28) !important; background: rgba(255,255,255,.8) !important; box-shadow: none !important; }
.bordered-btn-secondary:hover { color: #fff !important; background: var(--qub-primary) !important; }
.top-courses-section, .course-subject-section, .course-lesson-section, .student-feedback-section { background: #fff; }
.top-courses-section, .course-subject-section, .success-story-section, .recent-videos-section, .course-lesson-section, .featured-news-section, .student-feedback-section { position: relative; padding-top: 100px !important; padding-bottom: 86px !important; }
.common-heading .tag, .section-title .tag, .section-title-v2 .tag { color: var(--qub-primary) !important; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.common-heading h3, .section-title h2, .section-title-v2 h2 { color: var(--qub-navy) !important; font-size: clamp(31px, 3.5vw, 48px); line-height: 1.12; font-weight: 780; }
.course-item, .course-item-v2, .course-card { position: relative; border-radius: 20px !important; }
.course-item::after, .course-item-v2::after { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--qub-primary), var(--qub-blue), var(--qub-gold)); opacity: 0; transition: opacity .25s ease; }
.course-item:hover::after, .course-item-v2:hover::after { opacity: 1; }
.course-item .course-title a, .course-item-v2 .course-title a { color: var(--qub-navy); font-weight: 700; }
.course-item .course-title a:hover { color: var(--qub-primary); }
.course-subject-section { background: linear-gradient(180deg, #f8fcfd, #fff); }
.subject-item, .course-subject-item { border: 1px solid #dceaf0 !important; border-radius: 16px !important; background: #fff !important; box-shadow: 0 9px 24px rgba(11,39,64,.055); }
.subject-item:hover, .course-subject-item:hover { color: #fff; border-color: var(--qub-primary) !important; background: linear-gradient(135deg, var(--qub-primary), var(--qub-blue)) !important; transform: translateY(-4px); }
.student-feedback-section { background: linear-gradient(135deg, #f3fafc 0%, #e4f5fa 60%, #f8fcfd 100%) !important; }
.student-feedback-section h2, .student-feedback-section h3, .student-feedback-section h4 { color: var(--qub-ink); }
.student-feedback-section p { color: var(--qub-muted); }
.student-feedback-section .testimonial-item, .student-feedback-section [class*="testimonial"] { border-color: rgba(255,255,255,.15) !important; }
.featured-news-section { background: #f5fafc !important; }
.footer-area, footer { background: var(--qub-navy) !important; }
.footer-area::before, footer::before { background: linear-gradient(90deg, var(--qub-primary), var(--qub-blue), var(--qub-gold)); }

/* General page polish */
.page-title-area, .breadcrumb-area, .common-banner { background: var(--qub-gradient-soft) !important; }
.page-title-area h1, .page-title-area h2, .breadcrumb-area h1, .common-banner h1 { color: var(--qub-ink) !important; letter-spacing: -.035em; }
.accordion-item { margin-bottom: 12px; overflow: hidden; border: 1px solid var(--qub-border) !important; border-radius: 14px !important; background: #fff; }
.accordion-button { min-height: 56px; color: var(--qub-ink); font-weight: 700; background: #fff; box-shadow: none !important; }
.accordion-button:not(.collapsed) { color: var(--qub-primary); background: #eaf7fb; }
.accordion-button::after { filter: hue-rotate(225deg) saturate(1.5); }
.alert { border: 0; border-radius: 14px; box-shadow: 0 8px 24px rgba(11,39,64,.08); }
.nav-tabs { gap: 8px; border-bottom-color: var(--qub-border); }
.nav-tabs .nav-link { border: 0; border-radius: 10px 10px 0 0; color: var(--qub-muted); font-weight: 700; }
.nav-tabs .nav-link.active, .nav-tabs .nav-link:hover { color: var(--qub-primary); background: #eaf7fb; }
.form-check-input:checked { border-color: var(--qub-primary); background-color: var(--qub-primary); }
.badge { border-radius: 999px; }

/* Replacement for the former fun-fact section */
.qub-impact-section { position: relative; isolation: isolate; color: #fff; background: linear-gradient(125deg, var(--qub-navy) 0%, var(--qub-primary-dark) 54%, var(--qub-primary) 100%) !important; }
.qub-impact-section::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .22; background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(90deg, transparent, #000 48%, transparent); }
.qub-impact-glow { position: absolute; width: 400px; height: 400px; right: -80px; top: -180px; border-radius: 50%; background: rgba(242,169,59,.18); filter: blur(5px); pointer-events: none; }
.qub-impact-copy { position: relative; z-index: 2; }
.qub-impact-copy h2 { margin: 20px 0 18px; color: #fff; font-size: clamp(38px, 4.6vw, 60px); line-height: 1.06; font-weight: 790; letter-spacing: -.045em; }
.qub-impact-copy h2 span { color: var(--qub-gold); }
.qub-impact-copy > p { max-width: 520px; color: rgba(255,255,255,.75); font-size: 17px; line-height: 1.75; }
.qub-impact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 30px; }
.qub-gold-btn { color: #14203a !important; border: 0 !important; background: linear-gradient(135deg, #ffd35e, var(--qub-gold)) !important; box-shadow: 0 12px 30px rgba(242,169,59,.25) !important; }
.qub-gold-btn:hover { background: linear-gradient(135deg, #ffdc7a, #f9bd25) !important; box-shadow: 0 16px 38px rgba(242,169,59,.36) !important; }
.qub-text-link { color: #fff; font-weight: 650; }
.qub-text-link:hover { color: var(--qub-gold); }
.qub-impact-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.qub-impact-card { min-height: 210px; padding: 26px; border: 1px solid rgba(255,255,255,.13); border-radius: 20px; background: rgba(255,255,255,.08); box-shadow: 0 20px 50px rgba(0,0,0,.12); backdrop-filter: blur(12px); }
.qub-impact-card-featured { grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; min-height: 438px; background: linear-gradient(155deg, rgba(98,203,229,.55), rgba(255,255,255,.08)); }
.qub-impact-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: auto; border-radius: 14px; color: var(--qub-gold); background: rgba(242,169,59,.13); font-size: 22px; }
.qub-impact-number { display: block; margin-top: 24px; color: #fff; font-size: 38px; line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.qub-impact-card h3 { margin: 10px 0 7px; color: #fff; font-size: 18px; font-weight: 700; }
.qub-impact-card p { margin: 0; color: rgba(255,255,255,.66); line-height: 1.55; }

/* Registration and student portal */
.sign-up-section, .sign-in-section { min-height: calc(100vh - 80px); background: radial-gradient(circle at 12% 16%, rgba(98,203,229,.13), transparent 27%), radial-gradient(circle at 88% 78%, rgba(242,169,59,.15), transparent 25%), #f6f9ff; }
.user-form-container { padding: clamp(24px, 4vw, 48px) !important; border: 1px solid rgba(37,180,216,.10); border-radius: 24px !important; background: rgba(255,255,255,.96); box-shadow: 0 28px 80px rgba(11,39,64,.13) !important; }
.user-form-container h3, .user-form-container h4 { color: var(--qub-navy); font-weight: 780; }
.signup-search-first + .select2 .select2-results__options:empty { display: none; }
.select2-container.qub-search-first-dropdown:not(.has-query) .select2-results { display: none; }
.select2-container.qub-search-first-dropdown:not(.has-query) .select2-dropdown { padding-bottom: 8px; }
.select2-results__message { padding: 16px !important; color: #718096; text-align: center; }
.country-code-filter .dropdown-menu { max-height: 330px; overflow-y: auto; }
.country-code-filter .country-search { position: sticky; top: 0; z-index: 2; }
.profile-dashboard-section { background: radial-gradient(circle at 85% 0%, rgba(242,169,59,.12), transparent 28%), linear-gradient(180deg, #f5fafc, #fff); }
.profile-dashboard-section .section-title-v3 h3 { color: var(--qub-navy); font-size: 34px; font-weight: 780; }
.profile-menu li.active a, .profile-menu li a:hover { color: var(--qub-primary) !important; background: #eaf7fb !important; }
.dboard-icon-box .icon-box { overflow: hidden; position: relative; }
.dboard-icon-box .icon-box::after { content: ""; position: absolute; width: 80px; height: 80px; right: -25px; bottom: -35px; border-radius: 50%; background: rgba(242,169,59,.13); }
.balance-box { background: linear-gradient(135deg, #0b2740, #25b4d8 60%, #62cbe5) !important; }

@media (max-width: 767.98px) {
  .profile-dashboard-section .dashboard-wrapper { padding: 18px; margin-top: 18px; }
  .dboard-icon-box .icon-box { min-height: 112px; }
  .hero-area h1, .hero-section h1, .banner-content h1 { letter-spacing: -.03em; }
  .template-header .header-navigation, .template-header .header-inner { min-height: 72px; }
  .hero-content .hero-title { font-size: clamp(38px, 12vw, 54px); }
  .top-courses-section, .course-subject-section, .success-story-section, .recent-videos-section, .course-lesson-section, .featured-news-section, .student-feedback-section { padding-top: 60px !important; padding-bottom: 52px !important; }
  .qub-impact-grid { grid-template-columns: 1fr; }
  .qub-impact-card-featured { grid-row: auto; min-height: 260px; }
  .qub-impact-card { min-height: 190px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
