/*
 * ================================================================
 * KOMPEA THEME  —  css/theme.css
 * ================================================================
 * Zero hardcoded values — every rule references a token.
 * ================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ================================================================
   RESET
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
}

img, video { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
a { color: var(--color-text-link); text-decoration: none; }
a:hover { color: var(--color-text-link-h); }

/* ================================================================
   TYPOGRAPHY
   ================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-snug);
  color: var(--color-text);
  margin-bottom: var(--sp-4);
}

h1 { font-size: var(--text-5xl); letter-spacing: var(--ls-tight); font-weight: var(--fw-extrabold); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); font-weight: var(--fw-semibold); }
h6 { font-size: var(--text-lg); font-weight: var(--fw-semibold); }

p {
  color: var(--color-text-2);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-4);
}
p:last-child { margin-bottom: 0; }

strong, b { font-weight: var(--fw-semibold); color: var(--color-text); }

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-bg-muted);
  color: var(--p-blue-600);
  padding: 0.15em 0.4em;
  border-radius: var(--r-sm);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--color-bg-dark);
  color: var(--p-blue-200);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  overflow-x: auto;
}

blockquote {
  border-left: 3px solid var(--color-brand);
  padding-left: var(--sp-5);
  color: var(--color-text-2);
  font-style: italic;
  margin-block: var(--sp-6);
}

hr { border: none; border-top: 1px solid var(--color-border); margin-block: var(--sp-8); }

/* Eyebrow / label utility */
.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-brand);
}

/* ================================================================
   LAYOUT
   ================================================================ */

.site { display: flex; flex-direction: column; min-height: 100vh; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

#page-content {
  flex: 1;
  padding-block: var(--sp-12);
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  align-items: start;
}

.content-layout.has-sidebar {
  grid-template-columns: 1fr var(--sidebar-w);
}

/* ================================================================
   HEADER — green Kompea brand bar
   ================================================================ */

#site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  transition: background var(--tx), box-shadow var(--tx);
}

#site-header.is-scrolled {
  background: var(--header-bg-scroll);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo img {
  height: var(--header-logo-h, 38px);
  width: auto;
  display: block;
  /* white logo on green bg — invert if logo is dark */
  filter: brightness(0) invert(1);
}

/* If the logo is already light/white, remove the filter via Customizer or override here */
.site-logo .custom-logo { filter: none; }

.site-logo-text {
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--ls-tight);
  color: var(--header-text-active);
}

.site-logo-text span { color: var(--p-lime-400); }

/* Nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding-inline: var(--sp-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--header-text);
  border-radius: var(--r-md);
  transition: color var(--tx), background var(--tx);
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-page-ancestor > a {
  color: var(--header-text-active);
  background: var(--header-active-bg);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--r-md);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--header-text-active);
  border-radius: var(--r-full);
  transition: transform var(--tx), opacity var(--tx);
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================================
   BUTTONS
   ================================================================ */

.btn,
.learndash_checkout_button,
.learndash-course-action-btn,
#btn-join,
.ld-course-status-action a,
.sfwd-section-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: var(--btn-h-md);
  padding-inline: var(--btn-px-md);
  font-family: var(--font-sans);
  font-size: var(--btn-sz);
  font-weight: var(--btn-fw);
  letter-spacing: var(--ls-wide);
  border-radius: var(--btn-r);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  -webkit-appearance: none;
  transition:
    background var(--tx),
    color var(--tx),
    border-color var(--tx),
    box-shadow var(--tx),
    transform var(--dur-fast) var(--ease-spring);
}

.btn-primary,
.learndash_checkout_button,
#btn-join,
.ld-course-status-action a {
  background: var(--color-brand) !important;
  color: var(--color-text-inverse) !important;
  border-color: var(--color-brand) !important;
}

.btn-primary:hover,
.learndash_checkout_button:hover,
#btn-join:hover,
.ld-course-status-action a:hover {
  background: var(--color-brand-h) !important;
  border-color: var(--color-brand-h) !important;
  box-shadow: var(--sh-brand);
  transform: translateY(-1px);
  color: var(--color-text-inverse) !important;
}

.btn-secondary {
  background: transparent;
  color: var(--color-brand) !important;
  border-color: var(--color-border-strong);
}

.btn-secondary:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-2) !important;
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--color-bg-muted);
  color: var(--color-text) !important;
}

.btn-sm { height: var(--btn-h-sm); padding-inline: var(--btn-px-sm); font-size: var(--text-xs); }
.btn-lg { height: var(--btn-h-lg); padding-inline: var(--btn-px-lg); font-size: var(--text-base); }

/* — Variants for the green header bar — */

/* White solid (stands out on green) */
.btn-white {
  background: var(--p-white);
  color: var(--p-green-700) !important;
  border-color: var(--p-white);
}
.btn-white:hover {
  background: var(--p-green-50);
  border-color: var(--p-green-50);
  transform: translateY(-1px);
}

/* White outline */
.btn-white-outline {
  background: transparent;
  color: var(--p-white) !important;
  border-color: rgba(255,255,255,0.5);
}
.btn-white-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--p-white);
}

/* Ghost white (no border, white text) */
.btn-ghost-white {
  background: transparent;
  color: var(--header-text) !important;
  border-color: transparent;
}
.btn-ghost-white:hover {
  background: var(--header-active-bg);
  color: var(--header-text-active) !important;
  border-color: transparent;
}

.btn:focus-visible, button:focus-visible, a:focus-visible {
  outline: none;
  box-shadow: var(--sh-focus);
}

.btn:active { transform: scale(0.98); }

/* ================================================================
   FORMS
   ================================================================ */

.form-field { margin-bottom: var(--sp-5); }

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin-bottom: var(--sp-2);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
  display: block;
  width: 100%;
  height: var(--input-h);
  padding-inline: var(--input-px);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--input-r);
  transition: border-color var(--tx), box-shadow var(--tx);
  -webkit-appearance: none;
}

textarea { height: auto; min-height: 120px; padding-block: var(--sp-3); resize: vertical; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: var(--sh-focus);
}

input::placeholder, textarea::placeholder { color: var(--color-text-muted); }
input:disabled, textarea:disabled { background: var(--color-bg-muted); color: var(--color-text-disabled); }

/* ================================================================
   CARDS
   ================================================================ */

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--card-r);
  padding: var(--card-p);
  box-shadow: var(--sh-sm);
}

/* ================================================================
   BADGES
   ================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding-inline: var(--sp-3);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  border-radius: var(--r-full);
  white-space: nowrap;
}

.badge-brand   { background: var(--color-brand-muted);  color: var(--p-blue-700); }
.badge-accent  { background: var(--p-cyan-100);          color: #0e7490; }
.badge-ok      { background: var(--color-ok-bg);         color: var(--p-green-600); }
.badge-warn    { background: var(--color-warn-bg);        color: var(--p-amber-600); }
.badge-err     { background: var(--color-err-bg);         color: var(--p-red-600); }
.badge-neutral { background: var(--color-bg-muted);       color: var(--color-text-2); }

/* ================================================================
   PROGRESS BAR
   ================================================================ */

.progress-bar {
  height: var(--prog-h);
  background: var(--color-bg-muted);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--p-green-600), var(--p-lime-500));
  border-radius: var(--r-full);
  transition: width 0.7s var(--ease-out);
}

/* ================================================================
   SIDEBAR
   ================================================================ */

.sidebar {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  position: sticky;
  top: calc(var(--header-h) + var(--sp-6));
}

.widget { margin-bottom: var(--sp-8); }
.widget:last-child { margin-bottom: 0; }

.widget-title {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--color-border);
}

/* ================================================================
   HERO / DARK SECTION
   ================================================================ */

.hero, .section-dark {
  background: var(--color-bg-dark);
  position: relative;
  overflow: hidden;
}

/* Grid overlay */
.hero::before, .section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,99,245,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,99,245,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Glow blob */
.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26,99,245,0.14) 0%, transparent 70%);
  pointer-events: none;
}

.hero { padding-block: var(--sp-24) var(--sp-20); }

.hero-inner {
  position: relative;
  z-index: var(--z-raised);
  max-width: 720px;
}

.hero-title {
  font-size: var(--text-6xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--ls-tight);
  color: var(--color-text-inverse);
  line-height: var(--lh-none);
  margin-bottom: var(--sp-6);
}

.hero-title .accent { color: var(--color-accent); }

.hero-desc {
  font-size: var(--text-xl);
  color: var(--p-gray-300);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-8);
  max-width: 560px;
}

.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); }

.section-dark h1, .section-dark h2,
.section-dark h3, .section-dark h4 { color: var(--color-text-inverse); }
.section-dark p { color: var(--p-gray-400); }

/* ================================================================
   COURSE GRID
   ================================================================ */

.course-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--sp-6);
}

/* ================================================================
   COURSE CARD
   ================================================================ */

.course-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--tx-slow), transform var(--tx-slow), border-color var(--tx-slow);
}

.course-card:hover {
  box-shadow: var(--sh-xl);
  transform: translateY(-4px);
  border-color: var(--p-blue-200);
}

.course-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--p-navy-800), var(--p-navy-600));
  flex-shrink: 0;
}

.course-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tx-slow);
}

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

.course-card__body {
  padding: var(--sp-5);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.course-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.course-card__meta-item {
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.course-card__meta-item + .course-card__meta-item::before {
  content: '·';
  margin-right: var(--sp-2);
  color: var(--color-border-strong);
}

.course-card__title {
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-normal);
  line-height: var(--lh-snug);
  color: var(--color-text);
  margin-bottom: 0;
}

.course-card__title a { color: inherit; transition: color var(--tx); }
.course-card__title a:hover { color: var(--color-brand); }

.course-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}

.course-card__progress-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
}

.course-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border-subtle);
}

/* ================================================================
   LEARNDASH — GLOBAL OVERRIDES
   LearnDash outputs a lot of its own markup; we style over it here.
   ================================================================ */

/* Remove default LD container max-widths */
#learndash_course_content,
.learndash-wrapper,
#ld-course-progress {
  max-width: 100%;
}

/* LD course intro */
.ld-course-intro-text { color: var(--color-text-2); }

/* LD status banner */
.ld-course-status {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  margin-bottom: var(--sp-6);
}

.ld-course-status-segment {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--color-text-2);
}

.ld-status-icon { width: 20px; height: 20px; }

/* LD progress bar — override their inline styles */
.learndash-course-progress-bar,
#learndash_course_progress {
  height: var(--prog-h) !important;
  background: var(--color-bg-muted) !important;
  border-radius: var(--r-full) !important;
  overflow: hidden;
  border: none !important;
}

.learndash-course-progress-bar .learndash-course-progress-filled,
#learndash_course_progress span {
  height: 100% !important;
  background: linear-gradient(90deg, var(--p-green-600), var(--p-lime-500)) !important;
  border-radius: var(--r-full) !important;
  display: block;
}

.learndash-course-progress-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  margin-top: var(--sp-2);
}

/* ================================================================
   LEARNDASH — COURSE LISTING (sfwd-course)
   ================================================================ */

/* LD uses .learndash-course-list ul li or .ld-item-list */
.ld-item-list-items { gap: var(--sp-5); }

.ld-item-list-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: box-shadow var(--tx-slow), transform var(--tx-slow);
}

.ld-item-list-item:hover {
  box-shadow: var(--sh-lg);
  transform: translateY(-3px);
}

.ld-item-list-item-preview {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
}

.ld-item-list-item-preview .ld-item-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.ld-item-list-item-preview .ld-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ld-item-list-item-preview .ld-item-details {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.ld-item-list-item-preview .ld-item-title {
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin: 0;
}

.ld-item-list-item-preview .ld-item-title a {
  color: inherit;
  transition: color var(--tx);
}

.ld-item-list-item-preview .ld-item-title a:hover { color: var(--color-brand); }

/* ================================================================
   LEARNDASH — TOPIC / LESSON LIST (course single page)
   ================================================================ */

/* Course section headers */
.learndash_topic_dots ul,
#learndash_course_content ul.ld-table-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  overflow: hidden;
}

/* Section */
.ld-table-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  background: var(--color-bg-subtle);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  user-select: none;
}

.ld-table-list-heading h6,
.ld-table-list-heading .ld-table-list-title {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin: 0;
}

/* Lesson row */
.ld-table-list-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background var(--tx);
}

.ld-table-list-item:last-child { border-bottom: none; }
.ld-table-list-item:hover { background: var(--color-brand-subtle); }

.ld-table-list-item .ld-item-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--color-bg-muted);
  flex-shrink: 0;
  font-size: var(--text-xs);
}

/* Status indicator icons */
.ld-table-list-item .ld-item-icon.ld-icon-complete {
  background: var(--color-ok-bg);
  color: var(--color-ld-complete);
}

.ld-table-list-item .ld-item-icon.ld-icon-locked {
  background: var(--color-bg-muted);
  color: var(--color-ld-locked);
}

.ld-table-list-item a {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  transition: color var(--tx);
}

.ld-table-list-item a:hover { color: var(--color-brand); }

.ld-table-list-item.ld-item-locked a {
  color: var(--color-text-muted);
  cursor: not-allowed;
  pointer-events: none;
}

/* ================================================================
   LEARNDASH — SINGLE LESSON / TOPIC
   ================================================================ */

.single-sfwd-lessons #page-content,
.single-sfwd-topic #page-content,
.single-sfwd-quiz #page-content {
  padding-block: 0;
}

/* Lesson navigation bar */
.ld-lesson-header,
#ld-nav-buttons {
  background: var(--color-bg-subtle);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--sp-3);
}

.ld-lesson-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

/* Lesson content area */
.learndash-wrapper .ld-content-body {
  padding-block: var(--sp-10);
  max-width: var(--content-w);
  margin-inline: auto;
}

/* Lesson nav prev/next */
.ld-nav-prev-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-6);
  border-top: 1px solid var(--color-border);
  margin-top: var(--sp-8);
}

/* Mark complete button */
.learndash-course-action-btn a,
#sfwd-mark-complete input[type="submit"],
.ld_course_action_button input[type="submit"] {
  background: var(--color-ok) !important;
  color: var(--color-text-inverse) !important;
  border: none !important;
  font-family: var(--font-sans) !important;
  font-size: var(--btn-sz) !important;
  font-weight: var(--btn-fw) !important;
  height: var(--btn-h-md) !important;
  padding-inline: var(--btn-px-md) !important;
  border-radius: var(--btn-r) !important;
  cursor: pointer !important;
  transition: background var(--tx), transform var(--dur-fast) var(--ease-spring) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.learndash-course-action-btn a:hover,
#sfwd-mark-complete input[type="submit"]:hover { background: var(--p-green-600) !important; transform: translateY(-1px); }

/* ================================================================
   LEARNDASH — QUIZ
   ================================================================ */

.learndash-quiz-content,
#learndash_quiz_content {
  max-width: var(--content-w);
  margin-inline: auto;
  padding-block: var(--sp-10);
}

/* Quiz question */
.wpProQuiz_content .wpProQuiz_questionList,
.ld-quiz-question {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  margin-bottom: var(--sp-5);
}

.wpProQuiz_question_text {
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: var(--sp-4);
}

/* Answer options */
.wpProQuiz_questionListItem label {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: border-color var(--tx), background var(--tx);
  font-weight: var(--fw-regular);
  margin-bottom: var(--sp-3);
}

.wpProQuiz_questionListItem label:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-subtle);
}

.wpProQuiz_questionListItem input[type="radio"],
.wpProQuiz_questionListItem input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Correct / incorrect feedback */
.wpProQuiz_correct label   { border-color: var(--color-ok)  !important; background: var(--color-ok-bg)  !important; }
.wpProQuiz_incorrect label { border-color: var(--color-err) !important; background: var(--color-err-bg) !important; }

/* Quiz result */
.wpProQuiz_results {
  text-align: center;
  padding: var(--sp-10);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--r-2xl);
}

.wpProQuiz_results .wpProQuiz_results_points {
  font-size: var(--text-5xl);
  font-weight: var(--fw-extrabold);
  color: var(--color-brand);
  display: block;
  margin-bottom: var(--sp-3);
}

/* ================================================================
   LEARNDASH — CERTIFICATES
   ================================================================ */

.ld-certificate-link a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ================================================================
   LEARNDASH — USER PROFILE / DASHBOARD WIDGETS
   ================================================================ */

.learndash-profile-shortcode .profile-heading {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--color-border);
}

.learndash-profile-shortcode .profile-info-main table td {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* ================================================================
   TABLES
   ================================================================ */

table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }

th {
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border);
}

td {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-text-2);
  vertical-align: middle;
}

tbody tr:hover td { background: var(--color-bg-subtle); }
tbody tr:last-child td { border-bottom: none; }

/* ================================================================
   ALERTS
   ================================================================ */

.alert {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  font-size: var(--text-sm);
  border: 1px solid transparent;
  margin-bottom: var(--sp-4);
}

.alert-info    { background: var(--p-blue-50);    color: #1e40af; border-color: var(--p-blue-200); }
.alert-ok      { background: var(--color-ok-bg);  color: #166534; border-color: #bbf7d0; }
.alert-warn    { background: var(--color-warn-bg); color: #92400e; border-color: #fde68a; }
.alert-err     { background: var(--color-err-bg);  color: #991b1b; border-color: #fecaca; }

/* ================================================================
   BREADCRUMBS
   ================================================================ */

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-6);
}

.breadcrumbs a { color: var(--color-text-muted); transition: color var(--tx); }
.breadcrumbs a:hover { color: var(--color-text); }
.breadcrumbs__sep { color: var(--color-border-strong); user-select: none; }

/* ================================================================
   PAGINATION
   ================================================================ */

.pagination, .ld-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-12);
}

.pagination a, .pagination span,
.ld-pagination a, .ld-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: var(--sp-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  border-radius: var(--r-md);
  border: 1px solid var(--color-border);
  color: var(--color-text-2);
  text-decoration: none;
  transition: all var(--tx);
}

.pagination a:hover, .ld-pagination a:hover {
  background: var(--color-bg-muted);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.pagination .current, .ld-pagination .current {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--color-text-inverse);
}

/* ================================================================
   FOOTER
   ================================================================ */

#site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  padding-top: var(--sp-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid var(--color-border-dark);
}

.footer-brand__logo { margin-bottom: var(--sp-4); }
.footer-brand__logo img { height: 32px; width: auto; }

.footer-brand__desc {
  font-size: var(--text-sm);
  color: var(--p-gray-500);
  line-height: var(--lh-relaxed);
  margin-bottom: 0;
  max-width: 280px;
}

.footer-col-title {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--p-gray-400);
  margin-bottom: var(--sp-4);
}

.footer-links { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-links a { font-size: var(--text-sm); color: var(--p-gray-500); transition: color var(--tx); }
.footer-links a:hover { color: var(--color-text-inverse); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--sp-5);
  font-size: var(--text-sm);
  color: var(--p-gray-600);
}

/* ================================================================
   UTILITIES
   ================================================================ */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.mt-auto { margin-top: auto; }
.text-muted { color: var(--color-text-muted); }
.text-brand { color: var(--color-brand); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }

/* Scroll reveal */
[data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
[data-animate].visible { opacity: 1; transform: translateY(0); }

[data-stagger] > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
[data-stagger].visible > *:nth-child(1) { transition-delay: 0ms; }
[data-stagger].visible > *:nth-child(2) { transition-delay: 70ms; }
[data-stagger].visible > *:nth-child(3) { transition-delay: 140ms; }
[data-stagger].visible > *:nth-child(4) { transition-delay: 210ms; }
[data-stagger].visible > *:nth-child(5) { transition-delay: 280ms; }
[data-stagger].visible > *:nth-child(6) { transition-delay: 350ms; }
[data-stagger].visible > * { opacity: 1; transform: translateY(0); }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1024px) {
  :root { --cols: 2; }
  .content-layout.has-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
}

@media (max-width: 768px) {
  :root { --cols: 1; --header-h: 58px; }
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  .hero-title { font-size: var(--text-4xl); }
  .hero-desc { font-size: var(--text-lg); }
  .primary-nav { display: none; }
  .nav-toggle  { display: flex; }
  .primary-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--p-green-700);
    border-bottom: 1px solid var(--p-green-800);
    padding: var(--sp-3) var(--sp-4);
    gap: var(--sp-1);
    z-index: var(--z-dropdown);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }
  .primary-nav.is-open a {
    height: 44px;
    padding-inline: var(--sp-4);
    width: 100%;
    color: var(--header-text-active);
  }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .footer-bottom { flex-direction: column; gap: var(--sp-3); text-align: center; }
  #page-content { padding-block: var(--sp-8); }
}

@media (max-width: 480px) {
  :root { --gutter: var(--sp-4); }
}


/* ================================================================
   KOMPEA NEW HEADER
   ================================================================ */

#site-header.kompea-header {
  position: sticky;
  top: 0;
  z-index: 999;
  height: 76px;
  background:
    radial-gradient(circle at 20% 0%, rgba(132, 204, 22, 0.28), transparent 32%),
    linear-gradient(135deg, #052e16 0%, #0a6b33 48%, #16a34a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 12px 32px rgba(5, 46, 22, 0.22);
}

.kompea-header__inner {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.kompea-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: #fff;
}

.kompea-logo img,
.kompea-logo .custom-logo {
  max-height: 42px;
  width: auto;
  filter: none;
}

.kompea-logo__mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #fff;
  color: #15803d;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.kompea-logo__text {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}

.kompea-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.kompea-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(255,255,255,0.86);
  font-size: 14px;
  font-weight: 700;
  transition: 180ms ease;
}

.kompea-nav a:hover,
.kompea-nav .current-menu-item > a {
  color: #fff;
  background: rgba(255,255,255,0.14);
}

.kompea-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.kompea-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: 180ms ease;
}

.kompea-btn--ghost {
  color: #fff !important;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
}

.kompea-btn--ghost:hover {
  background: rgba(255,255,255,0.18);
  color: #fff !important;
}

.kompea-btn--primary {
  color: #14532d !important;
  background: #fff;
  border: 1px solid #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

.kompea-btn--primary:hover {
  transform: translateY(-1px);
  color: #14532d !important;
  background: #ecfccb;
}

.kompea-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 6px 4px 4px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 14px;
  font-weight: 700;
}

.kompea-user img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.kompea-user__logout {
  color: #fff !important;
  opacity: 0.75;
  font-size: 12px;
  padding-right: 8px;
}

.kompea-user__logout:hover {
  opacity: 1;
}

@media (max-width: 900px) {
  #site-header.kompea-header,
  .kompea-header__inner {
    height: 68px;
  }

  .kompea-nav {
    display: none;
  }

  .kompea-nav.is-open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: #064e25;
    box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  }

  .kompea-nav.is-open a {
    width: 100%;
    min-height: 46px;
  }

  .kompea-actions {
    margin-left: auto;
  }

  .kompea-actions .kompea-btn--ghost {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 520px) {
  .kompea-logo__text {
    display: none;
  }

  .kompea-btn {
    height: 38px;
    padding: 0 13px;
    font-size: 13px;
  }

  .kompea-user span,
  .kompea-user__logout {
    display: none;
  }
}

#site-header.kompea-header {
  height: 72px;
  background: linear-gradient(135deg, #064e25, #15803d);
  border-bottom: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
}

.kompea-header__inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.kompea-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  flex-shrink: 0;
}

.kompea-logo img,
.kompea-logo .custom-logo {
  max-height: 42px;
  width: auto;
  filter: none !important;
}

.kompea-logo__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #15803d;
  font-weight: 900;
  font-size: 22px;
}

.kompea-logo__text {
  color: #fff;
  font-size: 21px;
  font-weight: 900;
}

.kompea-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-left: auto;
}

.kompea-nav a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(255,255,255,.86);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.kompea-nav a:hover,
.kompea-nav .current-menu-item > a {
  background: rgba(255,255,255,.14);
  color: #fff;
}

.kompea-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.kompea-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
}

.kompea-btn--ghost {
  color: #fff !important;
  background: rgba(255,255,255,.12);
}

.kompea-btn--primary {
  color: #14532d !important;
  background: #fff;
}

.kompea-user {
  position: relative;
}

.kompea-user__trigger {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 5px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.kompea-user__trigger img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.kompea-user__menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 210px;
  padding: 8px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
  z-index: 1000;
}

.kompea-user:hover .kompea-user__menu,
.kompea-user:focus-within .kompea-user__menu {
  display: block;
}

.kompea-user__menu[hidden] {
  display: none;
}

.kompea-user:hover .kompea-user__menu[hidden],
.kompea-user:focus-within .kompea-user__menu[hidden] {
  display: block;
}

.kompea-user__menu a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: #14532d;
  font-size: 14px;
  font-weight: 700;
}

.kompea-user__menu a:hover {
  background: #ecfdf5;
}

.kompea-user__menu a.is-danger {
  color: #dc2626;
}

@media (max-width: 980px) {
  .kompea-nav {
    display: none;
  }

  .kompea-nav.is-open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: #064e25;
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
  }

  .kompea-nav.is-open a {
    width: 100%;
    height: 46px;
  }

  .nav-toggle {
    display: flex;
  }
}

/* Final Kompea logo override */
.kompea-logo {
  display: inline-flex !important;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.kompea-logo__image-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  width: 46px;
  padding: 5px;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow:
    0 10px 26px rgba(0,0,0,.20),
    0 0 0 1px rgba(255,255,255,.35);
  overflow: hidden;
}

.kompea-logo__image {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain;
  border-radius: 11px;
  filter: none !important;
}

@media (max-width: 520px) {
  .kompea-logo__image-wrap {
    height: 42px;
    width: 42px;
    border-radius: 14px;
  }

  .kompea-logo__image {
    width: 31px !important;
    height: 31px !important;
  }
}
.kompea-internal-home {
  padding: 0 !important;
  background: #f8fafc;
}

.kompea-internal-hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 197, 94, .18), transparent 34%),
    linear-gradient(135deg, #f8fafc 0%, #ecfdf5 48%, #ffffff 100%);
}

.kompea-internal-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 56px;
  align-items: center;
}

.kompea-internal-eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 13px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.kompea-internal-hero h1 {
  max-width: 720px;
  margin-bottom: 22px;
  color: #052e16;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .95;
  letter-spacing: -0.06em;
}

.kompea-internal-hero p {
  max-width: 640px;
  margin-bottom: 30px;
  color: #475569;
  font-size: 19px;
}

.kompea-home-btn {
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 36px rgba(22, 163, 74, .28);
}

.kompea-home-btn:hover {
  background: #15803d;
}

.kompea-internal-note {
  margin-top: 18px;
  color: #64748b;
  font-size: 14px;
}

.kompea-internal-panel {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid #dcfce7;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .12);
}

.kompea-internal-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}

.kompea-internal-panel__header span {
  color: #64748b;
  font-weight: 700;
}

.kompea-internal-panel__header strong {
  padding: 7px 11px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 13px;
}

.kompea-internal-list {
  display: grid;
  gap: 14px;
}

.kompea-internal-list div {
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
}

.kompea-internal-list span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.kompea-internal-list strong {
  color: #0f172a;
  font-size: 17px;
}

@media (max-width: 900px) {
  .kompea-internal-hero {
    padding: 56px 0;
  }

  .kompea-internal-hero__grid {
    grid-template-columns: 1fr;
  }
}