/* Shared overrides for the Divi migration. Load AFTER /migration-styles/<slug>.css.
   Plain CSS on purpose: no Tailwind preflight, which would reset the original Divi styles. */
:root {
  --abc-blue: #24479b;
  --abc-purple: #9775b9;
  --abc-white: #ffffff;
  --abc-ink: #333333;
}

html, body { overflow-x: hidden; }
img, iframe, video { max-width: 100%; }

/* ---- Mobile menu (replaces Divi jQuery fade) ---- */
.abc-menu-toggle {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; line-height: 1; color: inherit;
}
.abc-menu-toggle:focus-visible { outline: 2px solid var(--abc-white); outline-offset: 4px; }
.mobile_nav .et_mobile_menu[hidden] { display: none !important; }
.mobile_nav.opened .et_mobile_menu { display: block; }
.mobile_nav.opened .mobile_menu_bar:before { content: "\4d"; }

/* Program cards and their deep links. */
.abc-program-card { display: block; }
.abc-program-card:focus-visible { outline: 3px solid var(--abc-blue); outline-offset: 4px; }
#post-32 .et_section_specialty[id] { scroll-margin-top: 24px; }
@media (prefers-reduced-motion: no-preference) {
  html:has(body.page-id-32) { scroll-behavior: smooth; }
}

/* ---- Slider: JS-controlled active slide ---- */
.et_pb_slider.abc-slider-ready .et_pb_slide { display: none; }
.et_pb_slider.abc-slider-ready .et_pb_slide.et-pb-active-slide { display: list-item; }
.et-pb-controllers a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Content remains visible on first paint instead of waiting for Divi waypoints. */
.et_animated { opacity: 1; animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .et_animated, .et-pb-active-slide .et_pb_slide_description { opacity: 1 !important; animation: none !important; }
}

/* ---- Parallax backgrounds without Divi JS ---- */
.et-pb-parallax-background { height: 100%; background-size: cover; }

/* ---- Table Maker accordion cells are interactive on small screens ---- */
@media (max-width: 980px) { .dvmd_tm_bhead { cursor: pointer; } }

/* ---- Small-device wrapping ---- */
@media (max-width: 767px) {
  h1, h2, h3, h4, .et_pb_slide_title, .et_pb_module_header { overflow-wrap: anywhere; word-break: normal; hyphens: auto; }
  .et_pb_blurb_description a[href^="mailto:"] { overflow-wrap: anywhere; }
  .et_pb_row { width: 88%; }
  #post-36 .et_pb_section_1 .et_pb_row_0 { width: min(88%, 38rem) !important; max-width: 100%; }
  #post-36 .et_pb_section_1 { padding-block: 40px; }
  #post-36 .et_pb_code_0 { margin-inline: 0 !important; }
  #post-36 iframe[src*="google.com/maps/embed"] { height: 320px; }
  #post-65 .et_pb_section_0 .et_pb_row_0 { width: 100%; }
  .et-l--footer .et_pb_section_0_tb_footer.et_pb_section { padding-bottom: 112px; }
  .et-l--footer .et_pb_row_0_tb_footer .et_pb_column { margin-bottom: 22px; }
}
@media (max-width: 980px) {
  #post-30 .et_pb_fullwidth_header.et_pb_bg_layout_dark .et_pb_fullwidth_header_overlay,
  #post-32 .et_pb_fullwidth_header.et_pb_bg_layout_dark .et_pb_fullwidth_header_overlay,
  #post-34 .et_pb_fullwidth_header.et_pb_bg_layout_dark .et_pb_fullwidth_header_overlay,
  #post-36 .et_pb_fullwidth_header.et_pb_bg_layout_dark .et_pb_fullwidth_header_overlay {
    background-color: rgb(0 0 0 / 36%);
  }
}

/* ---- Contact form (replaces JotForm 240036221001129) ---- */
.abc-contact-form {
  font-family: 'Open Sans', Arial, sans-serif;
  background: var(--abc-white);
  padding: 28px 28px 20px;
  border-radius: 6px;
  box-shadow: 0 2px 14px rgba(36, 71, 155, 0.12);
  color: var(--abc-ink);
  text-align: left;
}
.abc-contact-form p { padding: 0; margin: 0 0 18px; }
.abc-contact-form label {
  display: block; font-family: 'Poppins', 'Open Sans', sans-serif; font-weight: 600;
  font-size: 15px; color: var(--abc-blue); margin-bottom: 6px;
}
.abc-req { color: #c0392b; }
.abc-contact-form input[type="text"],
.abc-contact-form input[type="email"],
.abc-contact-form input[type="tel"],
.abc-contact-form textarea {
  display: block; width: 100%; box-sizing: border-box;
  font: 15px/1.5 'Open Sans', Arial, sans-serif; color: var(--abc-ink);
  background: #f4f4f8; border: 1px solid #d4d6e2; border-radius: 4px; padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.abc-contact-form textarea { resize: vertical; min-height: 140px; }
.abc-contact-form input:focus, .abc-contact-form textarea:focus {
  outline: none; border-color: var(--abc-blue); box-shadow: 0 0 0 3px rgba(36, 71, 155, 0.2); background: var(--abc-white);
}
.abc-has-error input, .abc-has-error textarea { border-color: #c0392b; }
.abc-field-hint { display: block; font-size: 12px; color: #6b6b7a; margin-top: 4px; }
.abc-field-error { display: block; font-size: 13px; color: #b02a1e; margin-top: 4px; min-height: 0; }
.abc-field-error:empty { display: none; }
.abc-field-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; }
.abc-field-check label { display: inline; margin: 0; color: var(--abc-ink); font-weight: 500; }
.abc-field-check input { width: 20px; height: 20px; accent-color: var(--abc-blue); margin: 0; }
.abc-field-check .abc-field-error { grid-column: 1 / -1; margin-top: 0; }
.abc-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.abc-submit {
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 17px; letter-spacing: .5px;
  color: var(--abc-white); background: var(--abc-blue); border: 2px solid var(--abc-blue);
  border-radius: 40px; padding: 10px 34px; cursor: pointer; transition: background .2s ease, border-color .2s ease;
}
.abc-submit:hover { background: var(--abc-purple); border-color: var(--abc-purple); }
.abc-submit:focus-visible { outline: 3px solid var(--abc-purple); outline-offset: 3px; }
.abc-submit:disabled { opacity: .65; cursor: progress; }
.abc-form-status { font-size: 14px; border-radius: 4px; }
.abc-form-status:empty { display: none; }
.abc-form-status:focus { outline: none; }
.abc-status-error { background: #fdecea; color: #8a1f14; border: 1px solid #f3b8b0; padding: 10px 12px; }
.abc-status-pending { background: #eef1fa; color: var(--abc-blue); border: 1px solid #c9d2ee; padding: 10px 12px; }
@media (max-width: 480px) { .abc-contact-form { padding: 20px 16px 12px; } .abc-submit { width: 100%; } }
