/*
 * MEPSO Child — design system, modern training platform.
 *
 * Aesthetic: near-white surfaces, near-black text, typographic
 * hierarchy. Navy/blue brand colours are used with restraint for
 * action, focus, and orientation. Surfaces stay calm and readable;
 * borders and modest shadows do the structural work.
 *
 * Customer brand colours still arrive from the Customizer as
 * --mepso-primary / --mepso-secondary, so a future customer can
 * repaint the accents without touching this CSS.
 */

/* ===================================================================
 * 1. Design tokens
 * =================================================================== */
:root {
  /* Brand (primary = navy, secondary = electric blue) */
  --mepso-primary:   #1B365D;
  --mepso-secondary: #0066B3;

  /* Accent palette — restrained, brand-adjacent */
  --a-cyan:    #2BB3D9;
  --a-teal:    #0F7B6C;
  --a-amber:   #FDB913;

  /* Brand gradients — polished without neon spill */
  --g-brand:
    linear-gradient(120deg,
      #1B365D 0%,
      #0066B3 52%,
      #0F7B6C 100%);
  --g-brand-h:
    linear-gradient(120deg,
      #0F2340 0%,
      #005694 52%,
      #0B6256 100%);
  --g-accent-strip:
    linear-gradient(90deg,
      #1B365D 0%,
      #0066B3 42%,
      #0F7B6C 76%,
      #FDB913 100%);

  /* Dark brand surface used for opt-in dramatic sections. */
  --g-mesh:
    linear-gradient(135deg,
      rgba(15, 123, 108, 0.22) 0%,
      rgba(15, 123, 108, 0) 42%),
    linear-gradient(155deg, #0B1E3D 0%, #1B365D 58%, #0A4F78 100%);

  --g-hero-overlay:
    linear-gradient(135deg,
      rgba(27, 54, 93, 0.68) 0%,
      rgba(0, 102, 179, 0.38) 50%,
      rgba(15, 123, 108, 0.24) 80%,
      transparent 100%);

  /* Neutral scale — the real foundation of the system */
  --n-0:   #FFFFFF;
  --n-25:  #FBFBFA;  /* Notion off-white page bg */
  --n-50:  #F7F6F3;  /* subtle surface */
  --n-100: #EFEEEB;  /* hover state tint */
  --n-200: #E3E2DE;  /* hairline borders */
  --n-300: #D3D1CB;
  --n-400: #A5A39D;
  --n-500: #6F6E69;  /* muted text */
  --n-700: #373530;  /* primary body text */
  --n-900: #191918;  /* near-black — headings, buttons */

  /* Semantic */
  --accent-red:   #E03E3E;
  --accent-amber: #D9730D;
  --accent-green: #0F7B6C;
  --accent-blue:  #0B6E99;

  /* Surface tokens (semantic aliases over neutrals) */
  --surface-0:   var(--n-0);
  --surface-1:   var(--n-25);
  --surface-2:   var(--n-50);
  --surface-tint: var(--n-100);
  --border:      var(--n-200);
  --border-strong: var(--n-300);
  --text:        var(--n-900);
  --text-body:   var(--n-700);
  --text-muted:  var(--n-500);
  --text-subtle: var(--n-400);

  /* Typography */
  --mepso-font-sans:
    "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans Macedonian", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mepso-font-mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, "Liberation Mono", monospace;

  /* Scale — Notion uses tighter, less modular */
  --fs-xs:   0.75rem;   /* 12 */
  --fs-sm:   0.875rem;  /* 14 */
  --fs-md:   1rem;      /* 16 */
  --fs-lg:   1.125rem;  /* 18 */
  --fs-xl:   1.375rem;  /* 22 */
  --fs-2xl:  1.75rem;   /* 28 */
  --fs-3xl:  2.25rem;   /* 36 */
  --fs-4xl:  3rem;      /* 48 */

  /* Spacing — 4-based */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Radii — small and consistent */
  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 8px;

  /* Shadows — only for floating elements (modals, dropdowns).
   * Cards get a 1px border instead. */
  --shadow-pop:
    0 1px 2px rgba(15, 15, 15, 0.08),
    0 8px 16px rgba(15, 15, 15, 0.08);

  /* Focus ring — subtle blue, accessible */
  --focus: 0 0 0 2px rgba(11, 110, 153, 0.4);
}

/* ===================================================================
 * 2. Base + typography
 * =================================================================== */
body {
  font-family: var(--mepso-font-sans);
  background: var(--surface-0);
  color: var(--text-body);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11", "kern", "liga";
  position: relative;
}
/* (Noise overlay removed — decoration without value. Reinstate via
 *  .mepso-grain class on <body> if it turns out we want it back.) */

h1, h2, h3, h4, h5, h6,
.entry-title {
  font-family: var(--mepso-font-sans);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
}
h1, .entry-title {
  /* Display-size headings — strong, but still page-content friendly */
  font-size: clamp(2.25rem, 1.55rem + 2.8vw, 4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
}
h2 {
  font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem);
  letter-spacing: 0;
  line-height: 1.1;
}
/* Gradient-text utility — opt-in only via .mepso-gradient-text.
 * Removed the auto-application to .entry-title and the shimmer
 * animation (constant motion on every page heading was fatiguing). */
.mepso-gradient-text {
  background: var(--g-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
h2                { font-size: var(--fs-2xl); font-weight: 700; }
h3                { font-size: var(--fs-xl);  font-weight: 650; }
h4                { font-size: var(--fs-lg);  font-weight: 600; }

p, li, dd {
  line-height: 1.55;
  color: var(--text-body);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(11, 110, 153, 0.4);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 120ms ease, color 120ms ease;
}
a:hover {
  color: var(--mepso-secondary);
  text-decoration-color: var(--mepso-secondary);
}

/* Monospace for code / numeric */
code, kbd, samp, pre {
  font-family: var(--mepso-font-mono);
  font-size: 0.9em;
}
code {
  background: var(--surface-tint);
  color: var(--accent-red);
  padding: 1px 5px;
  border-radius: var(--r-sm);
}

/* ===================================================================
 * 3. Focus ring — one rule, minimal
 * =================================================================== */
*:focus { outline: none; }
*:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: transparent;
}

/* ===================================================================
 * 4. Buttons — polished MEPSO primary
 * =================================================================== */
.ast-button,
.wp-block-button__link,
.button,
input[type="submit"],
input[type="button"],
button:not([class*="elementor"]):not(.ld-button):not(.wp-block-navigation__responsive-container-open) {
  font-family: var(--mepso-font-sans);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: 12px 24px;
  background: var(--g-brand);
  background-size: 220% 100%;
  background-position: 0% 50%;
  color: var(--n-0);
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background-position 380ms ease, box-shadow 200ms ease, transform 120ms ease;
  box-shadow:
    0 1px 2px rgba(27, 54, 93, 0.18),
    0 8px 18px rgba(27, 54, 93, 0.18);
  letter-spacing: 0;
  position: relative;
  overflow: hidden;
  z-index: 0;
}
/* A thin inner highlight that makes the gradient pop */
.ast-button::after,
.wp-block-button__link::after,
.button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, transparent 45%);
  pointer-events: none;
  z-index: -1;
}
.ast-button:hover,
.wp-block-button__link:hover,
.button:hover,
input[type="submit"]:hover {
  background-position: 100% 50%;  /* shift the gradient across on hover */
  color: var(--n-0);
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(27, 54, 93, 0.2),
    0 12px 24px rgba(27, 54, 93, 0.22);
}
.ast-button:active,
.wp-block-button__link:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

/* Secondary / outline */
.is-style-outline .wp-block-button__link,
.ast-button.secondary,
.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.is-style-outline .wp-block-button__link:hover,
.ast-button.secondary:hover {
  background: var(--surface-tint);
  color: var(--text);
  border-color: var(--border-strong);
}

/* Keep native media-player controls compact. The global button style
 * above is for site actions, while MediaElement uses tiny sprite
 * buttons for play/pause/volume/fullscreen. */
.mejs-container .mejs-button > button,
.wp-video .mejs-button > button,
.wp-audio-shortcode .mejs-button > button {
  background-color: transparent !important;
  background-image: url("/wp-includes/js/mediaelement/mejs-controls.svg") !important;
  background-repeat: no-repeat !important;
  background-size: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: transparent !important;
  cursor: pointer;
  display: block;
  font-size: 0 !important;
  height: 20px !important;
  line-height: 0 !important;
  margin: 10px 6px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute;
  text-decoration: none;
  transform: none !important;
  transition: none !important;
  width: 20px !important;
  z-index: auto;
}
.mejs-container .mejs-button > button::after,
.wp-video .mejs-button > button::after,
.wp-audio-shortcode .mejs-button > button::after {
  content: none !important;
}
.mejs-play > button { background-position: 0 0 !important; }
.mejs-pause > button { background-position: -20px 0 !important; }
.mejs-replay > button { background-position: -160px 0 !important; }
.mejs-unmute > button { background-position: -40px 0 !important; }
.mejs-mute > button { background-position: -60px 0 !important; }
.mejs-fullscreen-button > button { background-position: -80px 0 !important; }
.mejs-unfullscreen > button { background-position: -100px 0 !important; }
.mejs-captions-button > button { background-position: -140px 0 !important; }
.mejs-chapters-button > button { background-position: -180px 0 !important; }
.mejs-controls button:hover,
.mejs-controls button:focus {
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* H5P Interactive Video may render directly in the page, so the site
 * button skin can leak into its play/fullscreen/volume controls. Keep
 * those controls as H5P's own compact icon buttons. */
.h5p-interactive-video button.h5p-control,
.h5p-interactive-video .h5p-control,
.h5p-interactive-video .h5p-controls button,
.h5p-content .h5p-interactive-video button.h5p-control {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fefefe !important;
  cursor: pointer;
  display: inline-block !important;
  font-size: 16px !important;
  height: 36px !important;
  line-height: 36px !important;
  margin: 0 6px 0 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  position: relative !important;
  text-decoration: none !important;
  transform: none !important;
  transition: box-shadow 100ms ease-out 300ms !important;
  width: 36px !important;
  z-index: auto !important;
}
.h5p-interactive-video button.h5p-control::after,
.h5p-interactive-video .h5p-controls button::after {
  content: none !important;
}
.h5p-interactive-video .h5p-control::before {
  background: transparent !important;
  color: #fbfbfb !important;
  font-size: 22px !important;
  height: 36px !important;
  line-height: 37px !important;
  text-align: center !important;
  width: 36px !important;
}
.h5p-interactive-video .h5p-controls-left .h5p-control:first-child {
  margin: 0 4px 0 8px !important;
}
.h5p-interactive-video .h5p-minimal-overlay button.h5p-minimal-button,
.h5p-interactive-video .h5p-minimal-overlay .h5p-minimal-button {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #fefefe !important;
  padding-top: 4em !important;
  transform: none !important;
}

/* ===================================================================
 * 5. Cards / surfaces — 1px border, no shadow by default
 * =================================================================== */
.mepso-card,
.wp-block-group.is-style-card {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  transition: background 120ms ease, border-color 120ms ease;
}
.mepso-card:hover,
.wp-block-group.is-style-card:hover {
  background: var(--surface-1);
  border-color: var(--border-strong);
  transform: none;
  box-shadow: none;
}

/* ===================================================================
 * 6. Forms
 * =================================================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
  font-family: var(--mepso-font-sans);
  font-size: var(--fs-md);
  color: var(--text);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-0);
  transition: border-color 80ms ease, box-shadow 80ms ease;
  width: 100%;
  max-width: 100%;
  line-height: 1.4;
}
input:hover, textarea:hover, select:hover {
  border-color: var(--border-strong);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent-blue);
  box-shadow: var(--focus);
  outline: none;
}
input::placeholder, textarea::placeholder {
  color: var(--text-subtle);
}

label {
  font-weight: 500;
  font-size: var(--fs-sm);
  color: var(--text);
  letter-spacing: 0;
}

/* ===================================================================
 * 7. Header / nav — thin hairline, no gradient, no navy fill
 * =================================================================== */
.site-header,
.ast-header-break-point .main-header-bar,
.ast-theme-transparent-header .main-header-bar,
.main-header-bar {
  /* Glassmorphism: translucent white with backdrop blur. Sits
   * above page content (hero) while keeping a hint of what's
   * behind. Fallback to opaque white on browsers without
   * backdrop-filter support. */
  background: rgba(255, 255, 255, 0.72) !important;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(227, 226, 222, 0.75) !important;
  box-shadow: none !important;
  position: relative;
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header, .main-header-bar { background: var(--surface-0) !important; }
}
/* Thin brand rule under the header */
.site-header::after,
.main-header-bar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--g-accent-strip);
  z-index: 2;
}
@keyframes mepso-shimmer {
  from { background-position:   0% 50%; }
  to   { background-position: 100% 50%; }
}
.main-header-menu .menu-item > a,
.main-header-menu > li > a {
  color: var(--text-body) !important;
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0;
  padding: 10px 14px !important;
  border-radius: var(--r-sm);
  transition: background 160ms ease, color 160ms ease;
  position: relative;
}
/* Slide-in gradient underline on hover */
.main-header-menu .menu-item > a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--g-accent-strip);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms cubic-bezier(.22, 1, .36, 1);
}
.main-header-menu .menu-item:hover > a::after,
.main-header-menu .current-menu-item > a::after {
  transform: scaleX(1);
}
.main-header-menu .menu-item > a:hover,
.main-header-menu > li > a:hover {
  background: rgba(27, 54, 93, 0.06);  /* subtle navy tint */
  color: var(--mepso-primary) !important;
}
.main-header-menu .current-menu-item > a,
.main-header-menu .current-menu-ancestor > a {
  color: var(--mepso-primary) !important;
  background: rgba(27, 54, 93, 0.08);
  position: relative;
  font-weight: 600;
}
.main-header-menu .current-menu-item > a::after {
  content: none;  /* no gradient underline; rely on background tint */
}

/* Header refinement — compact navigation instead of tall active blocks. */
.ast-primary-header-bar,
.main-header-bar,
.site-header .main-header-bar {
  min-height: 82px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}
.site-logo-img img,
header .custom-logo-link img {
  width: auto !important;
  max-width: 170px !important;
}
.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item,
.main-header-menu .menu-item {
  line-height: 1.2 !important;
}
.main-header-menu .menu-item > a,
.main-header-menu > li > a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 2px;
  padding: 0 14px !important;
}
.main-header-menu .current-menu-item > a,
.main-header-menu .current-menu-ancestor > a {
  background: #F1F4F8;
  box-shadow: inset 0 0 0 1px rgba(211, 209, 203, 0.85);
}

/* ===================================================================
 * 8. Footer — light, not navy
 * =================================================================== */
.site-footer,
.site-footer .site-below-footer-wrap,
.site-footer .ast-builder-grid-row-container,
.site-footer .ast-builder-grid-row-container-inner,
.ast-footer-copyright,
.ast-builder-footer-grid-columns {
  /* QA item 8: footer must be ONE color end-to-end. Astra wraps the
   * footer in a row-container that defaults to a brand-blue band; we
   * need to flatten every wrapper to --surface-1 so the navy outer
   * strip the tester saw goes away. */
  background: var(--surface-1) !important;
  color: var(--text-muted) !important;
  box-shadow: none;
  position: relative;
}
.site-footer {
  border-top: 1px solid var(--border);
}
/* Mirror of the header accent strip */
.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--g-accent-strip);
}
.site-footer a,
.ast-footer-copyright a {
  color: var(--text-body);
  text-decoration-color: rgba(55, 53, 48, 0.3);
}
.site-footer a:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

/* Footer link list (the bottom-bar nav: Упатство / Услови / Политика
 * за приватност) — explicit black per client direction. Overrides the
 * --text-body cascade above and any Astra/Elementor rule that paints
 * footer menu links in a brand color. */
.site-footer .footer-bar-navigation a,
.site-footer .footer-bar-navigation .menu-link,
.site-footer #astra-footer-menu .menu-link {
  color: #000 !important;
}
.site-footer .footer-bar-navigation a:hover,
.site-footer .footer-bar-navigation .menu-link:hover,
.site-footer #astra-footer-menu .menu-link:hover {
  color: #000 !important;
  text-decoration-color: #000 !important;
}

.footer-widget-area h1,
.footer-widget-area h2,
.footer-widget-area h3,
.footer-widget-area h4 {
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.footer-widget-area h3::after {
  content: none;  /* no gradient accent bar */
}
.footer-widget-area ul {
  list-style: none;
  padding-left: 0;
}
.footer-widget-area ul li {
  padding: 3px 0;
  font-size: var(--fs-sm);
}

/* ===================================================================
 * 8b. Training video controls
 * =================================================================== */
.mepso-video-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 10px 0 22px;
  padding: 10px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.mepso-video-tools label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
}
.mepso-video-tools select {
  min-width: 86px;
  height: 36px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background-color: var(--surface-0);
  color: var(--text);
  font: inherit;
}
.mepso-video-rate-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-0);
}
.mepso-video-rate-buttons button {
  min-width: 48px;
  min-height: 32px;
  padding: 5px 10px;
  border: 0;
  border-radius: calc(var(--r-md) - 3px);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}
.mepso-video-rate-buttons button:hover,
.mepso-video-rate-buttons button:focus-visible,
.mepso-video-rate-buttons button.is-active {
  background: var(--mepso-primary);
  color: #fff;
}
.mepso-video-tools span {
  color: var(--text-muted);
}

/* Contact cards are interactive panels,
not decorative icon boxes. */
.mepso-contact-card-ready .elementor-widget-container,
.page-id-25074 .elementor-widget-icon-box .elementor-widget-container,
.page-id-26012 .elementor-widget-icon-box .elementor-widget-container,
.page-id-27540 .elementor-widget-icon-box .elementor-widget-container {
  cursor: pointer;
}
.mepso-contact-card-ready .elementor-icon-box-wrapper {
  height: 100%;
}
.mepso-contact-card-ready:focus-visible .elementor-widget-container {
  box-shadow: var(--focus);
}

/* ===================================================================
 * 9. Tables
 * =================================================================== */
table:not(.wp-block-table) {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--fs-sm);
}
table:not(.wp-block-table) th {
  background: var(--surface-1);
  color: var(--text);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
table:not(.wp-block-table) td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
}
table:not(.wp-block-table) tr:hover td {
  background: var(--surface-1);
}

/* ===================================================================
 * 10. Selection + content utilities
 * =================================================================== */
::selection {
  background: rgba(11, 110, 153, 0.2);
  color: var(--text);
}

/* Content-flow polish */
.entry-content a:not(.button):not(.wp-block-button__link):not(.ld-button):not(.btn):not([class*="elementor-button"]) {
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.entry-content img:not(.custom-logo):not([class*="wp-post-image"]):not(.emoji) {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.entry-content blockquote,
.wp-block-quote {
  border-left: 3px solid var(--border-strong);
  padding: var(--sp-2) var(--sp-4);
  margin: var(--sp-4) 0;
  color: var(--text-body);
  font-style: normal;
  font-size: var(--fs-md);
  background: transparent;
  border-radius: 0;
}
.entry-content blockquote cite {
  display: block;
  margin-top: var(--sp-2);
  font-style: normal;
  font-weight: 500;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* Scrollbar */
html {
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* ===================================================================
 * 10b. Branded hero treatment for Elementor top sections
 *
 * Any Elementor section configured with a background image gets
 * a navy→blue→teal gradient overlay so the hero
 * text reads clearly AND the page feels energetic rather than a
 * flat photograph. First .elementor-top-section on every page
 * qualifies; opt-out with .mepso-no-overlay on the section.
 * =================================================================== */
.elementor-section.elementor-top-section:first-of-type {
  position: relative;
  isolation: isolate;
  /* Cap hero height so a short title doesn't waste a viewport.
   * Most Elementor heroes have min-height tuned for a full page
   * design that MEPSO isn't using yet — shrink to a reasonable
   * header band. */
  min-height: 360px !important;
  /* Bumped from clamp(40px,4vw,72px) — under the prior values the
   * title text was straddling the boundary between the white Astra
   * header bar and the navy hero, causing the upper half of letters
   * to render white-on-white (the tester's "header is cut" report
   * 2026-05-12). Give the title clear breathing room below the
   * header and ensure the container vertically centers it. */
  padding-top: clamp(90px, 7vw, 130px) !important;
  padding-bottom: clamp(60px, 5vw, 90px) !important;
  display: flex !important;
  align-items: center !important;
}
/* Tester 2026-05-12: on a phone (5G screenshot) the hero title was
 * clipped at the top because the long Macedonian "Прва Онлајн Платформа
 * за Обуки за Информациска Безбедност" wrapped to 4–5 lines that
 * overran the 360px min-height. Bump min-height + padding-top so the
 * title has breathing room on narrow screens too. */
@media (max-width: 921px) {
  .elementor-section.elementor-top-section:first-of-type {
    min-height: 520px !important;
    padding-top: clamp(110px, 18vw, 160px) !important;
    padding-bottom: clamp(40px, 8vw, 70px) !important;
  }
}
@media (max-width: 540px) {
  .elementor-section.elementor-top-section:first-of-type {
    min-height: 580px !important;
    padding-top: clamp(130px, 22vw, 180px) !important;
  }
  .elementor-section.elementor-top-section:first-of-type h1,
  .elementor-section.elementor-top-section:first-of-type h2,
  .elementor-section.elementor-top-section:first-of-type .elementor-heading-title {
    /* Tighten the hero font on phones so a 6-word Cyrillic title
     * doesn't wrap to 5 lines and overflow the visible band. */
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    line-height: 1.2 !important;
  }
}

/* Tester 2026-05-12 (mobile): the Astra header "Login" / "Најава" /
 * "Hyrje" pill button was wrapping mid-word ("Најав / а") because
 * the header layout gives the right cluster a fixed width that's
 * too narrow for the longest locale. Force the button text to stay
 * on one line and let the button widen instead. */
.ld-login.ld-login-button,
.ld-login.ld-login-text.ld-login-button,
a.ld-login.ld-login-button,
.ast-builder-button-1 .ast-custom-button,
.header-button-1 a {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

body.ast-theme-transparent-header .site-header {
  position: relative !important;
  background: #fff !important;
}

.elementor-section.elementor-top-section:first-of-type:not(.mepso-no-overlay)::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Gentler overlay — the mesh at full saturation was darkening
   * page hero text to the point of drama-fatigue. 0.55 alpha
   * keeps the brand moment without making it overwhelming. */
  background: var(--g-brand);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}
@keyframes mepso-mesh-drift {
  from { background-position:   0%   0%; }
  to   { background-position: 100% 100%; }
}
.elementor-section.elementor-top-section:first-of-type > .elementor-container {
  position: relative;
  z-index: 1;
  /* When the section is display:flex (for vertical centering of
   * a short title), make sure the container still spans the
   * available width so the title isn't squished into a tiny pill. */
  width: 100%;
  align-self: center;
}
.elementor-section.elementor-top-section:first-of-type h1,
.elementor-section.elementor-top-section:first-of-type h2,
.elementor-section.elementor-top-section:first-of-type .elementor-heading-title {
  color: #fff !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
  letter-spacing: 0;
  font-weight: 700;
  /* Match the site's h1 scale — no over-amped hero font. */
  font-size: clamp(1.875rem, 1.2rem + 2vw, 3rem);
  line-height: 1.1;
  margin: 0;
}
.elementor-section.elementor-top-section:first-of-type p,
.elementor-section.elementor-top-section:first-of-type .elementor-widget-text-editor * {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 12px rgba(0, 20, 50, 0.25);
}

/* (Removed the decorative glowing rule under hero headings —
 *  it added motion-static noise without adding information.) */

/* ===================================================================
 * 10b2. Readable text inside Elementor sections with image or dark
 * backgrounds.
 *
 * Elementor stores image backgrounds in per-post CSS files, so the
 * reliable hint is the section's data-settings JSON. Only actual image
 * backgrounds and known dark background colours get white text. Solid
 * light sections keep normal text, which prevents white-card typography
 * drift across reused customer pages.
 *
 * Opt-out per section via .mepso-no-dim (add through Elementor's
 * Advanced → CSS Classes field). */
.elementor-section[data-settings*="background_image"] .elementor-widget-text-editor,
.elementor-section[data-settings*="background_image"] .elementor-widget-text-editor p,
.elementor-section[data-settings*="background_image"] .elementor-widget-text-editor li,
.elementor-section[data-settings*="background_image"] .elementor-widget-heading h1,
.elementor-section[data-settings*="background_image"] .elementor-widget-heading h2,
.elementor-section[data-settings*="background_image"] .elementor-widget-heading h3,
.elementor-section[data-settings*="background_image"] .elementor-widget-heading .elementor-heading-title,
.elementor-section[data-settings*="#212121"] .elementor-widget-text-editor,
.elementor-section[data-settings*="#212121"] .elementor-widget-text-editor p,
.elementor-section[data-settings*="#212121"] .elementor-widget-text-editor li,
.elementor-section[data-settings*="#212121"] .elementor-widget-heading h1,
.elementor-section[data-settings*="#212121"] .elementor-widget-heading h2,
.elementor-section[data-settings*="#212121"] .elementor-widget-heading h3,
.elementor-section[data-settings*="#212121"] .elementor-widget-heading .elementor-heading-title,
.elementor-section[data-settings*="#1B365D"] .elementor-widget-text-editor,
.elementor-section[data-settings*="#1B365D"] .elementor-widget-text-editor p,
.elementor-section[data-settings*="#1B365D"] .elementor-widget-text-editor li,
.elementor-section[data-settings*="#1B365D"] .elementor-widget-heading h1,
.elementor-section[data-settings*="#1B365D"] .elementor-widget-heading h2,
.elementor-section[data-settings*="#1B365D"] .elementor-widget-heading h3,
.elementor-section[data-settings*="#1B365D"] .elementor-widget-heading .elementor-heading-title,
.elementor-section.mepso-section-dark .elementor-widget-text-editor,
.elementor-section.mepso-section-dark .elementor-widget-text-editor p,
.elementor-section.mepso-section-dark .elementor-widget-text-editor li,
.elementor-section.mepso-section-dark .elementor-widget-heading h1,
.elementor-section.mepso-section-dark .elementor-widget-heading h2,
.elementor-section.mepso-section-dark .elementor-widget-heading h3,
.elementor-section.mepso-section-dark .elementor-widget-heading .elementor-heading-title {
  color: #fff !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}
/* Dim overlay on image-backed sections so photography + text read together */
.elementor-section[data-settings*="background_image"]:not(.mepso-no-dim):not(.elementor-top-section:first-of-type) {
  position: relative;
  isolation: isolate;
}
.elementor-section[data-settings*="background_image"]:not(.mepso-no-dim):not(.elementor-top-section:first-of-type)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
              rgba(10, 20, 40, 0.42) 0%,
              rgba(10, 20, 40, 0.62) 100%);
  pointer-events: none;
  z-index: 0;
}
.elementor-section[data-settings*="background_image"]:not(.mepso-no-dim):not(.elementor-top-section:first-of-type) > .elementor-container {
  position: relative;
  z-index: 1;
}

/* ===================================================================
 * 10b3. Page-hero text whitening
 *
 * Every MEPSO page's first top-level Elementor section is a dark
 * navy/blue hero strip (page title + sometimes a short tagline).
 * They use background_background:"classic" with the actual image
 * URL in the per-page elementor CSS file, so the §10b2
 * [data-settings*="background_image"] selector misses them.
 *
 * The hero text widgets vary across pages:
 *  - Homepage: image-box widget → .elementor-image-box-title /
 *              .elementor-image-box-description
 *  - Other pages: heading widget → h1.elementor-heading-title
 *  - Some: text-editor widget → p, li
 *
 * Set color on the SECTION itself (inherits to all descendants)
 * AND repeat targeted selectors with !important for child elements
 * Elementor or Astra paint with a higher-specificity rule.
 *
 * Opt-out via class `mepso-no-dim` on the section (Elementor >
 * Advanced > CSS Classes) for the rare light-themed hero.
 *
 * No extra ::before overlay — Elementor already renders
 * .elementor-background-overlay on these sections, which provides
 * the dim itself. Layering ours on top muddles the colour balance.
 * =================================================================== */
/* Nuclear option — universal selector + !important so nothing in the
 * cascade (Astra theme mods, per-page Elementor CSS, plugin styles)
 * can win against this. Hero is dark navy/blue on every page; white
 * is the only readable color. */
.elementor > .elementor-section.elementor-top-section:first-of-type:not(.mepso-no-dim),
.elementor > .elementor-section.elementor-top-section:first-of-type:not(.mepso-no-dim) * {
  color: #FFFFFF !important;
}
/* Restore button text colors — buttons in the hero often have
 * their own visible background color where white-on-white would
 * be invisible. */
.elementor > .elementor-section.elementor-top-section:first-of-type:not(.mepso-no-dim) .elementor-button,
.elementor > .elementor-section.elementor-top-section:first-of-type:not(.mepso-no-dim) .elementor-button * {
  color: #FFFFFF !important;
}

/* ===================================================================
 * 10c. Signature modern utilities
 * =================================================================== */

/* --- Section kicker ("EYEBROW LABEL") --------------------------
 * Small uppercase prelabel with a gradient dot, sits above h2.
 * Add .mepso-kicker to any <p> or <span> for this effect. */
.mepso-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--sp-3);
}
.mepso-kicker::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--g-brand);
  box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.12);
}

/* --- Pill tag utility -----------------------------------------
 * .mepso-tag renders as a small, rounded pill — for badges,
 * categories, "NEW" labels etc. */
.mepso-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  line-height: 1.5;
}
.mepso-tag--accent {
  color: #fff;
  background: var(--g-brand);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(27, 54, 93, 0.16);
}

/* --- Marquee strip ---------------------------------------------
 * Infinite scrolling brand strip. Wrap inline content in
 * .mepso-marquee > .mepso-marquee__track and duplicate content
 * inside the track so the seam is invisible. */
.mepso-marquee {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.mepso-marquee__track {
  display: inline-flex;
  gap: var(--sp-10);
  padding: var(--sp-3) 0;
  white-space: nowrap;
  animation: mepso-marquee 32s linear infinite;
  will-change: transform;
}
@keyframes mepso-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.mepso-marquee__item {
  font-family: var(--mepso-font-sans);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-4);
}
.mepso-marquee__item::after {
  content: "✦";
  color: transparent;
  background: var(--g-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Section rhythm (opt-in, not auto) ------------------------
 * Add .mepso-alt-surface to any Elementor section you want tinted.
 * Auto-applying to every even section was making sparse pages feel
 * heavy. */
.elementor-section.mepso-alt-surface {
  background-color: var(--surface-1);
}

/* --- Tighten Elementor section padding ------------------------
 * The prior-customer theme set big top/bottom padding on every
 * section, which left huge blank space on MEPSO's shorter pages.
 * Override with a tighter default; individual sections can still
 * claim more via Elementor's spacing controls. */
.elementor-section.elementor-top-section:not(:first-of-type) {
  padding-top: clamp(32px, 3vw, 56px) !important;
  padding-bottom: clamp(32px, 3vw, 56px) !important;
}

/* --- Decorative gradient divider -------------------------------
 * Between two sections, drop <div class="mepso-divider"></div>
 * for a thin animated gradient rule. */
.mepso-divider {
  height: 2px;
  max-width: 960px;
  margin: var(--sp-12) auto;
  background: var(--g-accent-strip);
  background-size: 220% 100%;
  border-radius: 2px;
  animation: mepso-shimmer 8s ease-in-out infinite alternate;
  opacity: 0.75;
}

/* --- Floating scroll-top button --------------------------------
 * Appears as a small pulsing CTA in the bottom-right corner.
 * Anchor: <a href="#top" class="mepso-scroll-top" aria-label="Top">↑</a>
 * Can be injected via inc/branding.php if desired. */
.mepso-scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  width: 52px; height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(25, 25, 24, 0.9);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 20px;
  font-weight: 700;
  box-shadow:
    0 1px 2px rgba(15, 15, 15, 0.14),
    0 10px 22px rgba(15, 15, 15, 0.18);
  transition: transform 200ms ease, box-shadow 200ms ease;
  isolation: isolate;
}
.mepso-scroll-top:hover {
  transform: translateY(-3px);
  box-shadow:
    0 2px 4px rgba(15, 15, 15, 0.18),
    0 14px 28px rgba(15, 15, 15, 0.22);
}
.mepso-scroll-top::before {
  content: none;
}

/* ===================================================================
 * 10d. Scroll-reveal + tilt + dark section — modern motion layer
 *
 * Actual scroll observer + pointer-move tilt live in mepso.js.
 * This CSS provides:
 *   - the resting (offset + faded) state for .mepso-reveal
 *   - the transition to visible
 *   - the transform vars for .mepso-tilt-ready
 *   - the dark-section variant for sections with .mepso-section-dark
 *   - auto-numbering via counter() on sections tagged .mepso-numbered
 * =================================================================== */

/* Reveal resting state */
.mepso-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 620ms cubic-bezier(.22, 1, .36, 1) var(--mepso-reveal-delay, 0ms),
    transform 620ms cubic-bezier(.22, 1, .36, 1) var(--mepso-reveal-delay, 0ms);
  will-change: opacity, transform;
}
.mepso-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Tilt ready — sets up 3D context + the variables JS updates */
.mepso-tilt-ready {
  transform-style: preserve-3d;
  transform: perspective(900px)
             rotateX(var(--mepso-tilt-x, 0deg))
             rotateY(var(--mepso-tilt-y, 0deg));
  transition: transform 180ms ease-out;
}
/* Thin shine layer that follows the cursor on tilt-able cards */
.mepso-tilt-ready::after {
  pointer-events: none;
}
.ld_course_grid.mepso-tilt-ready:hover::after {
  /* Our ::after is already used for the gradient border — keep that.
   * The card translate-up is enough on hover. */
}

/* Dark section variant — for dramatic rhythm. Apply
 * .mepso-section-dark to any .elementor-section (via Elementor's
 * advanced CSS classes field) OR to a plain <section>. Inverts text,
 * amplifies gradients. */
.mepso-section-dark,
.elementor-section.mepso-section-dark {
  background: var(--g-mesh);
  background-size: 200% 200%;
  color: #fff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: mepso-mesh-drift 20s ease-in-out infinite alternate;
}
.mepso-section-dark *:not(a):not([class*="elementor-button"]) {
  color: inherit;
}
.mepso-section-dark h1,
.mepso-section-dark h2,
.mepso-section-dark h3,
.mepso-section-dark .entry-title,
.mepso-section-dark .elementor-heading-title {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: none;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.28);
}
.mepso-section-dark p,
.mepso-section-dark li {
  color: rgba(255, 255, 255, 0.82);
}
.mepso-section-dark a:not(.ast-button):not(.wp-block-button__link):not(.button) {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

/* Auto-numbered sections — "01", "02" in top-left corner. Wrap
 * related sections in a common ancestor with .mepso-numbered-group
 * (or just tag each section with .mepso-numbered). */
.mepso-numbered-group {
  counter-reset: mepso-n;
}
.mepso-numbered-group .mepso-numbered::before,
.mepso-numbered::before {
  counter-increment: mepso-n;
  content: counter(mepso-n, decimal-leading-zero);
  position: absolute;
  top: 24px;
  left: 24px;
  font-family: var(--mepso-font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-muted);
  z-index: 2;
}
.mepso-numbered {
  position: relative;
}

/* ===================================================================
 * 10e. Site-wide Elementor polish
 * =================================================================== */

.site-content,
.ast-separate-container .site-content {
  background:
    linear-gradient(180deg, var(--surface-0) 0%, var(--surface-1) 100%);
}

.entry-content {
  color: var(--text-body);
}

.entry-content .elementor-section.elementor-top-section:not(:first-of-type) {
  border-top: 1px solid rgba(227, 226, 222, 0.55);
}

.entry-content .elementor-section.elementor-top-section:not(:first-of-type):first-child,
.entry-content .elementor-section.mepso-section-dark,
.entry-content .elementor-section.elementor-element-um1uijf,
.entry-content .elementor-section.elementor-element-32cc8b1e,
.entry-content .elementor-section[data-settings*="background_image"] {
  border-top: 0;
}

.entry-content .elementor-container {
  width: min(100%, 1160px);
}

.elementor-widget-heading .elementor-heading-title,
.elementor-widget-image-box .elementor-image-box-title,
.elementor-widget-icon-box .elementor-icon-box-title {
  font-family: var(--mepso-font-sans);
  letter-spacing: 0;
  line-height: 1.2;
}

.elementor-section:not(.mepso-section-dark):not([data-settings*="background_image"]):not([data-settings*="#212121"]):not([data-settings*="#1B365D"])
  .elementor-widget-heading .elementor-heading-title,
.elementor-section:not(.mepso-section-dark):not([data-settings*="background_image"]):not([data-settings*="#212121"]):not([data-settings*="#1B365D"])
  .elementor-widget-image-box .elementor-image-box-title,
.elementor-section:not(.mepso-section-dark):not([data-settings*="background_image"]):not([data-settings*="#212121"]):not([data-settings*="#1B365D"])
  .elementor-widget-icon-box .elementor-icon-box-title {
  color: var(--text) !important;
  text-shadow: none !important;
}

.elementor-widget-text-editor,
.elementor-widget-text-editor p,
.elementor-widget-text-editor li,
.elementor-widget-image-box .elementor-image-box-description,
.elementor-widget-icon-box .elementor-icon-box-description,
.elementor-tab-content,
.elementor-accordion .elementor-tab-content {
  font-family: var(--mepso-font-sans);
  font-size: var(--fs-md);
  line-height: 1.72;
}

.elementor-section:not(.mepso-section-dark):not([data-settings*="background_image"]):not([data-settings*="#212121"]):not([data-settings*="#1B365D"])
  .elementor-widget-text-editor,
.elementor-section:not(.mepso-section-dark):not([data-settings*="background_image"]):not([data-settings*="#212121"]):not([data-settings*="#1B365D"])
  .elementor-widget-text-editor p,
.elementor-section:not(.mepso-section-dark):not([data-settings*="background_image"]):not([data-settings*="#212121"]):not([data-settings*="#1B365D"])
  .elementor-widget-text-editor li,
.elementor-section:not(.mepso-section-dark):not([data-settings*="background_image"]):not([data-settings*="#212121"]):not([data-settings*="#1B365D"])
  .elementor-widget-image-box .elementor-image-box-description,
.elementor-section:not(.mepso-section-dark):not([data-settings*="background_image"]):not([data-settings*="#212121"]):not([data-settings*="#1B365D"])
  .elementor-widget-icon-box .elementor-icon-box-description,
.elementor-section:not(.mepso-section-dark):not([data-settings*="background_image"]):not([data-settings*="#212121"]):not([data-settings*="#1B365D"])
  .elementor-tab-content {
  color: var(--text-body) !important;
  text-shadow: none !important;
}

.elementor-widget-text-editor p:last-child,
.elementor-tab-content p:last-child {
  margin-bottom: 0;
}

.elementor-widget-icon-box .elementor-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: rgba(0, 102, 179, 0.08);
  color: var(--mepso-primary);
}

.elementor-widget-icon-box .elementor-icon svg,
.elementor-widget-icon-box .elementor-icon i {
  width: 1em;
  height: 1em;
}

.elementor-widget-image img {
  border-radius: var(--r-md);
  border: 1px solid rgba(227, 226, 222, 0.85);
  box-shadow:
    0 1px 2px rgba(15, 15, 15, 0.04),
    0 12px 26px rgba(15, 15, 15, 0.07);
}

.elementor-section.elementor-top-section:first-of-type .elementor-widget-image img,
.elementor-section.mepso-section-dark .elementor-widget-image img {
  border-color: transparent;
}

.elementor-accordion .elementor-accordion-item {
  margin-bottom: var(--sp-3);
  overflow: hidden;
  background: var(--surface-0);
  border: 1px solid var(--border) !important;
  border-radius: var(--r-md);
}

.elementor-accordion .elementor-tab-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 56px;
  padding: var(--sp-4) var(--sp-5) !important;
  color: var(--text) !important;
  font-family: var(--mepso-font-sans);
  font-size: var(--fs-md);
  font-weight: 650;
  line-height: 1.35;
  background: var(--surface-0);
  border: 0 !important;
  transition: background 140ms ease, color 140ms ease;
}

.elementor-accordion .elementor-tab-title:hover,
.elementor-accordion .elementor-tab-title.elementor-active {
  background: var(--surface-1);
  color: var(--mepso-primary) !important;
}

.elementor-accordion .elementor-tab-content {
  padding: 0 var(--sp-5) var(--sp-5) !important;
  border-top: 0 !important;
  color: var(--text-body) !important;
  background: var(--surface-0);
}

.wpforms-container {
  margin: var(--sp-4) 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow:
    0 1px 2px rgba(15, 15, 15, 0.04),
    0 16px 32px rgba(15, 15, 15, 0.06);
}

.wpforms-container .wpforms-field {
  padding: var(--sp-2) 0 var(--sp-4);
}

.wpforms-container .wpforms-field-label,
.wpforms-container .wpforms-field-sublabel {
  font-family: var(--mepso-font-sans);
  color: var(--text);
  letter-spacing: 0;
}

.wpforms-container textarea {
  min-height: 140px;
  resize: vertical;
}

.wpforms-container button[type="submit"],
.wpforms-container input[type="submit"] {
  min-height: 46px;
}

.elementor-section.elementor-element-um1uijf,
.elementor-section.elementor-element-32cc8b1e {
  color: #fff;
}

.elementor-section.elementor-element-um1uijf .elementor-widget-text-editor,
.elementor-section.elementor-element-um1uijf .elementor-widget-text-editor p,
.elementor-section.elementor-element-um1uijf .elementor-widget-text-editor li,
.elementor-section.elementor-element-um1uijf .elementor-widget-heading h1,
.elementor-section.elementor-element-um1uijf .elementor-widget-heading h2,
.elementor-section.elementor-element-um1uijf .elementor-widget-heading h3,
.elementor-section.elementor-element-um1uijf .elementor-widget-heading .elementor-heading-title,
.elementor-section.elementor-element-32cc8b1e .elementor-widget-text-editor,
.elementor-section.elementor-element-32cc8b1e .elementor-widget-text-editor p,
.elementor-section.elementor-element-32cc8b1e .elementor-widget-text-editor li,
.elementor-section.elementor-element-32cc8b1e .elementor-widget-heading h1,
.elementor-section.elementor-element-32cc8b1e .elementor-widget-heading h2,
.elementor-section.elementor-element-32cc8b1e .elementor-widget-heading h3,
.elementor-section.elementor-element-32cc8b1e .elementor-widget-heading .elementor-heading-title {
  color: #fff !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.38) !important;
}

/* Screenshot-driven refinements: force the legacy Elementor hero and
 * dark content sections to read cleanly after Elementor's own CSS. */
.elementor-section.elementor-top-section:first-of-type:not(.mepso-no-overlay)::before {
  background: linear-gradient(90deg,
    rgba(11, 30, 61, 0.92) 0%,
    rgba(0, 102, 179, 0.8) 56%,
    rgba(15, 123, 108, 0.72) 100%);
  opacity: 0.96;
}

.elementor-section.elementor-top-section:first-of-type .elementor-widget-heading .elementor-heading-title,
.elementor-section.elementor-top-section:first-of-type .elementor-widget-image-box .elementor-image-box-title,
.elementor-section.elementor-top-section:first-of-type .elementor-widget-image-box .elementor-image-box-description,
.elementor-section.elementor-top-section:first-of-type .elementor-widget-icon-box .elementor-icon-box-title,
.elementor-section.elementor-top-section:first-of-type .elementor-widget-icon-box .elementor-icon-box-description,
.elementor-section.elementor-top-section:first-of-type .elementor-widget-text-editor,
.elementor-section.elementor-top-section:first-of-type .elementor-widget-text-editor p {
  color: #fff !important;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.34) !important;
}

.elementor-section.elementor-top-section:first-of-type .elementor-widget-image-box .elementor-image-box-title,
.elementor-section.elementor-top-section:first-of-type .elementor-widget-heading .elementor-heading-title {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 800 !important;
  line-height: 1.08 !important;
}

.elementor-section.elementor-top-section:first-of-type .elementor-widget-image-box .elementor-image-box-description,
.elementor-section.elementor-top-section:first-of-type .elementor-widget-text-editor p {
  max-width: 720px;
  margin: var(--sp-4) auto 0 !important;
  font-size: var(--fs-lg) !important;
  line-height: 1.65 !important;
}

.elementor-section.elementor-element-um1uijf {
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #151A20 0%, #202D36 100%) !important;
}
.elementor-section.elementor-element-um1uijf::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(8, 16, 30, 0.7) 0%,
    rgba(8, 16, 30, 0.5) 48%,
    rgba(15, 123, 108, 0.22) 100%);
  pointer-events: none;
  z-index: 0;
}
.elementor-section.elementor-element-um1uijf > .elementor-container {
  position: relative;
  z-index: 1;
}
.elementor-section.elementor-element-um1uijf *:not(a):not(.elementor-button) {
  color: #fff !important;
}
.elementor-section.elementor-element-um1uijf .elementor-widget-text-editor p {
  color: rgba(255, 255, 255, 0.84) !important;
  text-shadow: none !important;
}

.elementor-widget-button .elementor-button,
.elementor-widget-button .elementor-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px !important;
  border: 0 !important;
  border-radius: var(--r-md) !important;
  background: var(--g-brand) !important;
  color: #fff !important;
  font-family: var(--mepso-font-sans);
  font-size: var(--fs-sm) !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow:
    0 1px 2px rgba(27, 54, 93, 0.18),
    0 8px 18px rgba(27, 54, 93, 0.18) !important;
}
.elementor-widget-button .elementor-button:hover,
.elementor-widget-button .elementor-button:focus {
  transform: translateY(-1px);
  color: #fff !important;
  background: var(--g-brand-h) !important;
  box-shadow:
    0 2px 4px rgba(27, 54, 93, 0.2),
    0 12px 24px rgba(27, 54, 93, 0.22) !important;
}

.mepso-home-about-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-5);
}

.mepso-home-about-cta,
.mepso-home-about-cta:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: var(--r-md);
  background: #fff;
  color: var(--mepso-primary) !important;
  -webkit-text-fill-color: var(--mepso-primary) !important;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(8, 16, 30, 0.18);
}

.mepso-home-about-cta:hover,
.mepso-home-about-cta:focus {
  color: var(--mepso-primary) !important;
  -webkit-text-fill-color: var(--mepso-primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(8, 16, 30, 0.22);
}

.elementor-section.elementor-top-section:first-of-type .mepso-home-about-cta,
.elementor-section.elementor-top-section:first-of-type .mepso-home-about-cta:visited,
.elementor-section.elementor-top-section:first-of-type .mepso-home-about-cta:hover,
.elementor-section.elementor-top-section:first-of-type .mepso-home-about-cta:focus {
  color: var(--mepso-primary) !important;
  -webkit-text-fill-color: var(--mepso-primary) !important;
  text-shadow: none !important;
}

.elementor-element-5b4952c1 .elementor-column > .elementor-element-populated,
.elementor-element-7748ec6b .elementor-column > .elementor-element-populated {
  min-height: 220px !important;
  padding: 28px 24px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(227, 226, 222, 0.9);
  border-radius: var(--r-lg);
  box-shadow:
    0 1px 2px rgba(15, 15, 15, 0.04),
    0 16px 32px rgba(27, 54, 93, 0.08) !important;
}
.elementor-element-5b4952c1 .elementor-widget-icon-box .elementor-icon-box-title,
.elementor-element-7748ec6b .elementor-widget-icon-box .elementor-icon-box-title {
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
  font-size: var(--fs-lg) !important;
  line-height: 1.25 !important;
}
.elementor-element-7748ec6b .elementor-column > .elementor-element-populated {
  min-height: 240px !important;
}.page-id-25073 .elementor-element-e6d3c76,
.page-id-25073 .elementor-element-715ce554,
.page-id-27542 .elementor-element-e6d3c76,
.page-id-27504 .elementor-element-e6d3c76,
.page-id-27542 .elementor-element-715ce554,
.page-id-27504 .elementor-element-715ce554 {
  min-height: 0 !important;
  padding-top: 48px !important;
  padding-bottom: 56px !important;
}

@media (max-width: 921px) {
  .main-header-menu .menu-item > a,
  .main-header-menu > li > a {
    padding: 12px 14px !important;
  }

  .entry-content .elementor-section.elementor-top-section:not(:first-of-type) {
    border-top-color: rgba(227, 226, 222, 0.7);
  }
}

@media (max-width: 767px) {
  h1,
  .entry-title {
    font-size: clamp(2rem, 1.6rem + 4vw, 2.75rem);
    line-height: 1.08;
  }

  .elementor-section.elementor-top-section:first-of-type {
    min-height: clamp(360px, 74vh, 520px) !important;
    padding-top: clamp(118px, 28vw, 170px) !important;
    padding-bottom: clamp(64px, 16vw, 96px) !important;
  }

  .elementor-section.elementor-top-section:first-of-type h1,
  .elementor-section.elementor-top-section:first-of-type h2,
  .elementor-section.elementor-top-section:first-of-type .elementor-heading-title {
    max-width: 240px !important;
    font-size: clamp(1.45rem, 5vw, 2rem) !important;
    line-height: 1.16 !important;
    overflow-wrap: break-word !important;
  }

  .elementor-section.elementor-top-section:first-of-type > .elementor-container,
  .elementor-section.elementor-top-section:first-of-type .elementor-column,
  .elementor-section.elementor-top-section:first-of-type .elementor-widget-wrap {
    min-height: 0 !important;
  }

  .elementor-section.elementor-top-section:first-of-type > .elementor-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .elementor-element-5b4952c1,
  .elementor-element-7748ec6b {
    margin-top: 0 !important;
  }

  .elementor-section.elementor-top-section:first-of-type .elementor-widget-text-editor,
  .elementor-section.elementor-top-section:first-of-type .elementor-widget-text-editor p,
  .elementor-section.elementor-top-section:first-of-type .elementor-widget-image-box .elementor-image-box-description {
    width: 190px !important;
    max-width: 190px !important;
    font-size: 1rem !important;
    line-height: 1.55 !important;
  }

  .wpforms-container {
    padding: var(--sp-5);
  }

  .mepso-scroll-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .site-header .ast-container,
  .site-header .site-primary-header-wrap {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    column-gap: 8px !important;
  }

  .site-header-section {
    min-width: 0 !important;
  }

  .site-header .site-logo-img img,
  .site-header .custom-logo-link img {
    max-width: 128px !important;
    height: auto !important;
  }

  .ast-mobile-header-wrap .site-header-primary-section-right {
    flex: 0 0 auto !important;
    gap: 6px !important;
    max-width: calc(100% - 140px) !important;
  }

  .ast-mobile-header-wrap .header-widget-area,
  .ast-mobile-header-wrap .ast-builder-layout-element,
  .ast-mobile-header-wrap .ast-button-wrap {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .ast-mobile-header-wrap .menu-toggle {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
  }

  .ast-builder-button-1 .ast-custom-button,
  .header-button-1 a,
  .ld-login.ld-login-button,
  a.ld-login.ld-login-button {
    min-width: 0 !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
  }

  .elementor-section.elementor-top-section:first-of-type .elementor-heading-title {
    max-width: calc(100vw - 70px) !important;
    font-size: clamp(1.45rem, 6vw, 1.75rem) !important;
    line-height: 1.16 !important;
    overflow-wrap: break-word !important;
    text-wrap: balance;
  }

  .elementor-section.elementor-top-section:first-of-type .elementor-widget-text-editor,
  .elementor-section.elementor-top-section:first-of-type .elementor-widget-text-editor p {
    max-width: calc(100vw - 44px) !important;
    font-size: 1rem !important;
    line-height: 1.55 !important;
  }
}

/* About page intro card: the first paragraph is an Elementor image-box
 * description, while the following paragraphs are a text-editor widget.
 * Keep them visually unified. */
.page-id-25069 .elementor-element-d72c8c8 .elementor-widget-container,
.page-id-25069 .elementor-element-d72c8c8 .elementor-image-box-wrapper,
.page-id-25069 .elementor-element-d72c8c8 .elementor-image-box-content,
.page-id-25069 .elementor-element-d72c8c8 .elementor-image-box-description,
.page-id-25069 .elementor-element-d72c8c8 .elementor-widget-text-editor,
.page-id-25069 .elementor-element-d72c8c8 .elementor-widget-text-editor .elementor-widget-container,
.page-id-25069 .elementor-element-d72c8c8 .elementor-widget-text-editor p,
.page-id-25069 .elementor-element-d72c8c8 .elementor-widget-text-editor span,
.page-id-27539 .elementor-element-d72c8c8 .elementor-widget-container,
.page-id-27539 .elementor-element-d72c8c8 .elementor-image-box-wrapper,
.page-id-27539 .elementor-element-d72c8c8 .elementor-image-box-content,
.page-id-27539 .elementor-element-d72c8c8 .elementor-image-box-description,
.page-id-27539 .elementor-element-d72c8c8 .elementor-widget-text-editor,
.page-id-27539 .elementor-element-d72c8c8 .elementor-widget-text-editor .elementor-widget-container,
.page-id-27539 .elementor-element-d72c8c8 .elementor-widget-text-editor p,
.page-id-27539 .elementor-element-d72c8c8 .elementor-widget-text-editor span {
  font-family: var(--mepso-font-sans) !important;
  font-size: var(--fs-md) !important;
  font-weight: 400 !important;
  line-height: 1.75 !important;
  color: var(--text-body) !important;
  letter-spacing: 0 !important;
}

.page-id-25069 .elementor-element-d72c8c8 .elementor-image-box-title,
.page-id-27539 .elementor-element-d72c8c8 .elementor-image-box-title {
  font-family: var(--mepso-font-sans) !important;
  color: var(--text) !important;
  font-size: var(--fs-2xl) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

.page-id-25069 .elementor-element-d72c8c8 .elementor-image-box-description,
.page-id-25069 .elementor-element-d72c8c8 .elementor-widget-text-editor p,
.page-id-27539 .elementor-element-d72c8c8 .elementor-image-box-description,
.page-id-27539 .elementor-element-d72c8c8 .elementor-widget-text-editor p {
  margin: 0 0 var(--sp-4) !important;
}

.page-id-25069 .elementor-element-d72c8c8 .elementor-widget-text-editor p:last-child,
.page-id-27539 .elementor-element-d72c8c8 .elementor-widget-text-editor p:last-child {
  margin-bottom: 0 !important;
}

/* ===================================================================
 * 11. Reduced motion preference
 * =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===================================================================
 * 11b. QA round 2 fixes (May 7 tester pass)
 *
 * Each rule names the QA item it addresses so future devs / a future
 * customer can find them by tester complaint.
 * =================================================================== */

/* QA #4 — Search button: bigger, brand-blue (match adjacent buttons),
 * not a tiny circle. Targets both the Astra search submit and the
 * inline LearnDash course-search variant. */
.ld-course-list-actions .ld-icon-search,
.elementor-search-form__submit,
.search-submit,
.ast-search-icon .ast-icon,
button.search-submit {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px !important;
  background: var(--mepso-secondary) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: var(--r-md) !important;
  font-size: var(--fs-md) !important;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease;
}
.ld-course-list-actions .ld-icon-search:hover,
.elementor-search-form__submit:hover,
.search-submit:hover,
.ast-search-icon .ast-icon:hover,
button.search-submit:hover {
  background: var(--mepso-primary) !important;
  transform: translateY(-1px);
}
/* Make the icon glyph inside larger if present */
.ld-course-list-actions .ld-icon-search svg,
.elementor-search-form__submit svg,
.search-submit svg {
  width: 18px !important;
  height: 18px !important;
}

/* QA #7 — Course progress visibility: the "0% ЗАВРШЕНО" / progress
 * label is rendered in a low-contrast accent. Bump weight + use a
 * dark-on-light palette so it reads against light card backgrounds. */
.ld_course_grid .ld-course-list-progress-label,
.ld_course_grid .ld-progress-percentage,
.ld_course_grid .ld-progress-stats,
.ld_course_grid .ld-status,
.ld-course-list-items .ld-progress-percentage,
.ld-course-list-items .ld-progress-stats {
  color: var(--text) !important;
  font-weight: 700 !important;
  font-size: var(--fs-sm) !important;
}

/* QA-tester (May 9) — "0% ЗАВРШЕНО" pill on course cards is left-
 * aligned flush against the card edge. Center the pill text + give
 * it consistent padding so it visually balances with the centered
 * "Види повеќе…" / "View more…" button above it. */
.ld_course_grid .ld-status,
.ld-course-list-items .ld-status,
.ld-course-list-content .ld-status {
  display: block !important;
  text-align: center !important;
  padding: 8px 16px !important;
  border-radius: 999px !important;
  background: var(--surface-2) !important;
  margin: 0 auto !important;
}

/* QA #25 — About Us "Our Team" cards: equal-height, regardless of
 * which member's bio is longer. Stretch the card column + lay the
 * inner card out as a flex column so the image stays on top and the
 * bio block expands to fill. Astra/Elementor cards land here. */
.elementor-widget-container .elementor-image-box-wrapper,
.elementor-widget-team-member .elementor-team-member-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.elementor-section .elementor-row,
.elementor-section .elementor-container {
  align-items: stretch;
}
.elementor-column .elementor-element-populated {
  height: 100%;
}

/* QA #30 — "Моментален Статус" status pill is unreadable (white-on-
 * light-blue or similar low-contrast). Force a high-contrast pill:
 * brand navy bg, white text, pill radius. Targets the LD30 course
 * status indicator. */
.ld-course-status .ld-course-status-content .ld-course-status-action .ld-button,
.ld-course-status .ld-course-status-content .ld-course-status-action a,
.learndash-wrapper .ld-status,
.learndash-wrapper .ld-status-icon-mark-complete,
.ld-course-status-content .ld-course-status-segment.ld-course-status-seg-status .ld-status {
  background: var(--mepso-primary) !important;
  color: #fff !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  font-weight: 600;
  display: inline-block;
}

/* QA #32 — Check icon ✔ is overlapping the word "ЗАВРШЕНО" in the
 * course-progress header strip. Spacing fix: give the percentage +
 * label a horizontal gap; if the check is positioned absolutely,
 * push the text to the right of it. */
.learndash-wrapper .ld-progress-bar,
.learndash-wrapper .ld-progress-stats,
.learndash-wrapper .ld-progress-percentage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.learndash-wrapper .ld-status-icon-mark-complete,
.learndash-wrapper .ld-progress-percentage::before {
  margin-right: 6px;
}
/* Direct fix for the cases where the LD30 template prints a percent
 * with a checkmark glyph immediately before the word: introduce a
 * small inline-block gap. */
.ld-course-list-items .ld-status-icon,
.learndash-wrapper .ld-status-icon {
  margin-right: 8px !important;
  vertical-align: middle;
}

.learndash-wrapper .ld-status .ld-icon,
.learndash-wrapper .ld-alert .ld-icon,
.learndash-wrapper .ld-progress-percentage .ld-icon {
  flex: 0 0 auto;
  margin-right: 6px !important;
}

.learndash-wrapper .ld-item-list .ld-alert,
.learndash-wrapper .ld-profile .ld-alert {
  overflow: visible !important;
}

/* ===================================================================
 * 11c. QA round 3 fixes (multilingual/course polish)
 * =================================================================== */

.mepso-course-grid-en {
  --mepso-card-gap: clamp(18px, 2.2vw, 32px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--mepso-card-gap);
  width: min(1120px, calc(100% - 32px));
  margin: clamp(28px, 5vw, 56px) auto;
}

.mepso-course-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  background: #fff;
  border: 1px solid rgba(27, 54, 93, 0.12);
  border-top: 5px solid var(--mepso-secondary);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.mepso-course-card__image-link {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eef4fb;
}

.mepso-course-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.mepso-course-card:hover .mepso-course-card__image {
  transform: scale(1.03);
}

.mepso-course-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sp-4);
  padding: clamp(18px, 2vw, 24px);
}

.mepso-course-card__title {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.3;
  letter-spacing: 0;
}

.mepso-course-card__title a {
  color: var(--text) !important;
  text-decoration: none;
}

.mepso-course-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  padding: 10px 18px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--mepso-primary), var(--mepso-secondary));
  border-radius: var(--r-md);
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(0, 102, 179, 0.18);
}

.mepso-course-card__button:hover {
  background: var(--mepso-primary);
}

/* QA-4 #23: ENROLLED badge + progress bar on EN course grid so the
 * EN view parallels the MK view. */
.mepso-course-card {
  position: relative;
}
.mepso-course-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  background: var(--accent-green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: var(--r-sm);
  text-transform: uppercase;
}
.mepso-course-card__progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  margin-top: var(--sp-3);
  overflow: hidden;
}
.mepso-course-card__progress-bar {
  height: 100%;
  background: var(--g-brand);
  transition: width 240ms ease;
  min-width: 1px;
}
.mepso-course-card__progress-label {
  margin-top: var(--sp-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-green);
  text-transform: uppercase;
}

.mepso-lang-fallback > a {
  font-weight: 700;
}

/* QA follow-up — homepage dark training section text must use one
 * readable color. Keep this near the end of the file so it wins over
 * Elementor's per-widget color rules and older semi-transparent text. */
body .entry-content .elementor-section.elementor-element-um1uijf,
body .entry-content .elementor-section.elementor-element-um1uijf h1,
body .entry-content .elementor-section.elementor-element-um1uijf h2,
body .entry-content .elementor-section.elementor-element-um1uijf h3,
body .entry-content .elementor-section.elementor-element-um1uijf p,
body .entry-content .elementor-section.elementor-element-um1uijf span,
body .entry-content .elementor-section.elementor-element-um1uijf li,
body .entry-content .elementor-section.elementor-element-um1uijf .elementor-heading-title,
body .entry-content .elementor-section.elementor-element-um1uijf .elementor-widget-container,
body .entry-content .elementor-section.elementor-element-um1uijf .elementor-widget-text-editor {
  color: #fff !important;
}

@media (max-width: 920px) {
  .mepso-course-grid-en {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .mepso-course-grid-en {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
 * 11d. Sticky footer (QA items 9, 11, 12, 19)
 *
 * Short pages (Edit Profile when not logged in, Privacy Policy with
 * minimal content, "page not found" fallbacks) leave a big gap of
 * white space between the page content and the footer because the
 * footer is positioned in normal document flow and the content
 * doesn't fill the viewport.
 *
 * Make Astra's #page wrapper a flex column at full viewport height,
 * and let #content grow to fill the slack. Footer sticks to the
 * bottom of the viewport even on short pages.
 *
 * Astra theme structure:
 *   <body>
 *     <div id="page" class="hfeed site">
 *       <header class="site-header">
 *       <div id="content" class="site-content">    <-- expands
 *       <footer class="site-footer">              <-- pinned bottom
 * =================================================================== */
#page.hfeed.site,
.ast-page-builder-template #page,
.ast-no-sidebar #page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#page > #content,
#page > .site-content,
.ast-page-builder-template #page > #content,
.ast-page-builder-template #page > .site-content {
  flex: 1 0 auto;
}
#page > .site-header,
#page > .site-footer {
  flex-shrink: 0;
}

/* Profile Builder pages render their wrapper inside #content; if its
 * own height is smaller than the available slack, give it a min-height
 * so its background carries to the page bottom. */
.ast-no-sidebar #content > .ast-container,
.ast-page-builder-template #content > .ast-container {
  min-height: 1px;
}

/* ===================================================================
 * 11e. Accordion polish (QA item 16)
 *
 * Two complaints: (1) only one question can be open at a time;
 * (2) the open/close transition is abrupt.
 *
 * Elementor's accordion default is "single open" with no animation
 * on the .elementor-tab-content height. We add a smooth max-height
 * transition + override the JS-driven display toggle so the active
 * tab content animates in. The "multi-open" behavior is a separate
 * setting that needs a JS hook in mepso.js — done there.
 * =================================================================== */
.elementor-accordion .elementor-tab-content,
.elementor-toggle .elementor-tab-content {
  display: none;
  overflow: hidden;
  transition: opacity 220ms ease-in-out;
}
.elementor-accordion .elementor-tab-title,
.elementor-toggle .elementor-tab-title {
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
  /* QA-5 ringtest: force a deterministic flex layout so the FIRST
   * tab doesn't pick up extra leading whitespace from inheritance.
   * Pre-existing per-tab padding from Elementor's per-page CSS
   * varies between the first tab and the rest — pinning to flex
   * with explicit gaps removes that variance. */
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 14px 16px !important;
}
.elementor-accordion .elementor-tab-title .elementor-accordion-icon,
.elementor-toggle .elementor-tab-title .elementor-accordion-icon {
  flex-shrink: 0;
  width: 24px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  transition: transform 220ms ease-in-out;
}
.elementor-accordion .elementor-tab-title .elementor-accordion-title,
.elementor-toggle .elementor-tab-title .elementor-accordion-title {
  flex: 1;
  margin: 0 !important;
  padding: 0 !important;
  text-decoration: none;
}
.elementor-accordion .elementor-tab-title.elementor-active,
.elementor-toggle .elementor-tab-title.elementor-active {
  background-color: rgba(0, 102, 179, 0.04);
}
.elementor-accordion .elementor-tab-title.elementor-active .elementor-accordion-icon,
.elementor-toggle .elementor-tab-title.elementor-active .elementor-accordion-icon {
  transform: rotate(180deg);
}

/* ===================================================================
 * 11h. QA round 8 contact fixes
 * =================================================================== */

body.page-id-25074 .elementor-widget-icon-box .elementor-widget-container,
body.page-id-26012 .elementor-widget-icon-box .elementor-widget-container,
body.page-id-27540 .elementor-widget-icon-box .elementor-widget-container {
  height: 100%;
}

body.page-id-25074 .elementor-widget-icon-box .elementor-icon-box-wrapper,
body.page-id-26012 .elementor-widget-icon-box .elementor-icon-box-wrapper,
body.page-id-27540 .elementor-widget-icon-box .elementor-icon-box-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: var(--sp-3);
  min-height: 0;
  height: auto;
}

body.page-id-25074 .elementor-widget-icon-box .elementor-icon-box-icon,
body.page-id-26012 .elementor-widget-icon-box .elementor-icon-box-icon,
body.page-id-27540 .elementor-widget-icon-box .elementor-icon-box-icon {
  margin: 0 auto !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 64px;
}

body.page-id-25074 .elementor-widget-icon-box .elementor-icon,
body.page-id-26012 .elementor-widget-icon-box .elementor-icon,
body.page-id-27540 .elementor-widget-icon-box .elementor-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

body.page-id-25074 .elementor-widget-icon-box .elementor-icon-box-content,
body.page-id-26012 .elementor-widget-icon-box .elementor-icon-box-content,
body.page-id-27540 .elementor-widget-icon-box .elementor-icon-box-content {
  width: 100%;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

body.page-id-25074 .elementor-widget-icon-box .elementor-icon-box-title,
body.page-id-26012 .elementor-widget-icon-box .elementor-icon-box-title,
body.page-id-27540 .elementor-widget-icon-box .elementor-icon-box-title,
body.page-id-25074 .elementor-widget-icon-box .elementor-icon-box-description,
body.page-id-26012 .elementor-widget-icon-box .elementor-icon-box-description,
body.page-id-27540 .elementor-widget-icon-box .elementor-icon-box-description {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  text-align: center !important;
}

body.page-id-25074 .elementor-element-6c751262 > .elementor-widget-wrap,
body.page-id-25074 .elementor-element-34ca149 > .elementor-widget-wrap,
body.page-id-25074 .elementor-element-9c186d5 > .elementor-widget-wrap,
body.page-id-26012 .elementor-element-6c751262 > .elementor-widget-wrap,
body.page-id-26012 .elementor-element-34ca149 > .elementor-widget-wrap,
body.page-id-26012 .elementor-element-9c186d5 > .elementor-widget-wrap,
body.page-id-27540 .elementor-element-6c751262 > .elementor-widget-wrap,
body.page-id-27540 .elementor-element-34ca149 > .elementor-widget-wrap,
body.page-id-27540 .elementor-element-9c186d5 > .elementor-widget-wrap {
  align-content: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-height: 260px !important;
}

body.page-id-25074 .elementor-element-6620cbc,
body.page-id-25074 .elementor-element-a704be4,
body.page-id-26012 .elementor-element-6620cbc,
body.page-id-26012 .elementor-element-a704be4,
body.page-id-27540 .elementor-element-6620cbc,
body.page-id-27540 .elementor-element-a704be4 {
  margin-top: 0 !important;
}

body.page-id-25074 .elementor-element-a704be4,
body.page-id-26012 .elementor-element-a704be4,
body.page-id-27540 .elementor-element-a704be4 {
  display: none !important;
}

/* ===================================================================
 * 11g. QA round 5 fixes (May 8 evening pass)
 * =================================================================== */

/* QA-5 #2 — quiz question layouts inconsistent across MK and EN.
 * LearnDash ProQuiz inherits theme typography defaults differently
 * per quiz, so questions look "different shape" between courses.
 * Lock down core surfaces to a uniform look. */
.wpProQuiz_content {
  max-width: 760px;
  margin: 0 auto;
}
.wpProQuiz_quiz .wpProQuiz_questionList {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 var(--sp-4) 0 !important;
}
.wpProQuiz_question {
  font-size: var(--fs-lg) !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  margin: 0 0 var(--sp-4) 0 !important;
  padding: var(--sp-4) var(--sp-5) !important;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--border);
}
.wpProQuiz_questionList li {
  padding: 0 !important;
  margin: 0 0 var(--sp-2) 0 !important;
  border-radius: var(--r-sm);
}
.wpProQuiz_questionList li label {
  display: flex !important;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: background-color 120ms ease;
  width: 100%;
}
.wpProQuiz_questionList li label:hover {
  background: var(--surface-tint);
}
.wpProQuiz_questionList li input[type="checkbox"],
.wpProQuiz_questionList li input[type="radio"] {
  margin-top: 4px;
  flex-shrink: 0;
}
.wpProQuiz_button,
.wpProQuiz_TipButton {
  margin: var(--sp-2) var(--sp-2) var(--sp-2) 0 !important;
}

/* QA-5 #3 + #12 — course-status text contrast bumped one more level
 * so the "Моментален Статус / Current Status" label + progress
 * percentage are unambiguously readable. */
.ld-course-status .ld-course-status-content,
.ld-course-status .ld-course-status-label,
.ld-course-status-content .ld-course-status-segment .ld-course-status-segment-heading {
  color: var(--text) !important;
  font-weight: 700;
}
.learndash-wrapper .ld-progress-percentage,
.learndash-wrapper .ld-progress-stats,
.learndash-wrapper .ld-progress-label {
  color: var(--text) !important;
  font-weight: 700 !important;
}

/* QA-5 #17 — MK About page programmatic team cards (rendered via
 * inc/qa-round3.php the_content filter); these styles ensure the
 * MK + EN team grids look identical. */
.mepso-team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
  margin: var(--sp-12) 0;
}
@media (max-width: 920px) {
  .mepso-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .mepso-team-grid { grid-template-columns: 1fr; }
}
.mepso-team-grid__card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mepso-team-grid__card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  display: block;
}
.mepso-team-grid__card-body {
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.mepso-team-grid__name {
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--text);
  margin: 0;
}
.mepso-team-grid__bio {
  font-size: var(--fs-sm);
  color: var(--text-body);
  line-height: 1.5;
  margin: 0;
}

/* ===================================================================
 * 11f. QA round 4 fixes (May 8 tester pass)
 * =================================================================== */

/* QA #5 — homepage 3-card row (Експерти/Информациска/Неограничен)
 * straddles the blue hero. Reset the per-page CSS's negative
 * margin-top so the cards sit fully inside the white section
 * below. Element id 5b4952c1 is the column wrapper for the cards. */
.elementor-25066 .elementor-element.elementor-element-5b4952c1,
.elementor-25930 .elementor-element.elementor-element-5b4952c1,
.elementor-27518 .elementor-element.elementor-element-5b4952c1 {
  margin-top: 0 !important;
}

/* QA #18 — My Profile cards have inconsistent borders (avatar card
 * is rounded, stat cards are square). Force uniform border-radius
 * on every cell of the LD/BuddyBoss profile dashboard so the row
 * reads as one consistent set of cards. */
.bb-grid > .ld-profile-stats-block,
.ld-profile-stats-block,
.ld-profile-overview .ld-profile-card,
.ld-profile-stats__item,
.elementor-widget-bbgrid > .elementor-widget-container > .bb-grid > * {
  border-radius: 12px !important;
  overflow: hidden;
}

/* QA #19 — "Our Team" cards visible on EN page but the tester says
 * not visible on MK. Most likely cause: a Polylang language filter
 * is hiding them on MK pages, OR the section opacity is collapsing.
 * The cards are inside the about-us page (id 25067 MK / 27502 EN
 * approx). This rule ensures the team-card row is visible
 * regardless of language. */
.elementor-section .elementor-widget-image-box .elementor-image-box-wrapper,
.elementor-section .elementor-widget-team-member,
.mepso-team-grid {
  display: flex !important;
  flex-direction: column;
  height: 100%;
}

/* ===================================================================
 * 12. Print and legal-page readability
 * =================================================================== */

.entry-content .elementor-section.mepso-legal-page,
.elementor-section.mepso-legal-page,
body.page-id-3 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type,
body.page-id-10 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type,
body.page-id-600 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type,
body.page-id-25956 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type,
body.page-id-25961 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type,
body.page-id-25972 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type,
body.page-id-27543 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type,
body.page-id-27544 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type,
body.page-id-27545 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type,
body.page-id-3 .elementor-section,
body.page-id-10 .elementor-section,
body.page-id-600 .elementor-section,
body.page-id-25956 .elementor-section,
body.page-id-25961 .elementor-section,
body.page-id-25972 .elementor-section,
body.page-id-27543 .elementor-section,
body.page-id-27544 .elementor-section,
body.page-id-27545 .elementor-section {
  min-height: 0 !important;
  padding: clamp(40px, 5vw, 72px) 0 !important;
  margin: 0 !important;
  background: var(--surface-0) !important;
  color: var(--text-body) !important;
  text-shadow: none !important;
}

body.page-id-3 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type::before,
body.page-id-10 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type::before,
body.page-id-600 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type::before,
body.page-id-25956 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type::before,
body.page-id-25961 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type::before,
body.page-id-25972 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type::before,
.entry-content .elementor-section.mepso-legal-page::before,
body.page-id-27543 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type::before,
body.page-id-27544 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type::before,
body.page-id-27545 .entry-content .elementor > .elementor-section.elementor-top-section:first-of-type::before,
.elementor-section.mepso-legal-page::before {
  content: none !important;
}

.entry-content .elementor-section.mepso-legal-page *,
body[class*="elementor"] .elementor-section.mepso-legal-page,
body[class*="elementor"] .elementor-section.mepso-legal-page *,
body[class*="elementor"].page-id-3 .elementor-section,
body[class*="elementor"].page-id-3 .elementor-section *,
body[class*="elementor"].page-id-10 .elementor-section,
body[class*="elementor"].page-id-10 .elementor-section *,
body[class*="elementor"].page-id-25956 .elementor-section,
body[class*="elementor"].page-id-25956 .elementor-section *,
body[class*="elementor"].page-id-25961 .elementor-section,
body[class*="elementor"].page-id-25961 .elementor-section *,
body[class*="elementor"].page-id-25972 .elementor-section,
body[class*="elementor"].page-id-25972 .elementor-section *,
body[class*="elementor"].page-id-27543 .elementor-section,
body[class*="elementor"].page-id-27543 .elementor-section *,
body[class*="elementor"].page-id-27544 .elementor-section,
body[class*="elementor"].page-id-27544 .elementor-section *,
body[class*="elementor"].page-id-27545 .elementor-section,
body[class*="elementor"].page-id-27545 .elementor-section *,
body[class*="elementor"].page-id-600 .elementor-section,
body[class*="elementor"].page-id-600 .elementor-section * {
  color: #373530 !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #373530 !important;
  opacity: 1 !important;
}

body[class*="elementor"] .elementor-section.mepso-legal-page h1,
body[class*="elementor"] .elementor-section.mepso-legal-page h2,
body[class*="elementor"] .elementor-section.mepso-legal-page h3,
body[class*="elementor"] .elementor-section.mepso-legal-page b,
body[class*="elementor"] .elementor-section.mepso-legal-page strong {
  color: #191918 !important;
  -webkit-text-fill-color: #191918 !important;
}

.entry-content .elementor-section.mepso-legal-page b,
.entry-content .elementor-section.mepso-legal-page strong,
body.page-id-3 .elementor-section b,
body.page-id-3 .elementor-section strong,
body.page-id-10 .elementor-section b,
body.page-id-10 .elementor-section strong,
body.page-id-600 .elementor-section b,
body.page-id-600 .elementor-section strong,
body.page-id-25956 .elementor-section b,
body.page-id-25956 .elementor-section strong,
body.page-id-25961 .elementor-section b,
body.page-id-25961 .elementor-section strong,
body.page-id-25972 .elementor-section b,
body.page-id-25972 .elementor-section strong,
body.page-id-27543 .elementor-section b,
body.page-id-27543 .elementor-section strong,
body.page-id-27544 .elementor-section b,
body.page-id-27544 .elementor-section strong,
body.page-id-27545 .elementor-section b,
body.page-id-27545 .elementor-section strong {
  color: var(--text) !important;
}

@media print {
  .site-footer, .ast-header-break-point, nav, .ast-primary-menu,
  #secondary, .widget { display: none !important; }
  body { background: #fff; color: #000; }
}
