/* edtech.co.zw theme — inspired by edtechhub.org / edtechmagazine.com
   Flat, editorial, orange accent. No shadows. Bootstrap classes unchanged.
   Type: Source Serif 4 (headings — academic) + IBM Plex Sans (UI/body — corporate readability).
   Fonts loaded via Google Fonts link in layouts. */

:root {
  --font-sans: "IBM Plex Sans", "Segoe UI", Candara, Calibri, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --background: #ffffff;
  --foreground: #1a1f2e;
  --card: #ffffff;
  --card-foreground: #1a1f2e;
  --popover: #ffffff;
  --popover-foreground: #1a1f2e;
  --primary: #e85d04;
  --primary-foreground: #ffffff;
  --secondary: #f4f5f7;
  --secondary-foreground: #1a1f2e;
  --muted: #f7f7f8;
  --muted-foreground: #5c6478;
  --accent: #fff4eb;
  --accent-foreground: #1a1f2e;
  --destructive: #c1121f;
  --border: #e4e6eb;
  --input: #d8dbe3;
  --ring: #e85d04;
  --radius: 0.25rem;
  --sidebar: #fafafa;
  --sidebar-foreground: #1a1f2e;
  --sidebar-primary: #e85d04;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #fff4eb;
  --sidebar-accent-foreground: #1a1f2e;
  --sidebar-border: #e4e6eb;
  --sidebar-ring: #e85d04;

  --bs-body-bg: var(--background);
  --bs-body-color: var(--foreground);
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-body-color-rgb: 26, 31, 46;
  --bs-primary: var(--primary);
  --bs-primary-rgb: 232, 93, 4;
  --bs-secondary: var(--secondary);
  --bs-secondary-rgb: 244, 245, 247;
  --bs-secondary-color: var(--muted-foreground);
  --bs-border-color: var(--border);
  --bs-border-radius: var(--radius);
  --bs-border-radius-sm: 0.125rem;
  --bs-border-radius-lg: 0.375rem;
  --bs-danger: var(--destructive);
  --bs-danger-rgb: 193, 18, 31;
  --bs-tertiary-bg: var(--muted);
  --bs-emphasis-color: var(--foreground);
  --bs-link-color: var(--primary);
  --bs-link-hover-color: #c44d03;
  --bs-success-rgb: 46, 125, 50;
  --bs-light-rgb: 247, 247, 248;
  --bs-dark-rgb: 26, 31, 46;

  /* Kill Bootstrap shadow tokens */
  --bs-box-shadow: none;
  --bs-box-shadow-sm: none;
  --bs-box-shadow-lg: none;
  --bs-box-shadow-inset: none;
}

.dark {
  --background: #12151c;
  --foreground: #f2f3f5;
  --card: #1a1f2e;
  --card-foreground: #f2f3f5;
  --popover: #1a1f2e;
  --popover-foreground: #f2f3f5;
  --primary: #ff7a2e;
  --primary-foreground: #12151c;
  --secondary: #242a3a;
  --secondary-foreground: #f2f3f5;
  --muted: #1e2433;
  --muted-foreground: #9aa3b5;
  --accent: #2a2118;
  --accent-foreground: #f2f3f5;
  --destructive: #ef5350;
  --border: rgba(255, 255, 255, 0.12);
  --input: rgba(255, 255, 255, 0.16);
  --ring: #ff7a2e;
  --sidebar: #1a1f2e;
  --sidebar-foreground: #f2f3f5;
  --sidebar-primary: #ff7a2e;
  --sidebar-primary-foreground: #12151c;
  --sidebar-accent: #2a2118;
  --sidebar-accent-foreground: #f2f3f5;
  --sidebar-border: rgba(255, 255, 255, 0.12);
  --sidebar-ring: #ff7a2e;

  --bs-body-bg-rgb: 18, 21, 28;
  --bs-body-color-rgb: 242, 243, 245;
  --bs-primary-rgb: 255, 122, 46;
  --bs-secondary-rgb: 36, 42, 58;
  --bs-danger-rgb: 239, 83, 80;
  --bs-light-rgb: 30, 36, 51;
  --bs-dark-rgb: 242, 243, 245;
}

/* ---------- Global: no shadows ---------- */
*,
*::before,
*::after {
  box-shadow: none !important;
  text-shadow: none !important;
}

html {
  font-size: 16px;
}

body,
.btn,
.form-control,
.form-select,
.navbar,
.table,
input,
textarea,
select,
button,
.badge,
.breadcrumb,
.pagination,
.dropdown-menu {
  font-family: var(--font-sans);
}

body {
  background: var(--background);
  color: var(--foreground);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Typography (corporate / school) ---------- */
h1, .h1, .display-4, .display-5,
h2, .h2,
h3, .h3,
h4, .h4 {
  font-family: var(--font-serif);
  color: var(--foreground);
}

h1, .h1, .display-4, .display-5 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

h2, .h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h3, .h3 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
}

h4, .h4 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.4;
}

h5, .h5, h6, .h6 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--foreground);
}

.navbar-brand,
.frame-brand-mark {
  font-family: var(--font-serif);
}

.text-muted,
small,
.small {
  color: var(--muted-foreground) !important;
}

.lead {
  font-family: var(--font-sans);
  font-size: 1.1875rem;
  font-weight: 400;
  color: var(--muted-foreground);
  line-height: 1.75;
}

.article-body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.8;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: #c44d03;
  text-decoration: underline;
}

.navbar a:hover,
.btn:hover,
.card a:hover,
.list-group-item:hover,
.page-link:hover {
  text-decoration: none;
}

.section-spacing {
  padding: 2.5rem 0;
}

@media (min-width: 768px) {
  .section-spacing {
    padding: 4.5rem 0;
  }
}

/* ---------- Buttons (flat, sharp, Hub-like) ---------- */
.btn {
  height: 2.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-sm {
  height: 2.25rem;
  font-size: 0.75rem;
  padding: 0.4rem 0.9rem;
}

.btn-lg {
  height: 3rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
}

.btn:focus,
.btn:active:focus,
.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  box-shadow: none !important;
}

.btn-primary,
.btn-frame,
.btn-frame-nav {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover,
.btn-frame:hover,
.btn-frame-nav:hover {
  background: #c44d03;
  border-color: #c44d03;
  color: #fff;
}

.btn-secondary,
.btn-light {
  background: var(--secondary);
  border: 1px solid var(--border);
  color: var(--secondary-foreground);
}

.btn-secondary:hover,
.btn-light:hover {
  background: var(--muted);
  border-color: var(--input);
  color: var(--foreground);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-light {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-light:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: var(--foreground);
}

.btn-link {
  color: var(--primary);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
  height: 2.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 400;
  background: var(--background);
  border: 1px solid var(--input);
  color: var(--foreground);
  border-radius: var(--radius);
}

textarea.form-control {
  height: auto;
  min-height: 6rem;
}

.form-control::placeholder {
  color: var(--muted-foreground);
}

.form-control:focus,
.form-select:focus {
  background: var(--background);
  border-color: var(--primary);
  color: var(--foreground);
  outline: none;
  box-shadow: none !important;
}

.form-check-input {
  border: 1px solid var(--input);
  background-color: var(--background);
  border-radius: 0.125rem;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:focus {
  border-color: var(--primary);
  box-shadow: none !important;
}

.form-label {
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  margin-bottom: 0.4rem;
}

/* ---------- Cards (border only, flat) ---------- */
.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none !important;
}

.card.shadow,
.card.shadow-sm,
.card.border-0.shadow,
.card.border-0.shadow-sm {
  box-shadow: none !important;
  border: 1px solid var(--border) !important;
}

.card-header,
.card-footer {
  background: transparent;
  border-color: var(--border);
  color: var(--card-foreground);
}

.card-body {
  padding: 1.5rem;
}

.card-article,
.card-paper,
.school-card {
  transition: border-color 120ms ease;
}

.card-article:hover,
.card-paper:hover,
.school-card:hover {
  transform: none;
  border-color: var(--primary);
  box-shadow: none !important;
}

/* ---------- Navbar (clean white bar) ---------- */
.navbar,
.navbar.frame-nav,
.navbar.navbar-dark,
.navbar.bg-dark,
.navbar.bg-primary {
  background: var(--background) !important;
  border-bottom: 1px solid var(--border);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.navbar-brand,
.navbar-dark .navbar-brand,
.frame-nav .navbar-brand {
  color: var(--foreground) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.25rem;
}

.navbar-nav .nav-link,
.navbar-dark .nav-link,
.frame-nav .nav-link {
  color: var(--foreground) !important;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.85rem !important;
  border-radius: 0;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-dark .nav-link:hover {
  color: var(--primary) !important;
  background: transparent;
}

.navbar-toggler {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.5rem;
}

.navbar-dark .navbar-toggler-icon {
  filter: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26,31,46,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.dark .navbar-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(242,243,245,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  cursor: pointer;
}

.theme-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.theme-toggle-btn svg {
  width: 1rem;
  height: 1rem;
}

.theme-toggle-btn .icon-sun { display: block; }
.theme-toggle-btn .icon-moon { display: none; }
.dark .theme-toggle-btn .icon-sun { display: none; }
.dark .theme-toggle-btn .icon-moon { display: block; }

/* ---------- Tables ---------- */
.table {
  color: var(--foreground);
  border-color: var(--border);
  --bs-table-bg: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: var(--muted);
}

.table > :not(caption) > * > * {
  border-bottom: 1px solid var(--border);
  border-top: none;
  border-left: none;
  border-right: none;
  background: transparent;
  color: var(--foreground);
  padding: 0.9rem 0.75rem;
  box-shadow: none !important;
}

.table thead th {
  color: var(--muted-foreground);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: transparent;
  --bs-table-bg-type: transparent;
}

.table-hover > tbody > tr:hover > * {
  background: var(--muted);
  --bs-table-bg-state: var(--muted);
}

/* ---------- Badges ---------- */
.badge {
  font-weight: 700;
  font-size: 0.6875rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.bg-primary,
.badge.bg-secondary {
  background: var(--accent) !important;
  color: var(--primary) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}

.badge.bg-success {
  background: #e8f5e9 !important;
  color: #2e7d32 !important;
  border: 1px solid #c8e6c9;
}

.dark .badge.bg-success {
  background: #1b2e1c !important;
  color: #81c784 !important;
  border-color: #2e4a30;
}

.badge.bg-light,
.badge.text-bg-light {
  background: var(--secondary) !important;
  color: var(--muted-foreground) !important;
  border: 1px solid var(--border);
}

/* ---------- Alerts ---------- */
.alert {
  background: var(--muted);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  color: var(--foreground);
  border-radius: var(--radius);
}

.alert-success {
  border-left-color: #2e7d32;
}

.alert-danger {
  background: #fff5f5;
  border-left-color: var(--destructive);
}

.dark .alert-danger {
  background: #2a1515;
}

/* ---------- Dropdowns / modals (flat) ---------- */
.dropdown-menu,
.modal-content,
.popover,
.toast {
  background: var(--popover);
  color: var(--popover-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none !important;
}

.dropdown-item {
  color: var(--popover-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--accent);
  color: var(--foreground);
}

.modal-header,
.modal-footer {
  border-color: var(--border);
}

/* ---------- Pagination ---------- */
.pagination {
  gap: 0.35rem;
}

.page-link {
  border: 1px solid var(--border);
  border-radius: var(--radius) !important;
  color: var(--foreground);
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
}

.page-link:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: var(--foreground);
}

.page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.page-item.disabled .page-link {
  color: var(--muted-foreground);
  background: transparent;
}

/* ---------- Breadcrumbs / lists ---------- */
.breadcrumb {
  font-size: 0.8125rem;
  font-weight: 500;
}

.breadcrumb-item a {
  color: var(--muted-foreground);
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-item.active {
  color: var(--foreground);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--muted-foreground);
}

.list-group-item {
  background: var(--card);
  color: var(--card-foreground);
  border-color: var(--border);
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  background: var(--accent);
  color: var(--foreground);
}

.border,
.border-top,
.border-bottom,
.border-end,
.border-start {
  border-color: var(--border) !important;
}

.bg-light {
  background: var(--muted) !important;
}

.bg-white {
  background: var(--card) !important;
}

.bg-primary-subtle {
  background: var(--accent) !important;
  color: var(--foreground) !important;
}

.text-white,
.text-white-50 {
  color: var(--foreground) !important;
}

.text-danger {
  color: var(--destructive) !important;
}

.border-primary {
  border-color: var(--primary) !important;
}

.border-success {
  border-color: #a5d6a7 !important;
}

/* ---------- Frame / site chrome ---------- */
.frame-brand-mark {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foreground);
}

.frame-brand-mark::after {
  content: none;
}

.navbar-brand .frame-brand-mark {
  color: var(--foreground);
}

.navbar-brand .frame-brand-sub {
  color: var(--primary);
  font-weight: 700;
  opacity: 1;
  font-size: 0.85rem;
  margin-left: 0.15rem;
}

.frame-strip {
  background: var(--foreground);
  color: #fff;
  border-bottom: none;
  font-size: 0.8125rem;
  font-weight: 500;
}

.frame-strip a,
.frame-strip .btn-frame {
  color: #fff;
}

.frame-strip .btn-frame {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.frame-strip .small,
.frame-strip span {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Hero: light editorial panel like EdTech Hub */
.frame-hero {
  background: var(--background);
  border-bottom: 1px solid var(--border);
  color: var(--foreground) !important;
}

.frame-hero.text-white,
.frame-hero .text-white,
.frame-hero .lead,
.frame-hero h1,
.frame-hero .display-4 {
  color: var(--foreground) !important;
}

.frame-hero .btn-light {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.frame-hero .btn-light:hover {
  background: #c44d03;
  border-color: #c44d03;
  color: #fff;
}

.frame-hero .btn-outline-light {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.frame-hero .btn-outline-light:hover {
  border-color: var(--primary);
  background: var(--accent);
  color: var(--foreground);
}

.frame-hero-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  font-weight: 700;
  opacity: 1;
}

.frame-stat-pill {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
}

.frame-stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.frame-stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}

.frame-feature-card {
  border: 1px solid var(--border) !important;
  border-top: 3px solid var(--primary) !important;
  border-left: 1px solid var(--border) !important;
}

.frame-cta {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
}

.frame-cta-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.frame-footer,
.site-footer.frame-footer {
  background: var(--foreground);
  color: rgba(255, 255, 255, 0.85);
  border-top: none;
}

.frame-footer a,
.site-footer.frame-footer a {
  color: rgba(255, 255, 255, 0.75);
}

.frame-footer a:hover,
.site-footer.frame-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.frame-footer .text-white-50,
.frame-footer .frame-brand-mark.text-white,
.frame-footer .frame-brand-mark {
  color: #fff !important;
}

.frame-footer .h6 {
  color: rgba(255, 255, 255, 0.55) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 700;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

img[loading="lazy"] {
  background: var(--muted);
}

/* ---------- Admin ---------- */
aside.bg-white.border-end,
.col-md-3.bg-white {
  background: var(--sidebar) !important;
  border-color: var(--sidebar-border) !important;
}

aside .nav-link {
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
}

aside .nav-link:hover {
  background: var(--sidebar-accent);
  color: var(--primary);
}

.min-vh-100 {
  background: var(--background);
}

.input-group .btn {
  box-shadow: none !important;
}

.input-group > :not(:first-child):not(.dropdown-menu) {
  margin-left: -1px;
}

@media (max-width: 767px) {
  h1, .h1, .display-4, .display-5 {
    font-size: 1.85rem;
  }

  .table-responsive {
    font-size: 0.875rem;
  }
}
