:root {
  --navy: #073968;
  --blue: #0861a7;
  --sky: #55a8dc;
  --orange: #f7931d;
  --ink: #10263c;
  --soft: #eef5fa;
  --line: #d8e5ee;
  --font-body: Arial, sans-serif;
  --font-display: Arial, sans-serif;
}

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

.static-demo-close {
  font: 700 1.4rem/1 sans-serif;
}
.static-demo-notice {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 65;
  border-radius: 8px;
  background: #073968;
  color: #fff;
  padding: 7px 10px;
  font:
    700 0.72rem/1.2 Arial,
    sans-serif;
  box-shadow: 0 6px 20px #0003;
}
.static-demo-admin-note {
  margin: 12px;
  border-radius: 10px;
  background: #fff3e3;
  color: #8b5108;
  padding: 12px 16px;
  font:
    700 0.82rem/1.4 Arial,
    sans-serif;
}

.chatbot-panel .bonako-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.chatbot-panel .chatbot-message > div > a {
  margin-top: 9px;
  color: #0861a7;
  display: inline-flex;
  font-weight: 800;
}
.chatbot-panel .chatbot-pdf {
  display: grid !important;
}
.chatbot-panel form .chatbot-menu-button {
  height: 32px;
}
.chatbot-panel form .chatbot-menu-button span {
  display: inline;
}
.chatbot-panel form button:last-child {
  font-size: 1rem;
  font-weight: 900;
}

.mega-menu {
  top: 78px;
  overflow: visible;
}
.nav-dropdown.static-mega-open .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.mega-menu-top {
  min-height: 58px;
}
.mega-pager-under-courses {
  position: absolute;
  top: 8px;
  right: auto;
  z-index: 5;
  padding: 4px 7px;
  gap: 7px;
  border: 1px solid #d6e7f4;
  border-radius: 999px;
  background: #f3f9fd;
  box-shadow: 0 8px 24px rgba(7, 57, 104, 0.14);
  transform: translateX(-50%);
}
.mega-pager-under-courses b {
  min-width: 42px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
}
.mega-pager button {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 5px 14px rgba(8, 97, 167, 0.25);
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}
.mega-pager button:hover:not(:disabled) {
  background: var(--navy);
  box-shadow: 0 8px 18px rgba(7, 57, 104, 0.32);
  transform: translateY(-2px) scale(1.04);
}
.mega-pager button:focus-visible {
  outline: 3px solid rgba(247, 147, 29, 0.45);
  outline-offset: 2px;
}
.mega-pager button:disabled {
  color: #fff;
  background: #8db8d8;
  opacity: 0.5;
  box-shadow: none;
}
.mega-pager button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.6;
}
.mega-columns {
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}
.mega-columns.static-mega-changing {
  opacity: 0;
  transform: translateX(-12px);
}
.mega-columns > section:only-child {
  grid-column: 1 / span 2;
}

.course-aside > .course-aside-text-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}
.course-aside > .course-aside-text-row > span,
.course-aside > .course-aside-text-row > strong {
  grid-column: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.course-aside > .course-aside-text-row > strong {
  line-height: 1.35;
}

.static-admin-page {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-body);
}
.static-admin-page .static-demo-admin-note {
  position: relative;
  z-index: 2;
}
.static-admin-page .cms-shell {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(220px, 248px) minmax(0, 1fr);
  overflow: clip;
}
.static-admin-page .cms-sidebar {
  min-width: 0;
  background: var(--navy);
  color: #dceaf4;
}
.static-admin-page .cms-sidebar button.active {
  background: #ffffff18;
  color: #fff;
  outline: 2px solid #55a8dc;
  outline-offset: -2px;
}
.static-admin-page .cms-sidebar button:not(.active):not(:disabled),
.static-admin-page .cms-sidebar a {
  color: #dceaf4;
}
.static-admin-page .cms-main {
  min-width: 0;
  max-width: 1280px;
}
.static-admin-page .cms-table {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}
.static-admin-page .cms-row {
  min-width: 760px;
}
.static-admin-page .cms-editor {
  width: min(720px, 100vw);
  min-width: 0;
}
.static-admin-page .cms-editor-body {
  min-width: 0;
}
.static-admin-page .cms-editor textarea {
  min-height: 92px;
  line-height: 1.5;
  resize: vertical;
}
.static-admin-page .cms-editor textarea[name='summary'] {
  min-height: 112px;
}
.static-admin-page .cms-ai-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.static-admin-page .cms-ai-tool-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d6e7f1;
  border-radius: 9px;
  background: #fff;
}
.static-admin-page .cms-ai-tool-card .cms-ai-brief {
  margin: 0;
}
.static-admin-page .cms-ai-tool-card textarea {
  min-height: 96px;
}
.static-admin-page .cms-ai-tool-card button {
  width: 100%;
  min-height: 42px;
  margin-top: auto;
  border-radius: 7px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}
.static-admin-page .cms-ai-content-button {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}
.static-admin-page .cms-ai-image-button {
  border: 1px solid #9ec8df;
  background: #fff;
  color: var(--blue);
}
.static-admin-page .cms-ai-tool-card button:disabled {
  opacity: 0.58;
  cursor: wait;
}
.static-admin-page .cms-ai-actions button {
  visibility: visible;
  opacity: 1;
}

.static-admin-preview {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: auto;
  background: #061e33b8;
}
.static-admin-preview .cms-image-preview-dialog {
  position: relative;
  display: grid;
  width: min(680px, calc(100vw - 32px));
  max-width: 680px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  gap: 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px #00182c66;
}
.static-admin-preview .cms-image-preview-dialog h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.35rem;
}
.static-admin-preview .cms-image-preview-dialog p {
  margin: 0;
  color: #647b8c;
  font-size: 0.82rem;
}
.static-admin-preview .cms-image-preview-frame {
  width: 100%;
  height: min(48vh, 380px);
  aspect-ratio: auto;
}
.static-admin-preview .cms-image-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.static-admin-preview .cms-image-preview-actions {
  position: sticky;
  bottom: 0;
  padding-top: 4px;
  background: #fff;
}

.cms-ai-art > img,
.course-landing-image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Keep every course title fully visible in a maximum of two lines. The
   companion script reduces only unusually long titles until they fit. */
.course-landing-copy h1 {
  max-width: 100%;
  font-size: clamp(2.6rem, 3.45vw, 4.15rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
@media (max-width: 900px) {
  .course-landing-copy h1 {
    font-size: clamp(2.45rem, 7vw, 3.7rem);
  }
}
@media (max-width: 620px) {
  .course-landing-copy h1 {
    font-size: clamp(2.15rem, 10.5vw, 3rem);
    line-height: 1;
  }
}

/* Live course search */
.course-search-open { overflow: hidden; }
.course-search-overlay[hidden] { display: none !important; }
.course-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: start center;
  padding: min(12vh, 110px) 20px 30px;
  background: rgba(5, 31, 53, 0.72);
  backdrop-filter: blur(8px);
}
.course-search-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 120px);
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 24, 44, 0.42);
}
.course-search-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 25px 28px 17px;
}
.course-search-dialog header span {
  display: block;
  margin-bottom: 5px;
  color: #f7941d;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.course-search-dialog h2 { margin: 0; color: #0b4777; font-size: clamp(1.45rem, 3vw, 2.1rem); }
.course-search-dialog header button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #edf5fa;
  color: #0b4777;
  font-size: 1.7rem;
  cursor: pointer;
}
.course-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 28px 18px;
  padding: 4px 15px;
  border: 2px solid #0b6eaa;
  border-radius: 12px;
  background: #fff;
}
.course-search-box span { color: #0b6eaa; font-size: 1.65rem; }
.course-search-box input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  outline: 0;
  color: #123b59;
  font: 600 1rem inherit;
}
.course-search-results { padding: 0 28px 28px; }
.course-search-results a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 4px;
  border-bottom: 1px solid #dbe7ee;
  color: #0b4777;
  text-decoration: none;
}
.course-search-results a:hover strong { color: #0b6eaa; }
.course-search-results a span { display: grid; gap: 4px; }
.course-search-results strong { font-size: 0.98rem; }
.course-search-results small { color: #6b8090; }
.course-search-results a > b { color: #f7941d; white-space: nowrap; }
.course-search-results > p { margin: 12px 0 0; padding: 18px; border-radius: 10px; background: #f1f6f9; color: #607686; }
@media (max-width: 620px) {
  .course-search-overlay { padding: 12px; }
  .course-search-dialog { max-height: calc(100vh - 24px); border-radius: 14px; }
  .course-search-dialog > header { padding: 20px 18px 14px; }
  .course-search-box { margin: 0 18px 12px; }
  .course-search-results { padding: 0 18px 20px; }
}
.cms-ai-art > img {
  object-fit: cover;
}
.cms-inline-form[hidden],
.cms-ai-images[hidden] {
  display: none !important;
}
.cms-editor header button[data-close] {
  font-size: 1.7rem;
  line-height: 1;
}
.cms-editor .cms-ai-demo-icon {
  font-size: 1.05rem;
}
.cms-editor .cms-upload input {
  display: none;
}
.cms-editor-backdrop {
  z-index: 100;
}
.cms-delete-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff0f0;
  color: #9d1c1c;
  font-weight: 700;
}

[data-delete-category] {
  color: #a51f31 !important;
  border-color: #e6b8c0 !important;
  background: #fff6f7 !important;
}

[data-delete-category]:hover {
  background: #a51f31 !important;
  color: #fff !important;
}

@media (max-width: 980px) {
  .static-admin-page .cms-shell {
    grid-template-columns: 1fr;
  }
  .static-admin-page .cms-sidebar {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .static-admin-page .cms-ai-guidance-grid {
    grid-template-columns: 1fr;
  }
  .static-admin-page .cms-row {
    min-width: 520px;
  }
  .static-admin-preview {
    padding: 8px;
  }
  .static-admin-preview .cms-image-preview-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
  .static-admin-preview .cms-image-preview-frame {
    height: min(40vh, 300px);
  }
}
