/* ==========================================================================
   Compare Courses (/compare-courses) — MOA_Final_27112026/compare-courses.html
   Port of compare-courses.css (hero) + the page's inline styles (category cards, PDF viewer) +
   inner-banner-center.css and black-inner-banners.css, final cascade.
   Template: course_manage/compare_courses.html. Script: js/compare_v2.js.
   ========================================================================== */

/* ---------- Hero ---------- */
.compare-hero { padding: 92px 0 86px; background: #000; color: #fff; text-align: center; }
/* black-inner-banners.css: the banner content sits above its (removed) artwork layers. */
.compare-hero > .moa-container { position: relative; z-index: 1; }
.compare-kicker { color: #ee343b; font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.compare-hero .compare-kicker { color: #fff; }
.compare-hero h1 { margin: 18px auto; color: #fff; font-size: clamp(36px, 5vw, 60px); line-height: 1.1; }
.compare-hero p { max-width: 680px; margin-inline: auto; color: #fff; font-size: 18px; line-height: 1.7; }
.compare-cta { display: inline-block; margin-top: 20px; padding: 14px 25px; border-radius: 6px; background: #ee343b; color: #fff; font-weight: 700; }

/* ---------- Category cards ---------- */
#compare-categories { padding-top: 64px; padding-bottom: 72px; }
.compare-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.compare-category {
  position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 290px; overflow: hidden;
  padding: 26px 22px 22px; border: 1px solid #e7e7e7; border-radius: 16px;
  background: linear-gradient(155deg, #fff 55%, #fff6f6); box-shadow: 0 5px 20px rgba(17, 17, 17, .055); text-align: center;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.compare-category::before {
  content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: #ee343b;
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.compare-category:hover::before { transform: scaleX(1); }
.compare-category:hover { transform: translateY(-6px); border-color: #ee343b; box-shadow: 0 14px 30px rgba(238, 52, 59, .12); }
.comparison-icon {
  display: grid; flex-shrink: 0; place-items: center; width: 62px; height: 62px; margin: 0 auto 22px;
  border-radius: 16px; background: #fff0f1; color: #ee343b; transition: transform .25s;
}
.comparison-icon svg { width: 32px; height: 32px; }
.compare-category:hover .comparison-icon { transform: scale(1.08); }
.compare-category h3 {
  flex: 1; width: 100%; margin: 0; color: #111; font-size: 19px; font-weight: 650; line-height: 1.45; letter-spacing: -.25px;
  text-align: center; overflow-wrap: break-word;
}
.compare-category button {
  display: flex; align-self: center; align-items: center; justify-content: center; gap: 8px; max-width: 100%; margin-top: 24px;
  padding: 13px 20px; border: 0; border-radius: 8px; background: #ee343b; box-shadow: 0 4px 10px #ee343b20;
  color: #fff; font-size: 14px; font-weight: 600; text-align: center; cursor: pointer;
}
.compare-category button span { font-size: 20px; line-height: 1; }
.compare-category:hover button { background: #d92730; }
.compare-empty { padding: 40px 20px; border-radius: 12px; background: #fafafa; color: #555; text-align: center; }

@media (max-width: 900px) { .compare-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .compare-hero { padding: 65px 0; } }
@media (max-width: 520px) {
  .compare-category-grid { grid-template-columns: 1fr; }
  #compare-categories { padding-top: 32px; padding-bottom: 40px; }
  .compare-category { min-height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .compare-category, .comparison-icon, .compare-category::before { transition: none !important; transform: none !important; }
}

/* ---------- PDF viewer dialog ---------- */
#pdfModal {
  position: fixed; inset: 0; box-sizing: border-box; width: min(1180px, 94vw); max-width: 94vw; height: min(850px, 90vh); max-height: 90vh;
  margin: auto; padding: 0; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 20px;
  background: #fff; box-shadow: 0 28px 100px #0005; color: #111; font-family: inherit;
}
#pdfModal::backdrop { background: rgba(15, 18, 24, .58); backdrop-filter: blur(6px); }
#pdfModal[open] { display: flex; flex-direction: column; animation: pdfIn .24s ease-out; }
#pdfModal .pdfbar { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid #eee; background: #fff; }
#pdfModal .pdfheading { flex: 1; min-width: 0; }
#pdfModal .pdfeyebrow { display: block; margin-bottom: 5px; color: #ee343b; font-size: 10px; font-weight: 700; letter-spacing: 1.7px; }
#pdfTitle { margin: 0; color: #111; font-size: clamp(16px, 2vw, 21px); font-weight: 700; line-height: 1.35; }
#pdfModal .pdftools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 24px; border-bottom: 1px solid #e5e7eb; background: #fafafa;
}
#pdfModal .pdfgroup { display: flex; align-items: center; gap: 5px; }
#pdfModal button, #pdfModal a {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; box-sizing: border-box; min-height: 36px;
  padding: 9px 13px; border: 1px solid #e1e3e6; border-radius: 9px; background: #fff; color: #222;
  font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
#pdfModal button:hover, #pdfModal a:hover { border-color: #ee343b; background: #fff0f1; color: #d92730; }
#pdfModal button:focus-visible, #pdfModal a:focus-visible { outline: 2px solid #ee343b; outline-offset: 3px; }
#pdfModal #pdfClose {
  flex-shrink: 0; width: 40px; height: 40px; padding: 0; border-color: #ee343b; background: #ee343b; color: #fff; font-size: 25px; line-height: 1;
}
#pdfModal #pdfClose:hover { background: #d92730; }
#pdfModal #pdfZoom { min-width: 58px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
#pdfModal #pdfMinus, #pdfModal #pdfPlus { width: 38px; padding: 0; font-size: 20px; }
#pdfModal .pdfhint { color: #666; font-size: 12px; }
#pdfScroll {
  flex: 1; box-sizing: border-box; min-height: 0; padding: 16px; overflow: auto; background: #f0f2f5; overscroll-behavior: contain;
}
#pdfImage { display: block; max-width: none !important; height: auto; margin: 0 auto; border-radius: 3px; background: #fff; box-shadow: 0 3px 18px #17203314; }
/* No preview image uploaded: the browser's own PDF viewer fills the dialog instead. */
#pdfFrame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
#pdfModal.is-pdf .pdfgroup, #pdfModal.is-pdf .pdfhint { visibility: hidden; }
#pdfModal.is-pdf #pdfScroll { padding: 0; overflow: hidden; }
@keyframes pdfIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 600px) {
  #pdfModal { width: 96vw; max-width: 96vw; height: 92vh; max-height: 92vh; border-radius: 14px; }
  #pdfModal .pdfbar { padding: 14px; }
  #pdfModal .pdftools { gap: 8px; padding: 10px 12px; }
  #pdfModal .pdfhint { display: none; }
  #pdfModal button, #pdfModal a { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { #pdfModal[open] { animation: none; } }
