/*
Theme Name:  Hello Elementor Child
Theme URI:
Description: HKSOA Academy - Child theme for Hello Elementor
Author:      HKSOA
Template:    hello-elementor
Version:     1.1.0
Text Domain: hello-elementor-child
*/

/* Fonts loaded via wp_enqueue_style in functions.php for performance */

/* ============================================================
   GLOBAL FONTS — Inter (body) + Plus Jakarta Sans (headings)
   ============================================================ */
body,
body * {
  font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}
h1, h2, h3, h4, h5, h6,
.hp-hero__title,
.hp-section-title,
.hp-cta__title {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Arial, Helvetica, sans-serif !important;
}

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --clr-primary:     #0d2359;
  --clr-primary-mid: #1a3c7a;
  --clr-primary-lt:  #1e4fa0;
  --clr-accent:      #f5821f;
  --clr-accent-dk:   #d96e15;
  --clr-white:       #ffffff;
  --clr-offwhite:    #f4f7fb;
  --clr-text:        #1F3A5D;
  --clr-text-mid:    #64748A;
  --clr-text-lt:     #64748A;
  --clr-border:      #e2e8f0;
  --clr-overlay:     rgba(10, 22, 55, 0.80);
  --shadow-card:     0 4px 24px rgba(0,0,0,0.09);
  --shadow-hover:    0 10px 36px rgba(0,0,0,0.16);
  --radius:          8px;
  --transition:      all 0.28s ease;
  --max-width:       1200px;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.hksoa-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.hksoa-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: 3px solid #27ae60;
  border-radius: 8px;
  padding: 14px 16px;
  min-width: 320px;
  max-width: 420px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  animation: hksoa-toast-in 0.3s ease forwards;
  position: relative;
}
.hksoa-toast--error {
  border-top-color: #E74C3C;
}
.hksoa-toast--warning {
  border-top-color: #F39C12;
}
.hksoa-toast--hiding {
  animation: hksoa-toast-out 0.3s ease forwards;
}
.hksoa-toast__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.hksoa-toast__icon--success {
  background: #0D9824;
}
.hksoa-toast__icon--error {
  background: #E74C3C;
}
.hksoa-toast__icon--warning {
  background: #F39C12;
}
.hksoa-toast__icon svg {
  width: 14px;
  height: 14px;
}
.hksoa-toast__body {
  flex: 1;
  min-width: 0;
}
.hksoa-toast__message {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  margin: 0;
}
.hksoa-toast__link {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #2275EE;
  text-decoration: none;
}
.hksoa-toast__link:hover {
  text-decoration: underline;
}
.hksoa-toast__close,
button.hksoa-toast__close,
.hksoa-toast button.hksoa-toast__close {
  flex-shrink: 0;
  background: none !important;
  border: none !important;
  font-size: 18px !important;
  color: #999 !important;
  cursor: pointer;
  padding: 0 !important;
  line-height: 1;
  margin-top: -2px;
  box-shadow: none !important;
  outline: none !important;
}
.hksoa-toast__close:hover,
button.hksoa-toast__close:hover {
  color: #333 !important;
  background: none !important;
  border: none !important;
}

@keyframes hksoa-toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes hksoa-toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

@media (max-width: 480px) {
  .hksoa-toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
  }
  .hksoa-toast {
    min-width: 0;
    max-width: none;
  }
}

/* ============================================================
   GLOBAL RESETS & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
  color: var(--clr-text);
  line-height: 1.6;
  margin: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   HEADER
   ============================================================ */
.hksoa-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: url('images/hero-banner.jpg') center top / cover no-repeat;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  transition: background 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}
.hksoa-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 40, 80, 0.5);
  z-index: -1;
}

/* Homepage: header transparent over hero, full size */
body.home .hksoa-header,
body.page-template-page-home .hksoa-header {
  position: fixed;
  width: 100%;
  background: transparent;
  box-shadow: none;
}
body.home .hksoa-header::before {
  display: none;
}
body.home .hksoa-header .header-inner {
  height: 140px;
}
body.home .hksoa-header .brand-logo {
  height: 120px;
  width: 120px;
}
body.home .hksoa-header .brand-name {
  font-size: 26px;
}
body.home .hksoa-header .brand-sub {
  font-size: 16px;
}
body.home .hksoa-header .nav-menu > li > a {
  font-size: 18px;
}
body.home .hksoa-header .btn-visit-hksoa,
body.home .hksoa-header .btn-visit-lms,
body.home .hksoa-header .btn-login-register {
  font-size: 18px !important;
}

/* Homepage scrolled: shrink + water bg */
body.home .hksoa-header.header-scrolled,
body.page-template-page-home .hksoa-header.header-scrolled {
  background: url('images/hero-banner.jpg') center top / cover no-repeat;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
body.home .hksoa-header.header-scrolled::before,
body.page-template-page-home .hksoa-header.header-scrolled::before {
  display: block;
}
body.home .hksoa-header.header-scrolled .header-inner {
  height: 110px;
  transition: height 0.3s ease;
}
@media (min-width: 769px) {
  body.home .hksoa-header.header-scrolled .brand-logo,
  body:not(.home) .hksoa-header .brand-logo {
    height: 85px !important;
    width: 85px !important;
    transition: height 0.3s ease, width 0.3s ease;
  }
  body.home .hksoa-header.header-scrolled .header-inner,
  body:not(.home) .hksoa-header .header-inner {
    height: 110px !important;
  }
}
body.home .hksoa-header.header-scrolled .brand-name {
  font-size: 18px;
  transition: font-size 0.3s ease;
}
body.home .hksoa-header.header-scrolled .brand-sub {
  font-size: 12px;
  transition: font-size 0.3s ease;
}
body.home .hksoa-header.header-scrolled .nav-menu > li > a {
  font-size: 16px;
  transition: font-size 0.3s ease;
}
body.home .hksoa-header.header-scrolled .btn-visit-hksoa,
body.home .hksoa-header.header-scrolled .btn-visit-lms,
body.home .hksoa-header.header-scrolled .btn-login-register {
  font-size: 16px !important;
  transition: font-size 0.3s ease;
}

.hksoa-header .header-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 30px;
  height: 110px;
  height: 70px;
  transition: height 0.3s ease;
}

/* ---- Branding (Logo circle + text) ---- */
.site-branding {
  margin-left: 10px;
  flex-shrink: 0;
  margin-right: auto;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}

.brand-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #1F3A5D;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-logo {
  height: 85px;
  width: 85px;
  flex-shrink: 0;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: 5px;
  box-sizing: border-box;
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
  transition: height 0.3s ease, width 0.3s ease;
}
.brand-text {
  display: flex;
  flex-direction: column;
  margin-left: 2px;
  gap: 6px;
}

.brand-name {
  font-size: 18px;
  font-weight: 400;
  font-family: 'Montserrat', 'Segoe UI', Arial, Helvetica, sans-serif !important;
  color: var(--clr-white);
  white-space: nowrap;
  line-height: 1.2;
}

.brand-sub {
  font-size: 12px;
  font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif !important;
  color: #fff;
  white-space: nowrap;
  line-height: 1.2;
}

.brand-sub strong {
  color: #fff;
}

/* ---- Nav Group (all right-side items) ---- */
.header-nav-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

/* ---- Navigation ---- */
.main-nav {
  display: flex;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.nav-menu > li > a {
  display: block;
  padding: 6px 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a {
  color: #F3AD1C !important;
}

/* ---- Visit HKSOA Button ---- */
.btn-visit-hksoa {
  display: inline-block;
  padding: 4px 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--clr-white);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-visit-hksoa:hover {
  background: rgba(255,255,255,0.1);
  border-color: #F3AD1C !important;
  color: #F3AD1C !important;
}

/* ---- Visit DLMS Button (logged in + purchased) ---- */
.btn-visit-lms {
  display: inline-block;
  padding: 4px 12px;
  font-size: 16px;
  font-weight: 500;
  color: #fff !important;
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.45) !important;
  border-radius: 3px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.btn-visit-lms:hover {
  background: rgba(255,255,255,0.1) !important;
  border-color: #F3AD1C !important;
  color: #F3AD1C !important;
}

/* ---- Login / Register Link ---- */
.btn-login-register {
  display: inline-block;
  padding: 4px 12px !important;
  margin: 0 0 0 4px;
  font-size: 16px !important;
  font-weight: 500;
  font-family: inherit;
  color: #fff !important;
  background: #FF6D40 !important;
  border: 1px solid #FF6D40 !important;
  border-radius: 3px !important;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
  text-decoration: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
}

.btn-login-register:hover {
  color: #FF6D40 !important;
  border-color: #FF6D40 !important;
  background: transparent !important;
}

.btn-login-register:focus {
  outline: none;
  box-shadow: none;
}

/* ---- Mobile Toggle ---- */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  box-shadow: none !important;
  outline: none !important;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff !important;
  border-radius: 2px;
  transition: var(--transition);
}

/* Hamburger animation when open */
.hksoa-header.nav-open .mobile-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hksoa-header.nav-open .mobile-toggle span:nth-child(2) {
  opacity: 0;
}
.hksoa-header.nav-open .mobile-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   AUTH MODAL (Login / Register Popup)
   ============================================================ */
.auth-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.auth-modal-overlay.active {
  display: flex;
}

.auth-modal {
  background: var(--clr-white);
  border-radius: 12px;
  width: 420px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 36px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.auth-modal-close:hover {
  color: #333;
}

.auth-form h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--clr-primary);
  margin: 0 0 24px;
  text-align: center;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text-mid);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid var(--clr-border);
  border-radius: 6px;
  outline: none;
  transition: var(--transition);
  color: var(--clr-text);
}

.form-group input:focus {
  border-color: var(--clr-primary-lt);
  box-shadow: 0 0 0 3px rgba(30,79,160,0.1);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--clr-text-mid);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
}

.forgot-link {
  font-size: 13px;
  color: var(--clr-primary-lt);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.form-message {
  font-size: 13px;
  padding: 8px 0;
  text-align: center;
  min-height: 24px;
}

.form-message.error {
  color: #e74c3c;
}

.form-message.success {
  color: #27ae60;
}

.btn-auth-submit {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--clr-white);
  background: var(--clr-primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-auth-submit:hover {
  background: var(--clr-primary-mid);
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--clr-text-mid);
  margin: 18px 0 0;
}

.auth-switch a {
  color: var(--clr-primary-lt);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ============================================================
   FOOTER
   ============================================================ */
.hksoa-footer {
  background: url('images/hero-banner.jpg') center top / cover no-repeat;
  color: #fff;
  position: relative;
}
.hksoa-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 40, 80, 0.75);
}

/* Footer Top */
.hksoa-footer .container {
  max-width: 100%;
  padding: 0 60px;
  position: relative;
  z-index: 1;
}
.footer-top {
  padding: 36px 0 28px;
}
.footer-top-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Left: Powered by + Logo + Social */
.footer-left {
  display: flex;
  flex-direction: column;
}
.footer-powered-label {
  font-size: 13px;
  color: #fff;
  margin: 0 0 8px;
  font-weight: 600;
}
.footer-mp-logo {
  display: block;
  margin-bottom: 16px;
  text-decoration: none;
}
.footer-mp-img {
  width: 220px;
  height: auto;
  aspect-ratio: 300 / 87;
  object-fit: contain;
}
.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: #1e2178;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.25s;
}
.footer-social a:hover {
  opacity: 0.8;
}

/* Right: Contact */
.footer-right {
  text-align: right;
}
.footer-contact-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid #4a6cf7;
  display: inline-block;
}
.footer-contact-line {
  font-size: 13px;
  color: #fff;
  margin: 6px 0 0;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
  position: relative;
  z-index: 1;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #fff;
}
.footer-bottom-inner p {
  margin: 0;
}
.footer-bottom-inner a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-bottom-inner a:hover {
  color: #fff;
}

/* Footer Responsive */
@media (max-width: 480px) {
  .footer-top-grid {
    flex-direction: column;
    gap: 28px;
  }
  .footer-right {
    text-align: left;
  }
  .footer-bottom-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}

/* ============================================================
   PAGE CONTENT AREA (Elementor sections)
   ============================================================ */
.hksoa-page {
  font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
  color: var(--clr-text);
  line-height: 1.6;
}

.hksoa-page .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.4;
}

.btn-primary {
  background: var(--clr-accent);
  color: var(--clr-white);
  border-color: var(--clr-accent);
}

.btn-primary:hover {
  background: var(--clr-accent-dk);
  border-color: var(--clr-accent-dk);
  color: var(--clr-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245,130,31,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}

.btn-outline:hover {
  background: var(--clr-primary);
  color: var(--clr-white);
}

/* ============================================================
   COURSES PAGE
   ============================================================ */
.courses-page {
  font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
  color: var(--clr-text);
}
.courses-page .container {
  max-width: 100%;
  padding: 0 60px;
}

/* Hero Banner */
.courses-hero {
  background: #F4F5F8;
  padding: 36px 0 30px;
  text-align: center;
  border-bottom: 1px solid var(--clr-border);
}

.courses-hero h1 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--clr-text);
  margin: 0 0 8px;
}

.courses-hero p {
  font-size: 14px;
  color: var(--clr-text-mid);
  max-width: 100%;
  margin: 0 auto;
  line-height: 1.6;
}

/* Filter Bar */
.courses-filter-bar {
  background: #E9F2FF;
  padding: 14px 0;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--clr-text);
  white-space: nowrap;
}

.filter-cat-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--clr-text-mid);
}

/* Custom Searchable Category Dropdown */
.cat-dropdown {
  position: relative;
  min-width: 220px;
}

.cat-dropdown__selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  font-size: 13px;
  border: 1px solid var(--clr-border);
  border-radius: 5px;
  background: var(--clr-white);
  color: var(--clr-text);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.cat-dropdown__selected:hover {
  border-color: var(--clr-primary-lt);
}

.cat-dropdown.open .cat-dropdown__selected {
  border-color: var(--clr-primary-lt);
  box-shadow: 0 0 0 3px rgba(30,79,160,0.1);
}

.cat-dropdown.open .cat-dropdown__selected svg {
  transform: rotate(180deg);
}

.cat-dropdown__selected svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.cat-dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 100;
  overflow: hidden;
}

.cat-dropdown__search-wrap {
  position: relative;
  padding: 10px 12px 6px;
}

.cat-dropdown__search-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.cat-dropdown__search {
  width: 100%;
  padding: 8px 12px 8px 30px !important;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  outline: none;
  background: #fff;
  color: var(--clr-text);
  box-sizing: border-box;
  border-radius: 20px;
}

.cat-dropdown__search:focus {
  border-color: var(--clr-primary-lt);
}

.cat-dropdown__search::placeholder {
  color: #a0aec0;
}

.cat-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 240px;
  overflow-y: auto;
}

.cat-dropdown__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--clr-text);
  cursor: pointer;
  transition: background 0.15s ease;
}

.cat-dropdown__list li::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 3px;
  background: #fff;
  transition: all 0.15s ease;
}

.cat-dropdown__list li:hover {
  background: #f8fafc;
}

.cat-dropdown__list li.active::before {
  background: #243692;
  border-color: #243692;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
}

.cat-dropdown__list li.active {
  font-weight: 600;
  color: var(--clr-text);
}

.cat-dropdown__list li.hidden {
  display: none;
}

.cat-dropdown__loading {
  color: #9CA3AF !important;
  font-size: 12px !important;
  cursor: default !important;
  pointer-events: none;
}

.cat-dropdown__loading::before {
  display: none !important;
}

.cat-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e2e8f0;
  border-top-color: #243692;
  border-radius: 50%;
  animation: cat-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes cat-spin {
  to { transform: rotate(360deg); }
}

.filter-right {
  font-size: 13px;
  color: var(--clr-text-mid);
  margin-left: 20px;
}

/* Courses Grid */
.courses-listing {
  background: #F4F5F8;
  padding: 40px 0 60px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.courses-loading,
.courses-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--clr-text-mid);
  font-size: 15px;
}

/* Pagination */
.courses-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 32px 0 10px;
  flex-wrap: wrap;
}
.pagination-btn,
button.pagination-btn,
.courses-pagination button.pagination-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 38px !important;
  height: 38px !important;
  padding: 0 12px !important;
  border: 1.5px solid #d0d8e3 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #333 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none !important;
  outline: none !important;
}
.pagination-btn:hover:not(.disabled):not(.active),
button.pagination-btn:hover:not(.disabled):not(.active) {
  background: #f0f4f8 !important;
  border-color: #2275EE !important;
  color: #2275EE !important;
}
.pagination-btn.active,
button.pagination-btn.active {
  background: #2275EE !important;
  border-color: #2275EE !important;
  color: #fff !important;
  font-weight: 600 !important;
}
.pagination-btn.disabled,
button.pagination-btn.disabled {
  opacity: 0.4 !important;
  cursor: default;
  background: #fff !important;
  border-color: #d0d8e3 !important;
  color: #333 !important;
}
.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 38px;
  color: #999;
  font-size: 14px;
}
.pagination-prev,
.pagination-next {
  font-weight: 500;
}

.course-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #1a1054, #2b2a8e, #3a3aaf);
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 3px;
}

/* Course Card */
.course-card {
  background: var(--clr-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

/* Card Image */
.course-card-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-lt));
}

.course-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.course-card:hover .course-card-img img {
  transform: scale(1.05);
}

/* Image overlay title */
/* Category badge at bottom of image */
.course-card-category,
.hp-featured__card-category {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #003963 0%, #0076A8 100%);
  color: var(--clr-white);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  text-align: left;
}

/* Category "..." dots + hover popup */
.cat-dots {
  cursor: pointer;
  margin-left: 4px;
  font-weight: 700;
  letter-spacing: 1px;
}
.cat-dots-popup {
  position: fixed;
  background: #fff;
  color: #1F3A5D;
  font-size: 11px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  white-space: normal;
  min-width: 180px;
  max-width: 280px;
  z-index: 10000;
  line-height: 1.5;
  pointer-events: none;
}

/* Card Body */
.course-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--clr-text);
  margin: 0 0 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Title wrap container */
.course-title-wrap {
  position: relative;
  margin: 0 0 4px;
}
.course-title-wrap .course-card-title {
  margin: 0;
}
/* "...More" link — overlaid at bottom-right of title */
.course-title-more-link {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #fff;
  padding-left: 4px;
  color: #2275EE;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
}
.course-title-more-link:hover {
  text-decoration: underline;
}
/* Full-name popup */
.course-title-popup {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 100;
  background: #fff;
  border: 1px solid #d0d8e3;
  border-radius: 8px;
  padding: 10px 28px 10px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text);
  line-height: 1.45;
  min-width: 180px;
  max-width: 300px;
  word-wrap: break-word;
}
.course-title-popup.open { display: block; }
.course-title-popup-close {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none !important;
  border: none !important;
  font-size: 15px;
  cursor: pointer;
  color: #999;
  padding: 0 3px !important;
  line-height: 1;
}
.course-title-popup-close:hover { color: #333; }

.course-card-desc {
  font-size: 12px;
  color: var(--clr-text-lt);
  margin: 0 0 10px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* When title is 2 lines, description is 1 line */
.course-card-desc.desc-one-line {
  -webkit-line-clamp: 1;
}

/* Info Rows */
.course-card-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--clr-text-mid);
  white-space: nowrap;
}

.card-stat svg {
  flex-shrink: 0;
}

.stat-svg-icon {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
  vertical-align: middle;
}

.card-stat strong {
  font-weight: 700;
  color: var(--clr-text);
}

.star-icon {
  color: #F0A500;
  font-size: 14px;
}

/* Price Block */
.card-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: auto;
  white-space: nowrap;
}

.price-line {
  display: flex;
  align-items: center;
  gap: 4px;
}

.price-highlight {
  font-size: 14px;
  font-weight: 700;
  color: #27ae60;
}

.price-label {
  font-size: 11px;
  color: var(--clr-text-lt);
}

.member-line {
  font-size: 11px;
  color: #1E1E1E;
  background: #FFF9ED;
  padding: 2px 6px;
  border-radius: 2px;
}

.member-label {
  font-size: 10px;
  color: #1E1E1E;
  font-weight: 600;
}

.price-free-badge {
  display: inline-block;
  background: #0D9824;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 18px;
  border-radius: 5px;
}

/* Divider after CPD points row */
.course-card-row--stats {
  padding-bottom: 12px;
  border-bottom: 1px solid #edf0f5;
}

/* Enrolled + price row — consistent height */
.course-card-row--price {
  min-height: 52px;
  align-items: flex-start;
  flex-wrap: nowrap;
}
.course-card-row--price .card-stat {
  flex-shrink: 1;
  min-width: 0;
}
.course-card-row--price .card-price-block {
  flex-shrink: 0;
}

/* Blue bg on views allowed / valid days row */
.course-card-row--views {
  background: #F3F9FF;
  padding: 6px 8px;
  border-radius: 6px;
  color: #003963;
  justify-content: space-between;
  flex-wrap: nowrap;
}
.course-card-row--views .stat-svg-icon {
  width: 17px;
  height: 17px;
}
.member-line .stat-svg-icon {
  width: 17px;
  height: 17px;
}

/* Card Buttons */
.course-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.btn-see-details {
  flex: 1;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-white);
  background: #F3AD1C;
  border: 2px solid #F3AD1C;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-see-details:hover {
  background: var(--clr-white);
  color: #F3AD1C;
  border-color: #F3AD1C;
}

.btn-see-details:active,
.btn-see-details:focus {
  background: #F3AD1C !important;
  color: #fff !important;
  border-color: #F3AD1C !important;
  outline: none !important;
}

.btn-add-cart {
  flex: 1;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-white);
  background: #2275EE;
  border: 2px solid #2275EE;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-add-cart:hover {
  background: var(--clr-white);
  color: #2275EE;
  border-color: #2275EE;
}

.btn-add-cart:active,
.btn-add-cart:focus {
  background: #2275EE !important;
  color: #fff !important;
  border-color: #2275EE !important;
  outline: none !important;
}

/* ============================================================
   HOMEPAGE
   ============================================================ */

/* --- Section 1: Hero --- */
.hp-hero {
  background: url('images/hero-banner.jpg') center top / cover no-repeat;
  padding: 220px 0 180px;
  text-align: center;
  color: #fff;
  position: relative;
}
.hp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 40, 80, 0.15);
}
.hp-hero__inner {
  position: relative;
  z-index: 1;
}
.hp-hero__title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 18px;
  line-height: 1.3;
  color: #fff;
}
.hp-hero__sub {
  font-size: 15px;
  opacity: 1;
  margin: 0 auto 32px;
  max-width: 600px;
  line-height: 1.65;
  color: #fff;
}
.hp-hero__btn {
  display: inline-block;
  background: #FF6D40;
  color: #fff;
  padding: 14px 34px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s, transform 0.25s;
}
.hp-hero__btn:hover {
  background: #e55a30;
  transform: translateY(-2px);
  color: #fff;
}

/* --- Section 2: Course Categories --- */
.hp-categories {
  background: #f4f6fa;
  padding: 70px 0;
  text-align: center;
}
.hp-section-title {
  font-size: 30px;
  font-weight: 700;
  color: #1F3A5D;
  margin: 0 0 12px;
}
.hp-section-sub {
  font-size: 15px;
  color: #64748A;
  margin: 0 auto 40px;
  max-width: 550px;
}

.hp-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}
.hp-cat-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 48px 36px;
  text-align: center;
  border: 1px solid #edf0f5;
}
.hp-cat-card--coming-soon {
  border-style: dashed;
  border-color: #c5cdd8;
}
.hp-cat-card__ribbon {
  position: absolute;
  top: 24px;
  right: -34px;
  background: #2B50AF;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 40px;
  transform: rotate(45deg);
  letter-spacing: 0.5px;
}
.hp-cat-card__icon {
  margin-bottom: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1F3A5D;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}
.hp-cat-card__icon img {
  width: 34px;
  height: 34px;
}
.hp-cat-card__title {
  font-size: 20px;
  font-weight: 700;
  color: #1F3A5D;
  margin: 0 0 12px;
}
.hp-cat-card__desc {
  font-size: 14px;
  color: #64748A;
  line-height: 1.65;
  margin: 0 0 24px;
}
.hp-cat-card__btn {
  display: inline-block;
  background: #fff;
  color: #1a1b5e;
  padding: 12px 28px;
  border-radius: 6px;
  border: 2px solid #1a1b5e;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.hp-cat-card__btn:hover {
  background: #1a1b5e;
  color: #fff;
  border-color: #1a1b5e;
}

/* --- Section 3 & 5: Image Carousel --- */
.hp-carousel {
  position: relative;
  overflow: hidden;
}
.hp-carousel__track {
  display: flex;
  transition: transform 0.6s ease;
}
.hp-carousel__slide {
  min-width: 100%;
  position: relative;
  display: flex;
  height: auto;
}
.hp-carousel__img {
  width: 50%;
  background-size: cover;
  background-position: center;
  background-color: #2a5a9a;
}
.hp-carousel__overlay {
  width: 50%;
  background: #2e4ba0;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 48px;
}
.hp-carousel__label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  opacity: 0.85;
}
.hp-carousel__heading {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 14px;
  color: #fff;
}
.hp-carousel__text {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.85;
  margin: 0;
  color: #fff;
}

/* Banner image slides (admin-managed) */
.hp-carousel__banner-link {
  display: block;
  width: 100%;
  height: 100%;
}
.hp-carousel__banner-img {
  width: 100%;
  height: auto;
  display: block;
}
.hp-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  z-index: 2;
}
.hp-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50% !important;
  border: none !important;
  background: rgba(0,0,0,0.2) !important;
  cursor: pointer;
  padding: 0 !important;
  transition: background 0.25s;
  box-shadow: none !important;
}
.hp-carousel__dot:hover {
  background: rgba(0,0,0,0.4) !important;
  border: none !important;
}
.hp-carousel__dot.active,
.hp-carousel__dot.active:hover {
  background: #1a1054 !important;
  border: none !important;
}

/* --- Section 4: About HKSOA --- */
.hp-about {
  padding: 70px 0;
  background: #fff;
}
.hp-about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}
.hp-about__right {
  display: flex;
  height: 100%;
}
.hp-about__title {
  font-size: 28px;
  font-weight: 700;
  color: #1F3A5D;
  margin: 0 0 20px;
}
.hp-about__text {
  font-size: 14px;
  color: #64748A;
  line-height: 1.7;
  margin: 0 0 16px;
}
.hp-about__list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}
.hp-about__list li {
  font-size: 14px;
  color: #64748A;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hp-about__check {
  color: #2a9d5a;
  font-weight: 700;
  font-size: 15px;
}
.hp-about__placeholder {
  background: #f0f3f8;
  border-radius: 12px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a9bb5;
  font-size: 15px;
}
.hp-about__img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* --- Section 6: Featured Courses --- */
.hp-featured {
  background: #f4f6fa;
  padding: 70px 0;
  text-align: center;
}
.hp-featured__grid {
  display: flex;
  gap: 24px;
  text-align: left;
  max-width: 1060px;
  margin: 0 auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.hp-featured__grid::-webkit-scrollbar {
  height: 6px;
}
.hp-featured__grid::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}
.hp-featured__grid::-webkit-scrollbar-thumb {
  background: #c0c8d4;
  border-radius: 3px;
}
.hp-featured__grid::-webkit-scrollbar-thumb:hover {
  background: #a0aab4;
}
.hp-featured__card {
  min-width: calc(33.333% - 16px);
  max-width: calc(33.333% - 16px);
  flex-shrink: 0;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  border: 1px solid #edf0f5;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hp-featured__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.hp-featured__card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #2a5a9a;
  position: relative;
}
.hp-featured__card-category {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #003963 0%, #0076A8 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 14px;
  text-align: left;
}
.hp-featured__card-body {
  padding: 18px 18px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hp-featured__card-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1a1b5e;
  margin: 0 0 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-featured__card-body .course-title-wrap {
  margin: 0 0 8px;
}
.hp-featured__card-body .course-title-wrap h3 {
  margin: 0;
}
.hp-featured__card-body p {
  font-size: 12px;
  color: #6b7a90;
  line-height: 1.6;
  margin: 0 0 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-featured__card-pricing {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
  border-top: 1px solid #edf0f5;
  padding-top: 14px;
  margin-top: auto;
}
.hp-featured__price-nm {
  color: #27ae60;
  font-weight: 700;
  font-size: 14px;
}
.hp-featured__price-nm small {
  font-weight: 400;
  font-size: 11px;
  color: #6b7a90;
}
.hp-featured__price-m {
  color: #333;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFF9ED;
  padding: 4px 10px;
  border-radius: 2px;
  white-space: nowrap;
}
.hp-featured__price-m img {
  vertical-align: middle;
}
.hp-featured__price-m small {
  font-weight: 400;
  font-size: 11px;
  color: #222;
}

/* --- Section 7: CTA / Contact --- */
.hp-cta {
  background: linear-gradient(90deg, #003963 0%, #0076A8 100%);
  padding: 64px 0;
  text-align: center;
  color: #fff;
}
.hp-cta__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
}
.hp-cta__sub {
  font-size: 15px;
  opacity: 0.8;
  margin: 0 0 40px;
  color: #fff;
}
.hp-cta__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
.hp-cta__card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 40px 28px;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hp-cta__card h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
}
.hp-cta__card p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  color: #fff;
}

/* --- Homepage Responsive --- */
@media (max-width: 768px) {
  .hp-hero {
    padding: 120px 0 50px;
  }
  .hp-hero__title {
    font-size: 24px;
  }
  .hp-hero__sub {
    font-size: 14px;
  }
  .hp-hero__sub br { display: none; }

  .hp-categories { padding: 50px 0; }
  .hp-cat-grid { grid-template-columns: 1fr; gap: 20px; }
  .hp-cat-card { padding: 36px 24px; }
  .hp-section-title { font-size: 24px; }

  .hp-carousel__slide {
    flex-direction: column;
    height: auto;
  }
  .hp-carousel__img {
    width: 100%;
    height: 200px;
  }
  .hp-carousel__overlay {
    width: 100%;
    padding: 28px 24px;
  }
  .hp-carousel__heading { font-size: 22px; }

  .hp-about__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hp-about__placeholder { height: 200px; }
  .hp-about__img { height: 200px; }

  .hp-featured__card {
    min-width: 85%;
    max-width: 85%;
  }

  .hp-cta { padding: 48px 0; }
  .hp-cta__title { font-size: 22px; }
  .hp-cta__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hp-featured__card {
    min-width: calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
  .hp-carousel__heading { font-size: 24px; }
}

/* ============================================================
   AUTH PAGES (Login / Register)
   ============================================================ */
.auth-page {
  font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
  background: #f4f6fa;
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 60px;
}

.auth-container {
  width: 100%;
  max-width: 480px;
  text-align: center;
}

.auth-container--wide {
  max-width: 900px;
}

/* Icon */
.auth-icon {
  margin-bottom: 16px;
}

/* Heading */
.auth-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--clr-text);
  margin: 0 0 24px;
}

/* Card */
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  text-align: left;
}

.auth-card--register {
  padding: 0;
  overflow: hidden;
}

/* Registration header bar */
.reg-header {
  background: linear-gradient(90deg, #2563EB, #3B82F6);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  padding: 12px 24px;
}

.auth-card--register form,
.auth-card--register .reg-success {
  padding: 24px 28px 28px;
}

/* Auth message */
.auth-message {
  font-size: 13px;
  padding: 0;
  margin-bottom: 12px;
  border-radius: 6px;
  text-align: center;
  min-height: 0;
  transition: all 0.2s;
}

.auth-message.error {
  background: #FEF2F2;
  color: #DC2626;
  padding: 10px 14px;
  border: 1px solid #FECACA;
}

.auth-message.success {
  background: #F0FDF4;
  color: #16A34A;
  padding: 10px 14px;
  border: 1px solid #BBF7D0;
}

/* Form fields */
.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 6px;
}

.auth-field label .req {
  color: #DC2626;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="tel"],
.auth-field input[type="date"],
.auth-field select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  color: var(--clr-text);
  background: #fff;
  box-sizing: border-box;
}

.auth-field input:focus,
.auth-field select:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.auth-field input::placeholder {
  color: #9CA3AF;
}

.auth-field select:disabled {
  background: #F3F4F6;
  color: #9CA3AF;
  cursor: not-allowed;
}

/* ---- Searchable Dropdown (Register Country/City) ---- */
.auth-searchable-dropdown {
  position: relative;
  width: 100%;
}
.auth-dd-selected {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #fff;
  color: var(--clr-text);
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-dd-selected::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-top-color: #6B7280;
}
.auth-searchable-dropdown.open .auth-dd-selected {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.auth-searchable-dropdown.open .auth-dd-selected::after {
  border-top-color: transparent;
  border-bottom-color: #6B7280;
  transform: translateY(-80%);
}
.auth-searchable-dropdown.disabled .auth-dd-selected {
  background: #F3F4F6;
  color: #9CA3AF;
  cursor: not-allowed;
}
.auth-dd-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.auth-searchable-dropdown.open .auth-dd-menu {
  display: block;
}
.auth-dd-search {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: none;
  border-bottom: 1px solid #E5E7EB;
  border-radius: 8px 8px 0 0;
  outline: none;
  box-sizing: border-box;
}
.auth-dd-list {
  max-height: 150px;
  overflow-y: auto;
}
.auth-dd-list .auth-dd-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--clr-text);
}
.auth-dd-list .auth-dd-item:hover {
  background: #F3F4F6;
}
.auth-dd-list .auth-dd-item.selected {
  background: #EBF5FF;
  color: #2275EE;
  font-weight: 600;
}
.auth-dd-list .auth-dd-empty {
  padding: 8px 12px;
  font-size: 13px;
  color: #9CA3AF;
  text-align: center;
}
/* Custom title input (shown when "Other" selected) */
.auth-title-custom {
  margin-top: 8px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  color: var(--clr-text);
  background: #fff;
}
.auth-title-custom:focus {
  border-color: #2275EE;
  box-shadow: 0 0 0 2px rgba(34,117,238,0.15);
}

/* Input with icon */
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap input {
  padding-left: 40px !important;
  padding-right: 40px !important;
}

.auth-input-wrap:not(:has(.auth-input-icon)) input {
  padding-left: 14px !important;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  pointer-events: none;
  z-index: 1;
}

.auth-eye-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 2px;
  display: flex;
  z-index: 1;
  outline: none !important;
  box-shadow: none !important;
}

.auth-eye-toggle:hover,
.auth-eye-toggle:focus,
.auth-eye-toggle:active {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Options row */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--clr-text);
  cursor: pointer;
}

.auth-checkbox input {
  margin: 0;
  accent-color: #3B82F6;
}

.auth-forgot-link {
  font-size: 13px;
  color: #3B82F6;
  text-decoration: none;
  font-weight: 500;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

/* Primary button */
.btn-auth-primary,
button.btn-auth-primary,
#btn-login-submit {
  display: block !important;
  width: 100% !important;
  padding: 13px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: #2275EE !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer;
  text-align: center !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background 0.2s;
}

.btn-auth-primary:hover,
button.btn-auth-primary:hover,
#btn-login-submit:hover {
  background: #005a9e !important;
}

.btn-auth-primary:disabled,
button.btn-auth-primary:disabled {
  background: #7ab8e0 !important;
  cursor: not-allowed;
}

/* Switch link */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--clr-text-mid);
  margin: 18px 0 0;
}

.auth-switch a {
  color: #3B82F6;
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ---- Register Page ---- */
.reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
}

/* Phone field */
.phone-wrap {
  display: flex;
  gap: 8px;
}

.phone-code-select {
  width: 120px !important;
  flex-shrink: 0;
  padding: 10px 6px !important;
  font-size: 13px !important;
}

.phone-wrap input {
  flex: 1;
}

/* Password strength indicator */
.pw-strength-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.pw-strength-bar {
  flex: 1;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s, background-color 0.3s;
}
.pw-strength-label {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pw-strength-wrap[data-level="weak"] .pw-strength-fill { width: 33%; background: #DC2626; }
.pw-strength-wrap[data-level="weak"] .pw-strength-label { color: #DC2626; }
.pw-strength-wrap[data-level="medium"] .pw-strength-fill { width: 66%; background: #F59E0B; }
.pw-strength-wrap[data-level="medium"] .pw-strength-label { color: #F59E0B; }
.pw-strength-wrap[data-level="strong"] .pw-strength-fill { width: 100%; background: #0D9824; }
.pw-strength-wrap[data-level="strong"] .pw-strength-label { color: #0D9824; }

/* Password requirements checklist */
.pw-requirements {
  display: none;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.pw-requirements li {
  font-size: 11px;
  color: #9ca3af;
  padding: 1px 0;
  padding-left: 18px;
  position: relative;
}
.pw-requirements li::before {
  content: '\2716';
  position: absolute;
  left: 0;
  color: #DC2626;
  font-size: 10px;
}
.pw-requirements li.met {
  color: #0D9824;
}
.pw-requirements li.met::before {
  content: '\2714';
  color: #0D9824;
}

/* Confirm password match indicator */
.pw-match-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.pw-match-bar {
  flex: 1;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}
.pw-match-fill {
  height: 100%;
  width: 100%;
  border-radius: 2px;
  transition: background-color 0.3s;
}
.pw-match-label {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pw-match-wrap[data-match="yes"] .pw-match-fill { background: #0D9824; }
.pw-match-wrap[data-match="yes"] .pw-match-label { color: #0D9824; }
.pw-match-wrap[data-match="no"] .pw-match-fill { background: #DC2626; }
.pw-match-wrap[data-match="no"] .pw-match-label { color: #DC2626; }

/* Upload field */
.upload-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.upload-custom {
  display: flex;
  align-items: center;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.upload-filename {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-btn,
button.upload-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 10px 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: #F3AD1C !important;
  border: none !important;
  border-radius: 0 10px 10px 0 !important;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none !important;
  transition: background 0.2s;
}

.upload-btn:hover,
button.upload-btn:hover {
  background: #e09a10 !important;
}

/* Radio group */
.reg-member-field {
  margin: 8px 0 20px;
  padding: 0 4px;
}

.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--clr-text);
  cursor: pointer;
}

.radio-label input {
  accent-color: #3B82F6;
}

/* Register actions */
.reg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 8px;
}

.btn-auth-cancel {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text);
  background: #fff;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s;
}

.btn-auth-cancel:hover {
  background: #F3F4F6;
}

.btn-auth-register,
button.btn-auth-register {
  width: auto !important;
  display: inline-block !important;
  padding: 10px 28px !important;
  font-size: 13px !important;
  background: #2275EE !important;
  border-radius: 10px !important;
}

.btn-auth-register:hover,
button.btn-auth-register:hover {
  background: #1b5fd4 !important;
}

/* ---- Registration Success ---- */
.reg-success {
  text-align: center;
  padding: 40px 28px !important;
}

.reg-success-icon {
  margin-bottom: 20px;
}

.reg-success-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--clr-text);
  margin: 0 0 10px;
}

.reg-success-text {
  font-size: 14px;
  color: var(--clr-text-mid);
  line-height: 1.6;
  margin: 0 0 24px;
}

.reg-success-email-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #F0F4FA;
  border-radius: 10px;
  padding: 16px;
  text-align: left;
  margin-bottom: 24px;
}

.reg-success-email-box strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.reg-success-email-box p {
  font-size: 13px;
  color: var(--clr-text-mid);
  margin: 0;
}

.reg-success-email-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.reg-success-btn {
  display: inline-block;
  width: auto;
  padding: 13px 0;
  border: 2px solid #2275EE !important;
}
a.reg-success-btn:hover,
button.reg-success-btn:hover,
.reg-success .reg-success-btn:hover {
  background: #fff !important;
  color: #2275EE !important;
  border: 2px solid #2275EE !important;
}

/* ---- Auth Responsive ---- */
@media (max-width: 600px) {
  .auth-card {
    padding: 24px 20px;
  }
  .reg-grid {
    grid-template-columns: 1fr;
  }
  .auth-container--wide {
    max-width: 100%;
  }
  .reg-actions {
    flex-direction: column;
  }
  .btn-auth-cancel {
    order: 2;
  }
  .btn-auth-register {
    width: 100%;
  }
}

/* ============================================================
   COURSE DETAIL PAGE
   ============================================================ */
.course-detail-page {
  font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
  color: var(--clr-text);
}

/* Back Link */
.back-link {
  display: inline-block;
  margin: 20px 0 12px;
  font-size: 14px;
  color: var(--clr-primary-lt);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--clr-primary);
}

/* Top Section */
.cd-top {
  padding: 0 0 32px;
}

.cd-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  background: #fff;
  border: 1.5px solid #d0d8e3;
  border-radius: 12px;
  overflow: hidden;
}

.cd-image-wrap {
  overflow: hidden;
  position: relative;
}

.cd-image-wrap img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.cd-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cd-overlay-title {
  color: #fff;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.cd-overlay-badge {
  display: block;
  background: linear-gradient(90deg, #003963 0%, #0076A8 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  margin: 0 -20px -16px;
}

/* Info Panel */
.cd-info {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cd-title {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  color: var(--clr-text);
  margin: 0 0 10px;
  line-height: 1.3;
}

.cd-desc {
  font-size: 13px;
  color: var(--clr-text-mid);
  line-height: 1.6;
  margin: 0 0 16px;
  max-height: calc(1.6em * 4);
  overflow-y: auto;
}

/* Stats Row with icons */
.cd-stats-row {
  display: flex;
  align-items: flex-start;
  gap: 45px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cd-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--clr-text);
}

.cd-stat-text {
  display: flex;
  flex-direction: column;
}

.cd-stat-label {
  font-weight: 400;
  color: var(--clr-text-mid);
  font-size: 11px;
  margin-top: 1px;
}

.cd-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.cd-stat-icon--star { background: #FFF8DA; }
.cd-stat-icon--views { background: #FFBFF0; }
.cd-stat-icon--enrolled { background: #BFE4FF; }
.cd-stat-icon--cpd { background: #FFFCDD; }

.cd-icon {
  width: 22px;
  height: 22px;
}

.cd-icon-sm {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

/* Meta Row */
.cd-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  background: #F3F9FF;
  padding: 8px 14px;
  border-radius: 8px;
  color: #003963;
}

.cd-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--clr-text-mid);
}

.cd-meta strong {
  color: var(--clr-text);
}

/* Price */
.cd-price-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.cd-price-nm {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cd-price-value {
  font-size: 22px;
  font-weight: 700;
  color: #27ae60;
}

.cd-price-label {
  font-size: 12px;
  color: #999;
}

.cd-price-m {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #222;
  font-weight: 600;
  background: #FFF9ED;
  padding: 4px 10px;
  border-radius: 2px;
}

.cd-member-label {
  font-size: 11px;
  color: #1E1E1E;
  font-weight: 600;
}

.cd-price-free {
  display: inline-block;
  background: #0D9824;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 24px;
  border-radius: 5px;
}

/* Buttons */
.cd-actions {
  display: flex;
  gap: 12px;
}

.btn-buy-now {
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #F3AD1C;
  border: 2px solid #F3AD1C;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-buy-now:hover {
  background: #fff;
  color: #F3AD1C;
}

.btn-buy-now:active,
.btn-buy-now:focus {
  background: #F3AD1C !important;
  color: #fff !important;
  border-color: #F3AD1C !important;
  outline: none !important;
}

.btn-add-cart-detail {
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #2275EE;
  border: 2px solid #2275EE;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-cart-detail:hover {
  background: #fff;
  color: #2275EE;
}

.btn-add-cart-detail:active,
.btn-add-cart-detail:focus {
  background: #2275EE !important;
  color: #fff !important;
  border-color: #2275EE !important;
  outline: none !important;
}

.btn-buy-login {
  flex: none;
  padding: 14px 60px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #F3AD1C;
  border: 2px solid #F3AD1C;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-buy-login:hover {
  background: #fff;
  color: #F3AD1C;
}

/* Bottom Section - 2 column */
.cd-bottom-section {
  padding: 32px 0 48px;
}

.cd-bottom-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 32px;
  align-items: start;
}

/* Left Column */
.cd-left-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cd-left-col h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1b5e;
  margin: 0 0 16px;
}

.cd-section-title-mt {
  margin-top: 32px !important;
}

/* Categories Card */
.cd-categories-card {
  border: 1.5px solid #d0d8e3;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 0;
}
.cd-categories-card h3 {
  margin: 0 0 16px 0;
}

/* Categories Tags */
.cd-cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cd-cat-tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #1a1b5e;
  background: #D7EEFF;
  border-radius: 6px;
  border: 1px solid #D7EEFF;
}
.cd-cat-na {
  font-size: 14px;
  color: var(--clr-text-mid);
}

/* Course Content + References Card */
.cd-content-card {
  border: 1.5px solid #d0d8e3;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}

.cd-content-card h3 {
  margin: 0 0 8px 0;
}

.cd-content-intro {
  font-size: 13px;
  color: var(--clr-text-mid);
  margin: 0 0 16px;
}

.cd-content-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cd-content-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--clr-text-mid);
  padding: 10px 0;
}

.cd-check-circle {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
}

.cd-check-circle svg {
  width: 20px;
  height: 20px;
}

/* Course References */
.cd-ref-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.cd-ref-list li {
  font-size: 14px;
  color: var(--clr-text-mid);
  padding: 6px 0;
  line-height: 1.5;
  position: relative;
  padding-left: 16px;
}

.cd-ref-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1a1b5e;
}

/* Course Illustration watermark — responsive to card height */
.cd-content-illustration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 160px;
  max-width: 30%;
  max-height: 60%;
  height: auto;
  opacity: 1;
  pointer-events: none;
  object-fit: contain;
}

/* N/A text for empty content/references */
.cd-na-text {
  color: #999;
  font-size: 14px;
  font-style: italic;
  margin: 8px 0 16px;
}

/* Right Column - Additional Info */
.cd-right-col {
  border: 1.5px solid #d0d8e3;
  border-radius: 12px;
  padding: 24px;
  position: sticky;
  top: 80px;
}

.cd-right-col h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1b5e;
  margin: 0 0 20px;
}

.cd-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 0;
}

.cd-info-row-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--clr-text);
  flex-shrink: 0;
}

.cd-info-row-value {
  font-size: 13px;
  color: var(--clr-text-mid);
  text-align: right;
  max-width: 55%;
}

.cd-info-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .cd-top-grid { grid-template-columns: 1fr; border-radius: 16px; }
  .cd-image-wrap img { aspect-ratio: 16 / 9; }
  .cd-info { padding: 20px 16px; }
  .cd-bottom-grid { grid-template-columns: 1fr; }
  .cd-right-col { position: static; }
}

/* Loading */
.cd-loading {
  text-align: center;
  padding: 60px 0;
  color: var(--clr-text-mid);
  font-size: 15px;
}

/* ============================================================
   HEADER CART ICON (injected via JS)
   ============================================================ */
.header-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  margin-right: 8px;
  padding: 4px;
  transition: opacity 0.2s;
}

.header-cart-link:hover {
  opacity: 1;
  color: #F3AD1C !important;
}

.header-cart-count {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #F59E0B;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* Logged-in button style tweak */
.logged-in-btn {
  color: #90EE90 !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

/* Header User Menu (logged in) */
.header-user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.header-user-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.header-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.header-user-name {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.header-user-arrow {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.header-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 1000;
  overflow: hidden;
}

.header-user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-dropdown-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.header-dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.header-dropdown-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1b5e;
}

.header-dropdown-divider {
  height: 1px;
  background: #e5e7eb;
}

.header-dropdown-item,
button.header-dropdown-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #333 !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  text-align: left !important;
  transition: background 0.15s;
  outline: none !important;
}

.header-dropdown-item:hover,
button.header-dropdown-item:hover {
  background: #f5f5f5 !important;
  color: #333 !important;
}

/* ============================================================
   CART PAGE
   ============================================================ */
.cart-page {
  font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
  color: var(--clr-text);
  padding-bottom: 60px;
}
.cart-page .container {
  max-width: 100%;
  padding: 0 60px;
}

/* Empty cart */
.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--clr-text-mid);
}

.cart-empty svg {
  margin-bottom: 16px;
}

.cart-empty p {
  font-size: 16px;
  margin: 0 0 20px;
}

.btn-browse-courses {
  display: inline-block;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  color: #fff !important;
  background: #2275EE !important;
  border: 1.5px solid #2275EE !important;
  border-radius: 10px;
  text-decoration: none !important;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-browse-courses:hover {
  background: #fff !important;
  color: #2275EE !important;
  border-color: #2275EE !important;
}

/* ---------- Cart Layout ---------- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

/* Section titles with amber top border */
.cart-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--clr-text);
  margin: 0;
  padding: 14px 20px;
}

/* ---------- Cart Table (left) ---------- */
.cart-table-wrap {
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  overflow: hidden;
}

.cart-table {
  padding: 0 20px 20px;
}

.cart-table-header {
  display: grid;
  grid-template-columns: 1fr 100px 100px;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(192, 192, 192, 0.15);
  border-radius: 10px;
  margin-bottom: 4px;
}

.cart-th {
  font-size: 11px;
  font-weight: 700;
  color: var(--clr-text-mid);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.cart-th-price,
.cart-th-subtotal {
  text-align: center;
}

/* Cart row */
.cart-row {
  display: grid;
  grid-template-columns: 28px 60px 1fr 100px 100px;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  transition: opacity 0.3s;
}

.cart-row-remove {
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.2s;
  border-radius: 50% !important;
  width: 28px;
  height: 28px;
}

.cart-row-remove:hover,
.cart-row-remove:active,
.cart-row-remove:focus {
  opacity: 1;
  background: #2275EE !important;
  border-color: #2275EE !important;
}

.cart-row-remove:hover svg circle,
.cart-row-remove:hover svg line,
.cart-row-remove:active svg circle,
.cart-row-remove:active svg line,
.cart-row-remove:focus svg circle,
.cart-row-remove:focus svg line {
  stroke: #fff !important;
}

.cart-row-image {
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.cart-row-image img,
.cart-row-image .course-card-img-placeholder {
  border-radius: 6px;
}

.cart-row-image img {
  width: 60px;
  height: 42px;
  object-fit: cover;
  display: block;
}
.cart-row-image .course-card-img-placeholder {
  width: 60px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 1px;
}

.cart-row-info {
  min-width: 0;
}

.cart-row-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text);
  line-height: 1.3;
  margin-bottom: 2px;
}

.cart-row-category {
  font-size: 11px;
  color: var(--clr-text-mid);
}

.cart-row-price {
  font-size: 13px;
  color: var(--clr-text-mid);
  text-align: center;
}

.cart-row-subtotal {
  font-size: 13px;
  text-align: center;
  color: var(--clr-text);
}

/* ---------- Order Summary (right) ---------- */
.cart-summary-wrap {
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  overflow: hidden;
  position: sticky;
  top: 70px;
}

.cart-summary-body {
  padding: 16px 20px 24px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--clr-text);
  margin-bottom: 10px;
}

.cart-summary-divider {
  height: 1px;
  background: var(--clr-border);
  margin: 10px 0;
}

.cart-summary-total {
  font-size: 16px;
  font-weight: 400;
}

/* Coupon */
.cart-coupon {
  margin-top: 20px;
}

.cart-coupon-label {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--clr-text);
  margin-bottom: 8px;
}

.cart-coupon-row {
  display: flex;
  gap: 8px;
}

.cart-coupon-row input,
.cart-coupon-row input[type="text"] {
  flex: 1;
  padding: 9px 12px !important;
  font-size: 13px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 10px !important;
  outline: none;
  transition: border-color 0.2s;
}

.cart-coupon-row input:focus {
  border-color: #3B82F6;
}

.btn-apply-coupon,
button.btn-apply-coupon,
#btn-apply-coupon {
  padding: 9px 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: #2275EE !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-apply-coupon:hover,
button.btn-apply-coupon:hover,
#btn-apply-coupon:hover {
  background: #005a9e !important;
}

.cart-coupon-msg {
  font-size: 12px;
  margin-top: 6px;
  min-height: 0;
}

.cart-coupon-msg.success {
  color: #16A34A;
}

.cart-coupon-msg.error {
  color: #DC2626;
}

/* Applied coupon badge */
.cart-coupon-applied {
  margin-top: 8px;
}
.coupon-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
}
.coupon-badge-code {
  font-weight: 600;
  color: #16A34A;
  letter-spacing: 0.5px;
}
.coupon-badge-remove {
  background: none !important;
  border: none !important;
  color: #DC2626 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  padding: 0 2px !important;
  font-weight: 700 !important;
}
.coupon-badge-remove:hover {
  color: #991B1B !important;
}

/* Checkout button */
.btn-checkout {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #F3AD1C;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-checkout:hover {
  background: #e09a10;
}

.btn-checkout:disabled {
  background: #f5c96a;
  cursor: not-allowed;
}

/* Cart notice */
.cart-notice {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
}

.cart-notice--warn {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

/* Added to cart confirmation style */
.btn-added {
  background: #27ae60 !important;
  border-color: #27ae60 !important;
  color: #fff !important;
}

/* ---------- Related Courses ---------- */
.cart-related {
  grid-column: 1 / -1;
  margin-top: 40px;
}

.cart-related-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--clr-text);
  text-align: center;
  margin: 0 0 24px;
}

.cart-related-line {
  flex: 1;
  height: 2px;
  background: #d0d8e3;
}

.cart-related-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.cart-related-grid .course-card {
  min-width: calc(27% - 15px);
  max-width: calc(27% - 15px);
  flex-shrink: 0;
  scroll-snap-align: start;
}
.cart-related-grid::-webkit-scrollbar {
  height: 6px;
}
.cart-related-grid::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}
.cart-related-grid::-webkit-scrollbar-thumb {
  background: #c0c8d4;
  border-radius: 3px;
}
.cart-related-grid::-webkit-scrollbar-thumb:hover {
  background: #a0aab4;
}

/* ---------- Cart Responsive ---------- */
@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .cart-summary-wrap {
    position: static;
  }
  .cart-related-grid .course-card {
    min-width: calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

@media (max-width: 600px) {
  .cart-row {
    grid-template-columns: 24px 50px 1fr;
    gap: 8px;
  }
  .cart-row-price {
    grid-column: 3;
    font-size: 12px;
  }
  .cart-row-subtotal {
    display: none;
  }
  .cart-table-header {
    display: none;
  }
  .cart-related-grid .course-card {
    min-width: 85%;
    max-width: 85%;
  }
}

/* ============================================================
   SCROLL CONTAINER & ARROWS (shared by related courses + featured)
   ============================================================ */
.scroll-container {
  position: relative;
}
.scroll-arrow,
button.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #003963 !important;
  color: #fff !important;
  font-size: 0 !important;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10) !important;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s;
  padding: 0 !important;
}
.scroll-arrow svg {
  display: block;
}
.scroll-arrow:hover {
  background: #002a4a !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.20) !important;
}
.scroll-arrow--left {
  left: -18px;
}
.scroll-arrow--right {
  right: -18px;
}
.scroll-arrow.visible {
  display: flex;
}

@media (max-width: 768px) {
  .scroll-arrow {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
  .scroll-arrow--left { left: -6px; }
  .scroll-arrow--right { right: -6px; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .courses-grid { grid-template-columns: repeat(3, 1fr); }

  /* Reduce nav font sizes for tablet */
  .nav-menu > li > a { font-size: 13px; }
  .btn-visit-hksoa { font-size: 12px; }
  .btn-visit-lms { font-size: 12px; }
  .btn-login-register { font-size: 12px !important; }
}

@media (max-width: 768px) {
  /* Course detail mobile — handled in course detail CSS block above */

  /* Hide nav group, show hamburger */
  .header-nav-group {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #243692;
    flex-direction: column;
    align-items: stretch;
    padding: 70px 0 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    z-index: 999;
    max-height: 100vh;
    overflow-y: auto;
  }

  .hksoa-header .mobile-toggle {
    display: flex;
  }

  /* Keep the hamburger / close X on top of the open panel */
  .hksoa-header.nav-open .mobile-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1001;
  }

  /* When nav-open, show all 6 items vertically */
  .hksoa-header.nav-open .header-nav-group {
    display: flex;
  }

  .hksoa-header.nav-open .main-nav {
    display: block;
  }

  .hksoa-header.nav-open .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .hksoa-header.nav-open .nav-menu > li > a {
    padding: 12px 24px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .hksoa-header.nav-open .btn-visit-hksoa,
  .hksoa-header.nav-open .btn-visit-lms {
    display: block;
    text-align: center;
    margin: 8px 24px;
    padding: 10px 16px;
    font-size: 14px;
  }

  .hksoa-header.nav-open .btn-login-register {
    display: block;
    text-align: center;
    margin: 4px 24px 12px;
    padding: 10px 16px;
    font-size: 14px;
  }

  /* Mobile toggle X close — white color */
  .hksoa-header.nav-open .mobile-toggle span {
    background: #fff !important;
  }

  /* Cart + user area in mobile nav */
  .hksoa-header.nav-open .header-cart-link {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 12px 24px;
    color: #fff;
  }

  .hksoa-header.nav-open .header-cart-count {
    position: relative;
    top: auto;
    right: auto;
    margin-left: 8px;
  }

  .hksoa-header.nav-open .header-user-menu {
    padding: 12px 24px;
  }

  /* Filter bar tablet */
  .filter-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .filter-right {
    margin-left: 0;
  }

  /* Footer mobile */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* Courses mobile */
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .courses-grid { grid-template-columns: 1fr; }
  .courses-hero { padding: 28px 0; }
  .courses-hero h1 { font-size: 20px; }
  .courses-hero p { font-size: 13px; padding: 0; word-wrap: break-word; }

  /* Filter bar mobile */
  .filter-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .filter-left {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .filter-right {
    margin-left: 0;
    width: auto;
  }
  .cat-dropdown {
    min-width: 160px;
  }
  .cat-dropdown__menu {
    min-width: 200px;
  }

  /* Course card mobile */
  .course-card-actions {
    flex-direction: row;
    gap: 8px;
  }
  .course-card-actions .btn-see-details,
  .course-card-actions .btn-add-cart {
    flex: 1;
    font-size: 12px;
    padding: 8px 10px;
  }
  .hksoa-header .header-inner {
    padding: 0 12px;
    height: 64px;
  }
  body.home .hksoa-header .header-inner,
  body.home .hksoa-header.header-scrolled .header-inner {
    height: 64px;
  }

  .brand-name { font-size: 13px; }
  .brand-sub { font-size: 8px; }
  .brand-circle { width: 30px; height: 30px; font-size: 7px; }
  .brand-logo,
  body.home .hksoa-header .brand-logo,
  body.home .hksoa-header.header-scrolled .brand-logo {
    height: 46px !important;
    width: 46px !important;
    padding: 3px;
  }

  .auth-modal {
    padding: 28px 20px;
    margin: 12px;
  }
}

/* ========================================
   Loading Spinner
   ======================================== */
.hksoa-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e7ef;
  border-top-color: #003963;
  border-radius: 50%;
  animation: hksoa-spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes hksoa-spin {
  to { transform: rotate(360deg); }
}
.cart-related-loading {
  width: 100%;
  text-align: center;
  padding: 40px 0;
}
.cart-related-loading p {
  color: #64748A;
  margin-top: 12px;
  font-size: 14px;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-page {
  background: #f4f6fa;
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 60px;
}

.profile-container {
  width: 100%;
  max-width: 1100px;
}

.profile-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* Profile Header Row — avatar + name + edit btn */
.profile-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
  border-bottom: 1px solid #F0F0F0;
}

.profile-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-wrap {
  flex-shrink: 0;
  position: relative;
}

.profile-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #E5E7EB;
}

.profile-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-user-name {
  font-size: 17px;
  font-weight: 700;
  color: #1F3A5D;
}

.profile-user-email {
  font-size: 13px;
  color: #9CA3AF;
}

.btn-avatar-edit {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2275EE !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden;
}

.btn-avatar-edit:hover {
  background: #1b5fd4 !important;
}

.btn-avatar-edit svg {
  display: block;
  width: 11px !important;
  height: 11px !important;
  flex-shrink: 0;
  margin: 0 auto;
}

.upload-hidden {
  display: none;
}

/* Profile Sections */
.profile-section {
  padding: 24px 32px;
  border-bottom: 1px solid #F0F0F0;
}

.profile-section:last-child {
  border-bottom: none;
}

.profile-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1F3A5D;
  margin: 0 0 20px;
}

/* Profile 2-col Grid */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px 28px;
}

/* Underline-style Fields */
.profile-field {
  display: flex;
  flex-direction: column;
}

.profile-field label {
  font-size: 12px;
  font-weight: 600;
  color: #9CA3AF;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.profile-field label .req {
  color: #DC2626;
}

.profile-field input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: #9CA3AF;
  background: #F3F4F6;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.profile-field input:read-only {
  background: #F3F4F6;
  color: #9CA3AF;
  border-color: transparent;
  cursor: default;
}

.profile-field input:not(:read-only) {
  color: #4B5563;
}

.profile-field input:not(:read-only):focus {
  border-color: #2275EE;
  box-shadow: 0 0 0 3px rgba(34,117,238,0.1);
}

.profile-field input::placeholder {
  color: #CBD5E1;
}

/* Profile Actions */
.profile-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.btn-profile-cancel {
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #64748A;
  background: transparent;
  border: 1.5px solid #D1D5DB;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-profile-cancel:hover {
  background: #F9FAFB;
  color: #1F3A5D;
  text-decoration: none;
}

.btn-profile-save {
  padding: 9px 24px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: #2275EE !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-profile-save:hover {
  background: #1b5fd4 !important;
}

.btn-profile-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .profile-header-row {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 24px 20px;
  }

  .profile-header-left {
    flex-direction: column;
    align-items: center;
  }

  .profile-header-info {
    align-items: center;
  }

  .profile-section {
    padding: 20px;
  }

  .profile-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .profile-grid {
    grid-template-columns: 1fr !important;
  }

  .profile-actions {
    flex-direction: column-reverse;
  }

  .btn-profile-cancel,
  .btn-profile-save {
    width: 100%;
    text-align: center;
  }
}

/* ========================================
   Global Elementor Button Override
   Prevent Elementor default red/pink from
   leaking into custom theme buttons
======================================== */
body .pagination-btn,
body .hksoa-toast__close,
body .btn-see-details,
body .btn-add-cart,
body .btn-buy-now,
body .btn-add-cart-detail,
body .btn-buy-login,
body .btn-checkout,
body .btn-apply-coupon,
body .btn-auth-submit,
body .btn-auth-primary,
body .hp-hero__btn,
body .hp-cat-card__btn,
body .btn-login-register,
body .btn-visit-hksoa,
body .btn-visit-lms,
body .btn-avatar-edit,
body .btn-profile-save,
body .scroll-arrow,
body .mobile-toggle {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}
body button:not(.elementor-button),
body .hp button,
body .courses-page button,
body .cd-page button,
body .cart-page button,
body .profile-page button,
body .hksoa-toast button {
  border-color: inherit;
}

/* ---- Purchased Button (green) ---- */
.btn-purchased {
  flex: 1;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff !important;
  background: #0D9824 !important;
  border: 2px solid #0D9824 !important;
  border-radius: 10px !important;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.btn-purchased:hover {
  background: #fff !important;
  color: #0D9824 !important;
  border-color: #0D9824 !important;
}
.btn-purchased:active,
.btn-purchased:focus {
  background: #0D9824 !important;
  color: #fff !important;
  border-color: #0D9824 !important;
  outline: none !important;
}
/* Course detail page purchased button */
.cd-actions .btn-purchased {
  flex: unset;
  padding: 12px 32px;
  font-size: 15px;
  min-width: 160px;
}

/* ==========================================================
   PAYMENT HISTORY PAGE
   ========================================================== */
.payment-history-page {
  background: #f4f6fa;
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 60px;
}

.ph-container {
  width: 100%;
  max-width: 1100px;
}

.ph-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  overflow: hidden;
}

.ph-header {
  padding: 30px 36px 0;
}

.ph-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #1F3A5D;
  font-family: 'Plus Jakarta Sans', Inter, Arial, sans-serif;
}

.ph-subtitle {
  margin: 0;
  font-size: 14px;
  color: #64748a;
}

/* Empty state */
.ph-empty {
  text-align: center;
  padding: 60px 20px;
}

.ph-empty p {
  margin: 16px 0 20px;
  font-size: 15px;
  color: #9ca3af;
}

.ph-btn-browse {
  display: inline-block;
  padding: 10px 28px;
  background: #2275EE;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s;
}

.ph-btn-browse:hover {
  background: #1a5fcb;
  color: #fff;
}

/* Table */
.ph-table-wrap {
  padding: 24px 36px 36px;
  overflow-x: auto;
}

.ph-table {
  width: 100%;
  border-collapse: collapse;
}

.ph-table thead th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #64748a;
  text-transform: uppercase;
  text-align: left;
  background: #f8f9fb;
  border-bottom: 1px solid #e5e7eb;
}

.ph-table thead th:first-child {
  border-radius: 8px 0 0 0;
}

.ph-table thead th:last-child {
  border-radius: 0 8px 0 0;
}

.ph-table tbody td {
  padding: 16px 16px;
  font-size: 14px;
  color: #1e1e1e;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.ph-table tbody tr:last-child td {
  border-bottom: none;
}

.ph-order-id {
  font-weight: 600;
  color: #1F3A5D;
  white-space: nowrap;
}

.ph-date {
  white-space: nowrap;
  color: #64748a;
  font-size: 13px;
}

.ph-courses {
  max-width: 340px;
}

.ph-course-name {
  display: inline-block;
  font-size: 13px;
  color: #1e1e1e;
  line-height: 1.5;
}

.ph-total {
  font-weight: 600;
  white-space: nowrap;
}

.ph-free-badge {
  display: inline-block;
  padding: 2px 10px;
  background: #E8F9EE;
  color: #0D9824;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
}

.ph-status-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
}

/* Mobile cards — hidden on desktop */
.ph-mobile-cards {
  display: none;
  padding: 16px 20px 24px;
}

.ph-mobile-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.ph-mobile-card:last-child {
  margin-bottom: 0;
}

.ph-mobile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.ph-mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 0;
}

.ph-mobile-label {
  font-size: 12px;
  color: #9ca3af;
  text-transform: uppercase;
  font-weight: 600;
  flex-shrink: 0;
  margin-right: 12px;
}

.ph-mobile-value {
  font-size: 13px;
  color: #1e1e1e;
  text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
  .ph-table-wrap {
    display: none;
  }
  .ph-mobile-cards {
    display: block;
  }
  .ph-header {
    padding: 24px 20px 0;
  }
  .ph-title {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .payment-history-page {
    padding: 20px 10px 40px;
  }
}
