/* theme.css */
/* Resolved theme values for the public site (the learning app's 'indigo' preset).
   Regenerate from the app if the brand colours change. */
:root {
  --active-blue: #f0f2fd;
  --active-blue-text: #6d4595;
  --background-card: #ffffff;
  --background-hover: #f3f4f6;
  --background-learning: #f8fafc;
  --background-light: #f0f2fd;
  --background-primary: #ffffff;
  --background-secondary: #f1f5f9;
  --background-table: #f1f5f9;
  --background-tertiary: #f1f5f9;
  --blue: #007bff;
  --border-accent: #f0f2fd;
  --border-active: #764ba2;
  --border-button: #667eea;
  --border-course: #3d4c8c;
  --border-default: #e5e7eb;
  --border-focus: #667eea;
  --border-heavy: #e5e7eb;
  --border-learning: #f1f5f9;
  --border-primary: #e5e7eb;
  --border-radius: 8px;
  --border-radius-medium: .5rem;
  --border-secondary: #e5e7eb;
  --border-strong: #cbd5e1;
  --border-subtle: #f1f5f9;
  --border-table: #e5e7eb;
  --brand-accent: #764ba2;
  --brand-accent-hover: #6d4595;
  --brand-accent-rgb: 118, 75, 162;
  --brand-accent-subtle: #f4f1f8;
  --brand-ink: #3d4c8c;
  --brand-primary: #667eea;
  --brand-primary-active: #586cc9;
  --brand-primary-hover: #5e74d7;
  --brand-primary-rgb: 102, 126, 234;
  --brand-primary-subtle: #f0f2fd;
  --breakpoint-lg: 992px;
  --breakpoint-md: 768px;
  --breakpoint-sm: 576px;
  --breakpoint-xl: 1200px;
  --breakpoint-xs: 0;
  --button-accent: #764ba2;
  --button-alternate: #6d4595;
  --button-dark: #586cc9;
  --button-hover: #5e74d7;
  --button-light: #764ba2;
  --button-primary: #667eea;
  --button-primary-bg: #667eea;
  --button-primary-hover-bg: #5e74d7;
  --button-primary-text: #ffffff;
  --button-secondary: #764ba2;
  --button-secondary-bg: #ffffff;
  --button-secondary-border: #e5e7eb;
  --button-secondary-text: #667eea;
  --button-strong: #764ba2;
  --button-tertiary: #764ba2;
  --chart-1: #764ba2;
  --chart-2: #667eea;
  --chart-3: #0ea5e9;
  --chart-4: #f59e0b;
  --chart-5: #10b981;
  --chart-6: #ec4899;
  --chart-7: #8b5cf6;
  --chart-8: #64748b;
  --chart-axis-text: #64748b;
  --chart-grid: #e5e7eb;
  --cyan: #17a2b8;
  --danger: #dc3545;
  --dark: #343a40;
  --duration-base: .2s;
  --duration-fast: .12s;
  --duration-reveal: .9s;
  --duration-slow: .32s;
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --error-bright: #dc2626;
  --error-color: #dc2626;
  --focus-blue: rgba(118, 75, 162, .25);
  --focus-ring-color: #667eea;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body-size: 16px;
  --font-family-monospace: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  --font-family-sans-serif: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
  --font-h1-size: 32px;
  --font-h2-size: 24px;
  --font-h3-size: 21px;
  --font-heading: "Poppins", sans-serif;
  --font-primary: "Poppins", sans-serif;
  --font-secondary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-small-size: 14px;
  --gradient-brand: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-brand-soft: linear-gradient(135deg, #f0f2fd 0%, #f4f1f8 100%);
  --gray: #6c757d;
  --gray-dark: #343a40;
  --green: #28a745;
  --hover-primary: #f3f4f6;
  --indigo: #6610f2;
  --info: #17a2b8;
  --info-color: #2563eb;
  --light: #f8f9fa;
  --link-light: #eff6ff;
  --link-primary: #667eea;
  --link-secondary: #6d4595;
  --nav-bg: #ffffff;
  --nav-header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --nav-item-active-bg: #f0f2fd;
  --nav-text: #1e293b;
  --nav-text-active: #667eea;
  --opacity-disabled: .4;
  --opacity-light: .8;
  --opacity-semi: .7;
  --orange: #fd7e14;
  --pink: #e83e8c;
  --portlet-color1: #030044;
  --portlet-color10: #AA1A17;
  --portlet-color11: #5F171F;
  --portlet-color12: #54AFAA;
  --portlet-color2: #0C2574;
  --portlet-color3: #6D1144;
  --portlet-color4: #991328;
  --portlet-color5: #E51515;
  --portlet-color6: #F45C13;
  --portlet-color7: #11386A;
  --portlet-color8: #1A5395;
  --portlet-color9: #061738;
  --primary: #007bff;
  --primary-color: #667eea;
  --primary-focus-color: rgba(102, 126, 234, .15);
  --primary-hover-color: #5e74d7;
  --purple: #6f42c1;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --red: #dc3545;
  --scrollbar-thumb: #cbd5e1;
  --secondary: #6c757d;
  --secondary-color: #f1f5f9;
  --secondary-focus-color: rgba(118, 75, 162, .15);
  --secondary-hover-color: #6d4595;
  --section-padding: 16px;
  --shadow-heavy: rgba(0, 0, 0, .175);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14);
  --shadow-light: rgba(202, 214, 224, .5);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
  --shadow-medium: rgba(0, 0, 0, .125);
  --shadow-modal: rgba(62, 62, 60, .25);
  --shadow-overlay: #12121233;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --sidebar-accent: #764ba2;
  --sidebar-icon: #764ba2;
  --sidebar-primary: #f0f2fd;
  --sidebar-success: #16a34a;
  --status-danger: #dc2626;
  --status-danger-bg: #fef2f2;
  --status-danger-border: #fecaca;
  --status-danger-text: #7f1d1d;
  --status-info: #2563eb;
  --status-info-bg: #eff6ff;
  --status-info-border: #bfdbfe;
  --status-info-text: #1e3a8a;
  --status-success: #16a34a;
  --status-success-bg: #f0fdf4;
  --status-success-border: #bbf7d0;
  --status-success-text: #065f46;
  --status-warning: #d97706;
  --status-warning-bg: #fffbeb;
  --status-warning-border: #fde68a;
  --status-warning-text: #92400e;
  --stroke-black: #0f172a;
  --stroke-primary: #764ba2;
  --success: #28a745;
  --success-bright: #16a34a;
  --success-color: #16a34a;
  --surface-card: #ffffff;
  --surface-card-rgb: 255, 255, 255;
  --surface-hover: #f3f4f6;
  --surface-inverse: #0f172a;
  --surface-inverse-rgb: 15, 23, 42;
  --surface-overlay: rgba(15, 23, 42, .5);
  --surface-page: #f8fafc;
  --surface-raised: #ffffff;
  --surface-sunken: #f1f5f9;
  --teal: #20c997;
  --teal-color: #609281;
  --text-base: #64748b;
  --text-black: #0f172a;
  --text-body: #1e293b;
  --text-dark: #0f172a;
  --text-dark-gray: #1e293b;
  --text-faint: #94a3b8;
  --text-gray: #1e293b;
  --text-icon: #1e293b;
  --text-inverse: #ffffff;
  --text-learning-blue: #764ba2;
  --text-learning-course: #3d4c8c;
  --text-learning-gray: #94a3b8;
  --text-link: #667eea;
  --text-medium-gray: #64748b;
  --text-muted: #64748b;
  --text-on-brand: #ffffff;
  --text-on-brand-rgb: 255, 255, 255;
  --text-primary: #3d4c8c;
  --text-secondary: #1e293b;
  --text-strong: #0f172a;
  --text-strong-rgb: 15, 23, 42;
  --text-tertiary: #1e293b;
  --text-white: #ffffff;
  --tooltip-background: #0f172a;
  --turquoise-color: rgb(34, 211, 170);
  --warning: #ffc107;
  --warning-color: #d97706;
  --white: #fff;
  --yellow: #ffc107;
}

/* icon-tile.css */
/* Icon tile — the standard "icon in a tinted rounded container" treatment.
   Makes lucide icons read as designed elements on stat cards, section
   headers, list rows, and empty states. Token-driven, so it recolors per
   tenant and in dark mode automatically.

   Usage:
     <span className="icon-tile"><BookOpen size="1em" /></span>
     <span className="icon-tile icon-tile--lg icon-tile--success">...</span>
*/

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-primary-subtle);
  color: var(--brand-primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.icon-tile--sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.icon-tile--lg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.3rem;
}

.icon-tile--accent {
  background: var(--brand-accent-subtle);
  color: var(--brand-accent);
}

.icon-tile--success {
  background: var(--status-success-bg);
  color: var(--status-success);
}

.icon-tile--warning {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.icon-tile--danger {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.icon-tile--info {
  background: var(--status-info-bg);
  color: var(--status-info);
}

/* Muted — something unknown or not yet set (e.g. a record whose type is blank). */
.icon-tile--neutral {
  background: var(--surface-sunken);
  color: var(--text-muted);
}

/* On-brand variant for dark/gradient hero surfaces. */
.icon-tile--on-brand {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-on-brand);
}

/* Continuous rotation for loading icons (lucide LoaderCircle/RefreshCw) —
   the lucide replacement for FontAwesome's `spin` prop. The global
   reduced-motion block in tokens.css collapses it automatically. */
.icon-spin {
  animation: icon-spin 1s linear infinite;
}

@keyframes icon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* base.css */
/* Site-wide base. Page sections bring their own stylesheets. */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
.site-main { min-height: 60vh; }
.site-loader { width: 36px; height: 36px; margin: 64px auto; border: 3px solid var(--border-default); border-top-color: var(--brand-primary); border-radius: 50%; animation: site-spin 0.8s linear infinite; }
@keyframes site-spin { to { transform: rotate(360deg); } }
.site-notfound { margin: 96px 0; padding: 0 24px; text-align: center; color: var(--text-body); }
.site-notfound h1 { font-size: 32px; color: var(--text-strong); margin-bottom: 12px; }
.site-notfound a { color: var(--brand-primary); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .site-loader { animation: none; } }

/* header.css */
/* Site header and its Courses menu (was src/components/Header.astro). */
.site-header { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 16px; min-height: 75px; padding: 8px 32px; background: #fff; border-bottom: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05); }
.site-logo { display: inline-flex; justify-self: start; margin-left: 14px; }
.site-logo img { width: 180px; min-width: 180px; height: auto; display: block; }
.site-nav { display: contents; }
.site-links { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-link { display: inline-flex; align-items: center; gap: 6px; padding: 10px 19.5px; border-radius: 999px; color: #1e293b; font-size: 17px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease; }
.site-link:hover { background: #f1f5f9; color: #0f172a; }
.site-has-menu { position: relative; }
.site-has-menu.is-open > .site-link { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.site-has-menu.is-open > .site-link svg { transform: rotate(180deg); }
.site-auth { display: inline-flex; align-items: center; justify-self: end; padding: 4px; border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; }
.site-auth-btn { padding: 8px 25px; border-radius: 999px; color: #1e293b; font-size: 17px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.site-auth-btn:hover { background: #f1f5f9; color: #0f172a; }
.site-auth-btn--solid { background: var(--brand-primary); color: #fff; }
.site-auth-btn--solid:hover { background: var(--brand-primary-hover, #5a6fd8); color: #fff; }
.site-auth-sep { width: 1px; height: 24px; background: #e5e7eb; }
.site-auth [hidden] { display: none; }
.site-burger { display: none; margin-left: auto; width: 44px; height: 44px; padding: 10px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; cursor: pointer; }
.site-burger span { display: block; height: 2px; margin: 5px 0; background: #1e293b; border-radius: 2px; }

.site-mega { display: none; position: absolute; top: calc(100% + 10px); left: -376px; width: 880px; max-width: calc(100vw - 48px); border: 1px solid #e5e7eb; border-radius: 18px; background: #fff; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16); overflow: hidden; }
.site-mega::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.site-has-menu.is-open .site-mega { display: grid; grid-template-columns: 200px 1fr; overflow: visible; }
.site-mega-rail { padding: 18px 14px; background: #f8fafc; border-right: 1px solid #e5e7eb; border-radius: 18px 0 0 18px; }
.site-mega-main { padding: 18px 20px 22px; }
.site-mega-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.site-mega-title { margin: 0; color: #0f172a; font-size: 18px; font-weight: 700; }
.site-mega-sub { margin: 2px 0 0; color: #64748b; font-size: 12.5px; font-weight: 500; }
.site-mega-all { flex: none; padding: 8px 20px; border-radius: 999px; background: var(--brand-primary); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.site-mega-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

@media (max-width: 1279px) {
  .site-header { grid-template-columns: 1fr auto; padding: 8px 16px; }
  .site-logo { margin-left: 0; }
  .site-burger { display: block; }
  .site-nav { display: none; grid-column: 1 / -1; flex-direction: column; align-items: stretch; padding: 8px 0 16px; }
  .site-header.is-open .site-nav { display: flex; }
  .site-links { flex-direction: column; align-items: stretch; }
  .site-link { justify-content: space-between; border-radius: 12px; }
  .site-auth { align-self: flex-start; justify-self: start; margin-top: 8px; }
  .site-mega { position: static; width: auto; max-width: none; margin: 6px 0; box-shadow: none; }
  .site-has-menu.is-open .site-mega { grid-template-columns: 1fr; }
  .site-mega-rail { border-right: 0; border-bottom: 1px solid #e5e7eb; border-radius: 18px 18px 0 0; }
  .site-mega-grid { grid-template-columns: 1fr; }
}
.site-mega-eyebrow { margin: 0 8px 10px; color: #0f172a; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.site-mega-level { display: block; padding: 9px 12px; border-radius: 12px; text-decoration: none; }
.site-mega-level strong { display: block; color: #0f172a; font-size: 14px; font-weight: 600; }
.site-mega-level span { color: #64748b; font-size: 12px; }
.site-mega-level:hover, .site-mega-level.is-on { background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); }
.site-mega-level.is-on strong { color: var(--brand-primary); }
.site-mega-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 12px; text-decoration: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.site-mega-card:hover { border-color: var(--brand-primary); box-shadow: 0 6px 18px rgba(102, 126, 234, 0.16); }
.site-mega-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.site-mega-pill { padding: 2px 10px; border-radius: 999px; background: #eef2ff; color: #4f46e5; font-size: 11px; font-weight: 600; }
.site-mega-price { color: var(--brand-primary); font-size: 12.5px; font-weight: 700; }
.site-mega-card strong { color: #0f172a; font-size: 14px; font-weight: 600; line-height: 1.35; }
.site-mega-meta { color: #64748b; font-size: 12px; }

/* footer.css */
/* Site footer (was src/components/Footer.astro). */
.site-footer { border-top: 1px solid #e5e7eb; background: #fff; color: #64748b; font-size: 14px; }
.site-footer-tagline { max-width: 1280px; margin: 0 auto; padding: 32px 40px 0; color: #0f172a; font-size: 15px; font-weight: 600; }
.site-footer-inner { display: grid; grid-template-columns: var(--site-footer-track, minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 2.4fr) minmax(0, 1fr)); gap: 40px; max-width: 1280px; margin: 0 auto; padding: 48px 40px 40px; }
.site-footer-brand img { width: 192px; height: auto; display: block; margin-bottom: 14px; }
.site-footer-brand p { margin: 0; line-height: 1.7; }
.site-footer-col h2 { margin: 6px 0 16px; color: #0f172a; font-size: 15px; font-weight: 600; }
.site-footer-col ul { margin: 0; padding: 0; list-style: none; }
.site-footer-col li { margin-bottom: 12px; }
.site-footer-col--wide ul { columns: 2; column-gap: 32px; }
.site-footer-col a, .site-footer-base a { color: #64748b; text-decoration: none; }
.site-footer-col a:hover, .site-footer-base a:hover { color: var(--brand-primary); }
.site-footer-social { display: flex; flex-wrap: wrap; gap: 10px; max-width: 1280px; margin: 0 auto; padding: 0 40px 28px; }
.site-footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; background: #f1f5f9; color: #475569; transition: background 0.15s ease, color 0.15s ease; }
.site-footer-social a:hover { background: var(--brand-primary); color: #fff; }
.site-footer-base { max-width: 1280px; margin: 0 auto; padding: 18px 40px 28px; border-top: 1px solid #e5e7eb; text-align: center; }
.site-footer-base p { margin: 0; font-size: 13px; }
.site-footer-powered { margin-top: 6px !important; color: #94a3b8; font-size: 11px !important; }
@media (max-width: 900px) {
  .site-footer-inner { grid-template-columns: 1fr 1fr; padding: 40px 20px 32px; gap: 32px; }
  .site-footer-brand { grid-column: 1 / -1; }
  .site-footer-col--wide { grid-column: 1 / -1; }
  .site-footer-tagline { padding: 28px 20px 0; }
  .site-footer-social { padding: 0 20px 24px; }
  .site-footer-base { padding: 18px 20px 28px; }
}
