/* ==========================================================================
   Medics Online Academy — shared styles for the v2 inner pages (MOA_Final design)
   Loaded by templates/moa_page_v2.html. Every rule is scoped to `body.moa-page`
   (or to a page-specific class below it) so the chatbot widget is not affected.
   Page-specific rules live in new_css/<page>_v2.css.
   Header/footer: header.html / footer.html (site_header.css, site_footer.css).
   ========================================================================== */

.moa-page {
  --moa-red: #ee343b;
  --moa-red-dark: #c92830;
  --moa-red-soft: #fff1f2;
  --moa-ink: #171717;
  --moa-text: #20242a;
  --moa-muted: #5a6270;
  --moa-line: #e6e8eb;
  --moa-soft: #f6f7f9;
  --moa-dark: #151515;
  --moa-radius: 14px;
  --moa-shadow: 0 6px 24px rgba(17, 17, 17, .05);
  --moa-shadow-hover: 0 14px 32px rgba(17, 17, 17, .09);
  --moa-container: min(1640px, 85.4167%);
  margin: 0;
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  color: var(--moa-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.moa-page *, .moa-page *::before, .moa-page *::after { box-sizing: border-box; }
html:has(body.moa-page) { scroll-behavior: smooth; }
.moa-main { display: block; overflow-x: clip; }
:where(.moa-main) a { color: inherit; text-decoration: none; }
:where(.moa-main) :is(button, input) { font: inherit; }
:where(.moa-main) button { cursor: pointer; }
:where(.moa-main) img { max-width: 100%; height: auto; }
:where(.moa-main) :is(h1, h2, h3) { color: inherit; }
.moa-main [hidden] { display: none !important; }
.moa-page :focus-visible { outline: 3px solid var(--moa-red); outline-offset: 3px; }
.moa-page .moa-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.moa-container { width: var(--moa-container); margin-inline: auto; }
.moa-container--narrow { max-width: 1040px; }
.moa-section { padding-block: clamp(52px, 6vw, 80px); scroll-margin-top: 24px; }
.moa-section--soft { background: var(--moa-soft); }

/* ---------- Kicker / section heading ---------- */
.moa-kicker {
  display: inline-block; margin: 0;
  font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--moa-red);
}
.moa-heading { max-width: 780px; margin: 0 auto clamp(28px, 3.5vw, 42px); text-align: center; }
.moa-heading h2 {
  margin: 12px 0 0; font-size: clamp(28px, 3vw, 42px); line-height: 1.2; font-weight: 700; letter-spacing: -.5px;
}
.moa-heading--bar h2::after {
  content: ""; display: block; width: 44px; height: 3px; margin: 16px auto 0;
  border-radius: 3px; background: var(--moa-red);
}
.moa-heading p { margin: 14px 0 0; font-size: 16px; line-height: 1.75; color: var(--moa-muted); }

/* ---------- Buttons ---------- */
.moa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 13px 26px; border: 1px solid var(--moa-red); border-radius: 7px;
  background: var(--moa-red); color: #fff !important;
  font-size: 14px; font-weight: 700; line-height: 1.2; text-align: center;
  transition: background-color .22s ease, border-color .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.moa-btn--pill { border-radius: 40px; }
.moa-btn--ghost { background: #fff; border-color: #dcdcdc; color: var(--moa-ink) !important; }
.moa-btn--sm { min-height: 40px; padding: 9px 16px; font-size: 13px; }
.moa-btn__arrow { display: inline-block; transition: transform .22s ease; }
@media (hover: hover) {
  .moa-btn:hover { background: var(--moa-red-dark); border-color: var(--moa-red-dark); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(238, 52, 59, .2); }
  .moa-btn--ghost:hover { background: #fff; border-color: var(--moa-red); color: var(--moa-red) !important; box-shadow: none; }
  .moa-btn:hover .moa-btn__arrow { transform: translateX(3px); }
}

/* ---------- Inner-page hero banner ---------- */
.moa-hero {
  display: flex; align-items: center; justify-content: center;
  min-height: clamp(300px, 31vw, 440px); padding: clamp(64px, 7vw, 104px) 20px;
  background: #000; color: #fff; text-align: center;
}
.moa-hero--slate { background: linear-gradient(120deg, #141c28, #344254); }
.moa-hero__inner { width: 100%; max-width: 900px; margin: 0 auto; }
.moa-hero .moa-kicker { color: #fff; }
.moa-hero--accent .moa-kicker { color: var(--moa-red); }
.moa-hero h1 {
  margin: 18px auto; color: #fff;
  font-size: clamp(34px, 5vw, 64px); line-height: 1.13; font-weight: 700; letter-spacing: -.5px;
}
.moa-hero h1 em { font-style: normal; }
.moa-hero p {
  max-width: 700px; margin: 0 auto; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.7; color: #e3e3e3;
}
.moa-hero .moa-btn { margin-top: 28px; }

/* ---------- Search / filter controls ---------- */
.moa-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 14px; font-weight: 700; }
.moa-input, .moa-select {
  width: 100%; min-height: 48px; padding: 12px 16px;
  border: 1px solid #dcdcdc; border-radius: 9px; background: #fff; color: var(--moa-ink);
  font-size: 15px; font-weight: 500;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.moa-select {
  appearance: none; -webkit-appearance: none; padding-right: 42px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23171717' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
}
.moa-input:focus, .moa-select:focus { outline: none; border-color: var(--moa-red); box-shadow: 0 0 0 3px rgba(238, 52, 59, .15); }
.moa-input::-webkit-search-cancel-button { cursor: pointer; }

.moa-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.moa-chip {
  min-height: 40px; padding: 9px 17px; border: 1px solid #dedede; border-radius: 40px;
  background: #fff; color: #222; font-size: 13px; font-weight: 600;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.moa-chip[aria-pressed="true"] { background: var(--moa-red); border-color: var(--moa-red); color: #fff; }
@media (hover: hover) { .moa-chip:hover:not([aria-pressed="true"]) { border-color: var(--moa-red); color: var(--moa-red); } }
.moa-chip__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; margin-left: 6px; padding: 0 6px;
  border-radius: 11px; background: rgba(0, 0, 0, .06); font-size: 12px;
}
.moa-chip[aria-pressed="true"] .moa-chip__count { background: rgba(255, 255, 255, .22); }

.moa-empty {
  margin: 8px 0 0; padding: 48px 20px; border: 1px dashed #d8d8d8; border-radius: var(--moa-radius);
  background: var(--moa-soft); color: var(--moa-muted); text-align: center; font-size: 15px;
}

/* ---------- Card grid ---------- */
.moa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); }
.moa-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; box-shadow: var(--moa-shadow);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
@media (hover: hover) { .moa-card:hover { transform: translateY(-5px); border-color: var(--moa-red); box-shadow: var(--moa-shadow-hover); } }

/* ---------- Dark call-to-action band ---------- */
.moa-cta-band { padding: clamp(52px, 6vw, 70px) 20px; background: var(--moa-dark); color: #fff; text-align: center; }
.moa-cta-band h2 { margin: 0; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.25; font-weight: 700; }
.moa-cta-band p { max-width: 640px; margin: 14px auto 26px; color: #d0d0d0; font-size: 16px; line-height: 1.7; }
/* A page that ends with the dark band runs straight into the (black) footer. */
.moa-main:has(> section.moa-cta-band:last-of-type) + #mhp-site-footer { margin-top: 0; }

/* ---------- Floating WhatsApp shortcut ---------- */
/* Sits above the IntelliGenie chat bot, which occupies the bottom-right corner (same spot as the home page). */
.moa-floating { position: fixed; right: 24px; bottom: 120px; z-index: 90; }
.moa-floating__icon {
  display: flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; padding: 3px; border: 2px solid transparent; border-radius: 50%; background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
  transition: border-color .22s ease, transform .25s ease;
}
.moa-floating__icon img { display: block; width: 62px; height: 62px; object-fit: contain; border-radius: 50%; }
.moa-floating__icon:hover, .moa-floating__icon:focus-visible { border-color: #16bb52; transform: translateY(-3px); }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) { .moa-page { --moa-container: 90%; } }
@media (max-width: 900px) { .moa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .moa-page { --moa-container: 92%; }
  .moa-hero { min-height: 0; }
  .moa-floating { right: 14px; bottom: 96px; }
  .moa-floating__icon { width: 58px; height: 58px; }
  .moa-floating__icon img { width: 50px; height: 50px; }
}
@media (max-width: 600px) {
  .moa-grid { grid-template-columns: 1fr; }
  .moa-hero .moa-btn, .moa-cta-band .moa-btn { width: 100%; max-width: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.moa-page) { scroll-behavior: auto; }
  .moa-page *, .moa-page *::before, .moa-page *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Design-wide hover enhancements (MOA_Final hover-animations.css), scoped to the page body ---------- */
@media (hover: hover) and (pointer: fine) {
  .moa-main section { transition: background-color .45s ease, box-shadow .45s ease; }
  .moa-main section :is(h1, h2, h3) { transition: color .3s ease, transform .45s cubic-bezier(.22, 1, .36, 1); }
  .moa-main section:hover h2 { transform: translateY(-2px); }
  .moa-main :is(button, input[type="submit"]):not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(238, 52, 59, .16); }
  .moa-main :is(input, select, textarea):focus-visible { outline: 2px solid #ee343b; outline-offset: 2px; }
}
