/* ============================================================
   Trueboon Softech – HMS Product Page Styles
   (loads after css/style.css)
   ============================================================ */

/* ---------- Product hero ---------- */
.hero-page { padding-top: calc(var(--header-h) + clamp(36px, 5vw, 64px)); }
.hero-page-inner { align-items: center; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: .84rem;
  font-weight: 600;
  color: #93b1c2;
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--brand-300); transition: color .25s ease; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span[aria-hidden="true"] { opacity: .6; }
.breadcrumb .current { color: #d7e5ee; }

/* ---------- Overview panel ---------- */
.overview-panel {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5);
}
.overview-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.overview-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}
.overview-icon svg { width: 22px; height: 22px; }
.overview-head h2 { color: #fff; font-size: 1.05rem; letter-spacing: -.2px; }
.overview-head p { color: #93b1c2; font-size: .8rem; }

.overview-list { display: flex; flex-direction: column; gap: 10px; }
.overview-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  padding: 12px 14px;
  transition: background .3s ease, border-color .3s ease, transform .3s ease;
}
.overview-item:hover {
  background: rgba(255, 255, 255, .11);
  border-color: rgba(20, 184, 166, .5);
  transform: translateX(4px);
}
.ov-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 12px;
}
.ov-icon svg { width: 21px; height: 21px; }
.ov-icon.patient { background: rgba(45, 212, 191, .16); color: #5eead4; }
.ov-icon.clinical { background: rgba(56, 189, 248, .16); color: #7dd3fc; }
.ov-icon.resource { background: rgba(167, 139, 250, .16); color: #c4b5fd; }
.ov-icon.financial { background: rgba(251, 191, 36, .16); color: #fcd34d; }
.ov-icon.support { background: rgba(251, 113, 133, .16); color: #fda4af; }
.ov-icon.mis { background: rgba(52, 211, 153, .16); color: #6ee7b7; }

.ov-text { flex: 1; min-width: 0; }
.ov-text strong { display: block; color: #fff; font-size: .92rem; font-weight: 700; }
.ov-text small { color: #93b1c2; font-size: .76rem; }
.ov-count {
  flex-shrink: 0;
  min-width: 38px;
  text-align: center;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 800;
  color: var(--brand-300);
  background: rgba(20, 184, 166, .14);
  border: 1px solid rgba(20, 184, 166, .35);
  border-radius: 999px;
  padding: 4px 10px;
}
.overview-note { margin-top: 16px; font-size: .8rem; color: #93b1c2; text-align: center; }

/* ---------- Workflow ---------- */
.workflow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.workflow-step {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 20px 22px;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.workflow-step:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }
.wf-num {
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--brand-100);
  line-height: 1;
}
.workflow-step:hover .wf-num { color: var(--brand-300); }
.wf-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  color: var(--brand-600);
  transition: all .3s ease;
}
.wf-icon svg { width: 26px; height: 26px; }
.workflow-step:hover .wf-icon { background: var(--grad-brand); color: #fff; border-color: transparent; transform: scale(1.08) rotate(-4deg); box-shadow: var(--shadow-glow); }
.workflow-step h3 { font-size: 1rem; margin-bottom: 7px; }
.workflow-step p { font-size: .84rem; color: var(--ink-500); }

/* ---------- Explorer ---------- */
.explorer-toolbar { margin-bottom: 34px; }
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .88rem;
  color: var(--ink-600);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  transition: all .28s ease;
}
.cat-pill:hover { border-color: var(--brand-400); color: var(--brand-700); transform: translateY(-2px); }
.cat-pill.active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.pill-count {
  font-size: .76rem;
  font-weight: 800;
  background: rgba(15, 23, 42, .08);
  border-radius: 999px;
  padding: 2px 9px;
  min-width: 24px;
  text-align: center;
}
.cat-pill.active .pill-count { background: rgba(255, 255, 255, .25); }

.explorer-search { margin: 0 auto; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 20px 18px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.module-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}
.module-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-200);
}
.module-card:hover::before { transform: scaleX(1); }

.module-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.module-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  transition: all .3s ease;
}
.module-icon svg { width: 21px; height: 21px; }
.module-card:hover .module-icon { background: var(--grad-brand); color: #fff; border-color: transparent; }
.module-cat-tag {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.module-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.3;
  color: var(--ink-900);
  margin-bottom: 7px;
}
.module-desc {
  display: block;
  font-size: .86rem;
  color: var(--ink-500);
  flex: 1;
}
.module-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: .84rem;
  font-weight: 700;
  color: var(--brand-600);
  transition: color .25s ease;
}
.module-more svg { width: 15px; height: 15px; transition: transform .25s ease; }
.module-card:hover .module-more { color: var(--brand-700); }
.module-card:hover .module-more svg { transform: translateX(4px); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 19, 32, .72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(82vh, 700px);
  overflow-y: auto;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 34px 32px 30px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .5);
  animation: modalIn .35s cubic-bezier(.22, .61, .36, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(26px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-600);
  transition: all .25s ease;
}
.modal-close svg { width: 18px; height: 18px; }
.modal-close:hover { background: #fee2e2; border-color: #fca5a5; color: var(--red-500); transform: rotate(90deg); }

.modal-cat {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}
.modal-card h3 { font-size: 1.45rem; letter-spacing: -.4px; margin-bottom: 10px; padding-right: 40px; }
.modal-desc { color: var(--ink-600); font-size: .97rem; margin-bottom: 20px; }
.modal-sub {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 12px;
}
.modal-points { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.modal-points li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: .92rem;
  color: var(--ink-700);
}
.modal-points li::before {
  content: "";
  width: 9px; height: 9px;
  margin-top: 7px;
  border-radius: 3px;
  background: var(--brand-400);
  flex-shrink: 0;
}
.btn-outline {
  background: #fff;
  color: var(--brand-700);
  border: 1.5px solid var(--brand-300);
}
.btn-outline:hover {
  border-color: var(--brand-600);
  color: var(--brand-600);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.modal-open { overflow: hidden; }

/* ---------- CTA banner ---------- */
.cta-banner { background: var(--grad-navy); position: relative; overflow: hidden; }
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding: clamp(48px, 6vw, 72px) 0;
}
.cta-text h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.4px; margin-bottom: 8px; }
.cta-text p { color: #a9becb; max-width: 520px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-actions .btn svg { width: 18px; height: 18px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .workflow { grid-template-columns: repeat(3, 1fr); }
  .module-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .hero-page-inner { grid-template-columns: 1fr; }
  .overview-panel { max-width: 560px; margin: 0 auto; width: 100%; }
  .overview-list { display: grid; grid-template-columns: 1fr 1fr; }
  .cta-inner { justify-content: center; text-align: center; }
  .cta-text p { margin-inline: auto; }
}

@media (max-width: 720px) {
  .workflow { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-list { grid-template-columns: 1fr; }
  .modal-card { padding: 28px 22px 24px; }
}

@media (max-width: 480px) {
  .workflow { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .overview-item:hover { transform: none; }
}
