/* ============================================================
   FLCEO Design System — main.css
   Bootstrap 5.3 customizations + component library
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) ---
   Colour values are aliased to --theme-* variables injected by
   theme-inject.php so the palette is database-driven.
   Fallback hex values match the purple-gradient default theme.       */
:root {
  --flceo-primary: var(--theme-primary-start, #667eea);
  --flceo-primary-light: var(--theme-primary-end, #764ba2);
  --flceo-primary-dark: color-mix(in srgb, var(--theme-primary-start, #667eea) 70%, #000);
  --flceo-accent: var(--theme-accent, #e67e22);
  --flceo-accent-light: color-mix(in srgb, var(--theme-accent, #e67e22) 80%, #fff);
  --flceo-accent-dark: color-mix(in srgb, var(--theme-accent, #e67e22) 80%, #000);
  --flceo-success: var(--theme-success, #27ae60);
  --flceo-danger: var(--theme-danger, #e74c3c);
  --flceo-warning: var(--theme-warning, #f1c40f);
  --flceo-info: var(--theme-info, #3498db);

  --flceo-bg: var(--theme-bg, #f8f9fa);
  --flceo-bg-white: var(--theme-surface, #ffffff);
  --flceo-bg-muted: #eef2f5;
  --flceo-text: var(--theme-text, #2c3e50);
  --flceo-text-muted: var(--theme-text-muted, #6c757d);
  --flceo-text-light: #95a5a6;
  --flceo-border: var(--theme-border, #dee2e6);
  --flceo-border-light: #e9ecef;

  --flceo-radius-sm: 0.375rem;
  --flceo-radius: 0.5rem;
  --flceo-radius-lg: 0.75rem;
  --flceo-radius-xl: 1rem;

  --flceo-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --flceo-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --flceo-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  --flceo-shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.15);

  --flceo-transition: 0.2s ease;
  --flceo-transition-slow: 0.3s ease;
}

/* --- Base / Global --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--theme-font-family, 'Inter'), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--flceo-text);
  background-color: var(--flceo-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--flceo-primary-dark);
}

a {
  color: var(--flceo-primary);
  text-decoration: none;
  transition: color var(--flceo-transition);
}

a:hover {
  color: var(--flceo-accent);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Utility Classes --- */
.text-primary-brand { color: var(--flceo-primary) !important; }
.text-accent { color: var(--flceo-accent) !important; }
.bg-primary-brand { background-color: var(--flceo-primary) !important; }
.bg-accent { background-color: var(--flceo-accent) !important; }
.bg-muted { background-color: var(--flceo-bg-muted) !important; }

.section-padding {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 4rem 0;
  }
}

/* --- Navbar --- */
.navbar-spacer { padding-top: 62px; }

.navbar-flceo {
  background: linear-gradient(135deg, var(--theme-nav-bg-start, var(--flceo-primary)) 0%, var(--theme-nav-bg-end, var(--flceo-primary-light)) 100%);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1030;
}

.navbar-flceo .navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--theme-nav-text, #fff) !important;
}

.navbar-flceo .navbar-brand:hover {
  color: var(--theme-nav-text, #fff) !important;
  opacity: 0.9;
}

.navbar-flceo .nav-link {
  color: var(--theme-nav-text, #fff) !important;
  opacity: 0.9;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  margin: 0 2px;
  transition: all 0.3s ease;
}

.navbar-flceo .nav-link:hover {
  color: var(--theme-nav-text, #fff) !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.navbar-flceo .nav-link.active {
  color: var(--theme-nav-text, #fff) !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.navbar-flceo .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar-flceo .navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

@media (max-width: 991.98px) {
  .navbar-flceo .navbar-nav {
    padding: 1rem 0;
  }
  .navbar-flceo .nav-link {
    margin: 0.2rem 0;
  }
  .navbar-flceo .navbar-collapse {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0 0 10px 10px;
    padding: 0 0.75rem;
    margin: 0 -0.75rem;
  }
}

/* --- Cards --- */
.card-flceo {
  background: var(--flceo-bg-white);
  border: 1px solid var(--flceo-border-light);
  border-radius: var(--flceo-radius-lg);
  box-shadow: var(--flceo-shadow-sm);
  transition: all var(--flceo-transition-slow);
  overflow: hidden;
}

.card-flceo:hover {
  box-shadow: var(--flceo-shadow-lg);
  transform: translateY(-2px);
}

.card-flceo .card-body {
  padding: 1.5rem;
}

.card-flceo .card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-flceo .card-subtitle {
  font-size: 0.8125rem;
  color: var(--flceo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.card-flceo .card-img-top {
  height: 180px;
  object-fit: cover;
}

/* --- Buttons --- */
.btn-flceo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--flceo-radius);
  border: 2px solid transparent;
  transition: all var(--flceo-transition);
  cursor: pointer;
}

.btn-primary-brand {
  background-color: var(--flceo-primary);
  color: #fff;
  border-color: var(--flceo-primary);
}

.btn-primary-brand:hover {
  background-color: var(--flceo-primary-dark);
  border-color: var(--flceo-primary-dark);
  color: #fff;
}

.btn-accent {
  background-color: var(--flceo-accent);
  color: #fff;
  border-color: var(--flceo-accent);
}

.btn-accent:hover {
  background-color: var(--flceo-accent-dark);
  border-color: var(--flceo-accent-dark);
  color: #fff;
}

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

.btn-outline-brand:hover {
  background-color: var(--flceo-primary);
  color: #fff;
}

.btn-lg {
  font-size: 1.0625rem;
  padding: 0.75rem 2rem;
}

/* --- State Selector --- */
.state-card {
  text-align: center;
  padding: 2rem 1.5rem;
  cursor: pointer;
  border: 2px solid var(--flceo-border-light);
  border-radius: var(--flceo-radius-xl);
  background: var(--flceo-bg-white);
  transition: all var(--flceo-transition-slow);
}

.state-card:hover {
  border-color: var(--flceo-primary);
  box-shadow: var(--flceo-shadow-lg);
  transform: translateY(-4px);
}

.state-card.active {
  border-color: var(--flceo-primary);
  background: linear-gradient(135deg, var(--flceo-primary), var(--flceo-primary-light));
  color: #fff;
}

.state-card.active h3,
.state-card.active p {
  color: #fff;
}

.state-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.state-card .state-abbr {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--flceo-primary);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.state-card.active .state-abbr {
  color: #fff;
}

/* --- State Card SVG Icon --- */
.state-card .state-icon {
  width: 150px;
  height: 150px;
  margin: 0 auto 0.75rem;
  color: var(--theme-primary-start, var(--flceo-primary));
  transition: color var(--flceo-transition-slow);
}

.state-card .state-icon .state-outline {
  width: 100%;
  height: 100%;
  display: block;
}

.state-card:hover .state-icon {
  color: var(--theme-primary-end, var(--flceo-primary-light));
}

.state-card.active .state-icon {
  color: #fff;
}

/* --- US Map Section --- */
.us-map-section {
  background: var(--flceo-bg-white);
}

.us-map-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
}

.us-map {
  max-width: 820px;
  margin: 0 auto;
}

.us-map svg {
  width: 100%;
  height: auto;
  display: block;
}

.us-map .state-path {
  fill: #7b92b8;
  stroke: #fff;
  stroke-width: 0.75;
  stroke-linejoin: round;
  transition: fill 0.25s ease;
}

.us-map .state-path:hover {
  fill: #96aac8;
  cursor: pointer;
}

.us-map .state-active {
  fill: var(--theme-accent, #e8636f);
  cursor: pointer;
}

.us-map .state-active:hover {
  fill: var(--theme-primary-start, var(--flceo-primary));
  filter: brightness(1.08);
}

.us-map .state-link {
  text-decoration: none;
}

.us-map .state-link:focus-visible .state-path,
.us-map .state-link:focus-visible .state-badge rect {
  outline: 2px solid var(--flceo-accent);
  outline-offset: 1px;
}

.us-map .state-label {
  fill: #fff;
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  font-family: inherit;
}

.us-map .leader-line {
  stroke: #a0b0c8;
  stroke-width: 1;
  stroke-dasharray: 3 2;
  opacity: 0.6;
}

.us-map .state-badge rect {
  fill: #7b92b8;
  transition: fill 0.25s ease;
}

.us-map .state-badge text {
  fill: #fff;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  font-family: inherit;
}

.us-map .state-badge-active rect {
  fill: var(--theme-accent, #e8636f);
}

.us-map .state-link:hover .state-badge rect {
  fill: var(--theme-primary-start, var(--flceo-primary));
  filter: brightness(1.08);
}

.us-map .state-path.state-hover {
  fill: #96aac8;
}

.us-map .state-active.state-hover {
  fill: var(--theme-primary-start, var(--flceo-primary));
  filter: brightness(1.08);
}

.us-map .state-badge.badge-hover rect {
  fill: #96aac8;
}

.us-map .state-badge-active.badge-hover rect {
  fill: var(--theme-primary-start, var(--flceo-primary));
  filter: brightness(1.08);
}

.us-map .state-badge {
  cursor: pointer;
}

/* --- Course Cards --- */
/* --- Course Category Sections --- */
.course-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--cat-color, var(--flceo-primary));
}

.course-category-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--flceo-text);
}

.course-category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--flceo-radius);
  background: var(--cat-color, var(--flceo-primary));
  color: #fff;
  flex-shrink: 0;
}

.course-category-count {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--flceo-text-muted);
  background: var(--flceo-bg-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 50rem;
}

/* --- Course Cards --- */
.course-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--flceo-bg-white);
  border: 1px solid var(--flceo-border-light);
  border-radius: var(--flceo-radius-lg);
  box-shadow: var(--flceo-shadow-sm);
  overflow: hidden;
  transition: all var(--flceo-transition-slow);
}

.course-card:hover {
  box-shadow: var(--flceo-shadow-lg);
  transform: translateY(-3px);
}

.course-card-accent {
  height: 20px;
  background: var(--card-accent, var(--flceo-primary));
  flex-shrink: 0;
}

.course-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  flex-shrink: 0;
}

.course-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--flceo-transition-slow);
}

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

.course-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.5rem 1.5rem;
}

.course-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.course-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.625rem;
  border-radius: 50rem;
}

.course-badge.badge-renewal {
  background-color: rgba(39, 174, 96, 0.12);
  color: var(--flceo-success);
}

.course-badge.badge-application {
  background-color: rgba(52, 152, 219, 0.12);
  color: var(--flceo-info);
}

.course-price-wrap {
  text-align: right;
}
.course-card .course-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--card-accent, var(--flceo-primary));
  line-height: 1;
  display: block;
}
.course-process-fee {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--flceo-text-muted, #6c757d);
  margin-top: 2px;
}

.course-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--flceo-text);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.course-card-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--flceo-text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.course-card-desc {
  font-size: 0.8125rem;
  color: var(--flceo-text-muted);
  line-height: 1.55;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 9;
  line-clamp: 9;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card .course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--flceo-border-light);
}

.course-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--flceo-text-muted);
}

.course-meta-item svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.course-card .course-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.course-card .course-actions .btn {
  flex: 1;
  justify-content: center;
  gap: 0.35rem;
}

.course-card .course-start-btn {
  flex: 1.5;
}

/* --- Quiz --- */
.quiz-progress {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--flceo-bg-white);
  padding: 1rem 0;
  border-bottom: 1px solid var(--flceo-border-light);
  box-shadow: var(--flceo-shadow-sm);
}

.quiz-progress .progress {
  height: 8px;
  border-radius: 50rem;
  background-color: var(--flceo-bg-muted);
}

.quiz-progress .progress-bar {
  background: linear-gradient(90deg, var(--flceo-primary), var(--flceo-primary-light));
  border-radius: 50rem;
  transition: width 0.4s ease;
}

.question-block {
  background: var(--flceo-bg-white);
  border: 1px solid var(--flceo-border-light);
  border-radius: var(--flceo-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color var(--flceo-transition);
}

.question-block.answered {
  border-color: var(--flceo-success);
}

.question-block .question-number {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--flceo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.question-block .question-text {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.answer-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.875rem 1.25rem;
  margin-bottom: 0.5rem;
  border: 2px solid var(--flceo-border);
  border-radius: var(--flceo-radius);
  background: var(--flceo-bg-white);
  cursor: pointer;
  transition: all var(--flceo-transition);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.answer-option:hover {
  border-color: var(--flceo-primary-light);
  background: var(--flceo-bg-muted);
}

.answer-option.selected {
  border-color: var(--flceo-primary);
  background: rgba(26, 82, 118, 0.06);
  font-weight: 600;
}

.answer-option.correct {
  border-color: var(--flceo-success);
  background: rgba(39, 174, 96, 0.08);
}

.answer-option.incorrect {
  border-color: var(--flceo-danger);
  background: rgba(231, 76, 60, 0.08);
}

/* --- Quiz Results --- */
.result-hero {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: var(--flceo-radius-xl);
  margin-bottom: 2rem;
}

.result-hero.passed {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.08), rgba(39, 174, 96, 0.15));
  border: 2px solid var(--flceo-success);
}

.result-hero.failed {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.08), rgba(231, 76, 60, 0.15));
  border: 2px solid var(--flceo-danger);
}

.result-hero .result-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.result-hero .result-score {
  font-size: 2.5rem;
  font-weight: 800;
}

/* --- License Entry --- */
.license-section {
  background: var(--flceo-bg-white);
  border: 1px solid var(--flceo-border-light);
  border-radius: var(--flceo-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.license-section .license-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.license-section .license-header h5 {
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 700;
}

.license-lookup-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.license-lookup-status.found {
  background: rgba(39, 174, 96, 0.1);
  color: var(--flceo-success);
}

.license-lookup-status.not-found {
  background: rgba(231, 76, 60, 0.1);
  color: var(--flceo-danger);
}

.license-lookup-status.mismatch {
  background: rgba(241, 196, 15, 0.15);
  color: #d4a106;
}

/* --- Checkout / Payment --- */
.payment-card {
  background: var(--flceo-bg-white);
  border: 1px solid var(--flceo-border-light);
  border-radius: var(--flceo-radius-xl);
  padding: 2rem;
  box-shadow: var(--flceo-shadow);
  max-width: 500px;
  margin: 0 auto;
}

.payment-card .clover-field {
  border: 2px solid var(--flceo-border);
  border-radius: var(--flceo-radius);
  padding: 0;
  height: 48px;
  overflow: hidden;
  transition: border-color var(--flceo-transition);
}

.payment-card .clover-field:focus-within {
  border-color: var(--flceo-primary);
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.15);
}

.payment-card .clover-field.has-error {
  border-color: var(--flceo-danger);
}

.payment-summary {
  background: var(--flceo-bg-muted);
  border-radius: var(--flceo-radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.payment-summary .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  font-size: 0.9375rem;
}

.payment-summary .summary-total {
  font-weight: 800;
  font-size: 1.125rem;
  border-top: 2px solid var(--flceo-border);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

/* --- Overlay / Loading --- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--flceo-transition-slow);
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-overlay .spinner-border {
  width: 3rem;
  height: 3rem;
  color: var(--flceo-primary);
}

/* --- Consent Banner --- */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: color-mix(in srgb, var(--theme-primary-start, #667eea) 70%, #000);
  color: rgba(255, 255, 255, 0.9);
  padding: 1rem 0;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform var(--flceo-transition-slow);
}

.consent-banner.show {
  transform: translateY(0);
}

.consent-banner .consent-text {
  font-size: 0.875rem;
  margin-bottom: 0;
}

.consent-banner .consent-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* --- Footer --- */
.footer-flceo {
  background: linear-gradient(135deg, var(--theme-footer-bg-start, #4a5cb8) 0%, var(--theme-footer-bg-end, #5a3880) 100%);
  color: color-mix(in srgb, var(--theme-footer-text, #ffffff) 70%, transparent);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-flceo a {
  color: color-mix(in srgb, var(--theme-footer-text, #ffffff) 70%, transparent);
  transition: color var(--flceo-transition);
}

.footer-flceo a:hover {
  color: var(--flceo-accent-light);
}

.footer-flceo h6 {
  color: var(--theme-footer-text, #ffffff);
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-flceo .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: 2rem;
  font-size: 0.8125rem;
}

/* --- Hero Section --- */
.hero-section {
  background: linear-gradient(135deg, var(--theme-primary-start, var(--flceo-primary)) 0%, var(--theme-primary-end, var(--flceo-primary-light)) 100%);
  color: var(--theme-header-text, #fff);
  padding: 2.5rem 0 2rem;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.hero-text {
  max-width: 560px;
}

.hero-icon {
  display: inline-block;
  width: 128px;
  height: 128px;
  max-width: 128px;
  max-height: 128px;
  flex-shrink: 0;
  color: var(--theme-header-text, #fff);
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.15));
}

.hero-section h1 {
  color: var(--theme-header-text, #fff);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.hero-section h1 span {
  display: block;
  font-weight: 400;
  opacity: .9;
  font-size: 0.85em;
}

.hero-section .lead {
  font-size: 1rem;
  opacity: 0.9;
}

.course-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.course-hero-text {
  flex: 1;
  min-width: 0;
}

.course-hero-state-icon {
  width: 240px;
  height: 240px;
  flex-shrink: 0;
  color: var(--theme-header-text, #fff);
  opacity: 0.85;
}

.course-hero-state-icon .state-outline {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
  margin: 0 auto 1.5rem;
  max-width: 480px;
  line-height: 1.6;
}

.hero-cta {
  margin-top: 0.25rem;
}

.hero-media {
  flex-shrink: 0;
}

.hero-image {
  display: block;
  max-width: 100%;
  width: 380px;
  height: auto;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.2));
}

@media (min-width: 768px) {
  .hero-section {
    padding: 3rem 0 2.5rem;
  }
  .hero-inner {
    flex-direction: row;
    text-align: left;
    gap: 2.5rem;
  }
  .hero-text {
    flex: 1;
    min-width: 0;
  }
  .hero-section h1 {
    font-size: 2.5rem;
  }
  .hero-section .lead {
    margin-left: 0;
    font-size: 1.1rem;
  }
  .hero-image {
    width: 440px;
  }
}

@media (min-width: 992px) {
  .hero-section h1 {
    font-size: 2.85rem;
  }
  .hero-icon {
    width: 144px;
    height: 144px;
    max-width: 144px;
    max-height: 144px;
  }
  .hero-image {
    width: 520px;
  }
}

@media (min-width: 1200px) {
  .hero-section {
    padding: 3.5rem 0 3rem;
  }
  .hero-section h1 {
    font-size: 3.25rem;
  }
  .hero-image {
    width: 580px;
  }
}

/* --- Badge / Status --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: 50rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.status-pending { background: rgba(241, 196, 15, 0.15); color: #b7950b; }
.status-badge.status-approved { background: rgba(39, 174, 96, 0.12); color: var(--flceo-success); }
.status-badge.status-flagged { background: rgba(230, 126, 34, 0.12); color: var(--flceo-accent); }
.status-badge.status-rejected { background: rgba(231, 76, 60, 0.12); color: var(--flceo-danger); }

/* --- Form Enhancements --- */
.form-control:focus,
.form-select:focus {
  border-color: var(--flceo-primary);
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.15);
}

.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
}

.field-error {
  font-size: 0.8125rem;
  color: var(--flceo-danger);
  margin-top: 0.25rem;
}

/* --- Completion / Certificate Page --- */
.completion-card {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--flceo-bg-white);
  border-radius: var(--flceo-radius-xl);
  box-shadow: var(--flceo-shadow-lg);
}

.completion-card .completion-icon {
  font-size: 4rem;
  color: var(--flceo-success);
  margin-bottom: 1rem;
}

.completion-details {
  text-align: left;
  background: var(--flceo-bg-muted);
  border-radius: var(--flceo-radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.completion-details .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--flceo-border-light);
}

.completion-details .detail-row:last-child {
  border-bottom: none;
}

.completion-details .detail-label {
  font-weight: 600;
  color: var(--flceo-text-muted);
  font-size: 0.875rem;
}

/* --- Responsive adjustments --- */
@media (max-width: 575.98px) {
  .payment-card {
    padding: 1.25rem;
  }

  .consent-banner .container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .state-card .state-abbr {
    font-size: 2rem;
  }

  .state-card .state-icon {
    width: 100px;
    height: 100px;
  }

  .course-hero-state-icon {
    width: 100px;
    height: 100px;
  }

  .hero-section h1 {
    font-size: 1.6rem;
  }
  .hero-icon {
    width: 104px;
    height: 104px;
    max-width: 104px;
    max-height: 104px;
  }
}

/* --- Page Builder: Page Container --- */
.pb-page {
    background: var(--flceo-bg);
    min-height: 60vh;
}

/* Content sections rendered as elevated surfaces over the theme background */
.pb-page .pb-richtext,
.pb-page .pb-cards,
.pb-page .pb-image-cards,
.pb-page .pb-pricing-cards,
.pb-page .pb-team-cards,
.pb-page .pb-features,
.pb-page .pb-faq,
.pb-page .pb-image-text,
.pb-page .pb-testimonials,
.pb-page .pb-stats,
.pb-page .pb-progress-bars,
.pb-page .pb-button-group,
.pb-page .pb-table,
.pb-page .pb-video,
.pb-page .pb-two-column,
.pb-page .pb-tabs,
.pb-page .pb-alert,
.pb-page .pb-embed {
    background: var(--flceo-bg-white);
}

/* Alternate subtle shading for visual rhythm */
.pb-page section:nth-child(even):not(.pb-hero-banner):not(.pb-jumbotron):not(.pb-cta) {
    background: var(--flceo-bg-muted);
}

/* Add breathing room between sections */
.pb-page > section + section,
.pb-page > div + section,
.pb-page > section + div {
    border-top: 1px solid var(--flceo-border-light, rgba(0,0,0,.06));
}

/* --- Page Builder Block Styles (public-facing) --- */
.pb-hero-banner {
    background: linear-gradient(135deg, var(--theme-primary-start, #667eea) 0%, var(--theme-primary-end, #764ba2) 100%);
    color: var(--theme-banner-text, #fff);
}
.pb-hero-banner h1, .pb-hero-banner h2, .pb-hero-banner h3,
.pb-hero-banner h4, .pb-hero-banner h5, .pb-hero-banner h6,
.pb-hero-banner p, .pb-hero-banner .lead {
    color: inherit;
}
.pb-card { transition: transform .2s; }
.pb-card:hover { transform: translateY(-4px); }
.pb-card-icon { font-size: 2rem; color: var(--theme-primary-start, #667eea); }
.pb-card-header {
    background: linear-gradient(135deg, var(--theme-card_header_bg_start, var(--theme-primary-start, #667eea)) 0%, var(--theme-card_header_bg_end, var(--theme-primary-end, #764ba2)) 100%);
    color: var(--theme-card_header_text, #fff);
    border: none;
    padding: 10px 16px;
    font-size: .95rem;
}
.pb-feature-icon { font-size: 2.5rem; color: var(--theme-accent, #e67e22); }
.pb-cta-gradient {
    background: linear-gradient(135deg, var(--theme-primary-start, #667eea) 0%, var(--theme-primary-end, #764ba2) 100%);
    color: var(--theme-cta-text, #fff);
}
.pb-cta-gradient h1, .pb-cta-gradient h2, .pb-cta-gradient h3,
.pb-cta-gradient h4, .pb-cta-gradient h5, .pb-cta-gradient h6,
.pb-cta-gradient p, .pb-cta-gradient .lead {
    color: inherit;
}
.pb-cta-light { background: var(--theme-bg, #f8f9fa); }
.pb-cta-btn {
    background: var(--theme-accent, #e67e22);
    color: var(--theme-btn-text, #fff);
    border: none; border-radius: 8px; padding: 10px 28px; font-weight: 600;
}
.pb-cta-btn:hover { opacity: .9; color: var(--theme-btn-text, #fff); }
.pb-page .btn-accent {
    background: var(--theme-accent, #e67e22);
    color: var(--theme-btn-text, #fff);
    border: none; border-radius: 8px;
}
.pb-page .btn-accent:hover { opacity: .9; color: var(--theme-btn-text, #fff); }
.pb-jumbotron { min-height: 280px; display: flex; align-items: center; }
.pb-image-card { transition: transform .2s; }
.pb-image-card:hover { transform: translateY(-4px); }
.pb-pricing-card { transition: transform .2s; }
.pb-pricing-card:hover { transform: translateY(-4px); }
.pb-team-card { transition: transform .2s; }
.pb-team-card:hover { transform: translateY(-4px); }
.pb-testimonial { transition: transform .2s; }
.pb-testimonial:hover { transform: translateY(-2px); }
.pb-stat-icon { color: var(--theme-primary-start, #667eea); }

/* --- Print --- */
@media print {
  .navbar-flceo,
  .footer-flceo,
  .consent-banner,
  .no-print {
    display: none !important;
  }
}
