/* =========================================================
   Medizensys — Modern Healthcare SaaS Theme
   ========================================================= */

:root {
  --mz-green-900: #0b3d2e;
  --mz-green-700: #0f7a4a;
  --mz-green-600: #12945a;
  --mz-green-500: #17b167;
  --mz-green-400: #3fd487;
  --mz-green-100: #e5f8ee;
  --mz-green-50: #f2fbf6;

  --mz-ink-900: #0e1b2b;
  --mz-ink-700: #33475b;
  --mz-ink-500: #62788d;
  --mz-ink-300: #94a7b8;
  --mz-border: #e3ece7;

  --mz-bg: #ffffff;
  --mz-bg-soft: #f6faf8;

  --mz-radius-sm: 10px;
  --mz-radius: 16px;
  --mz-radius-lg: 24px;

  --mz-shadow-sm: 0 2px 8px rgba(14, 27, 43, 0.06);
  --mz-shadow: 0 12px 32px -8px rgba(15, 122, 74, 0.18);
  --mz-shadow-lg: 0 24px 60px -16px rgba(14, 27, 43, 0.2);

  --mz-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mz-font-display: 'Poppins', var(--mz-font);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--mz-font);
  color: var(--mz-ink-700);
  background: var(--mz-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mz-font-display);
  color: var(--mz-ink-900);
  font-weight: 700;
}

a { color: var(--mz-green-600); text-decoration: none; }
a:hover { color: var(--mz-green-700); }

.text-green { color: var(--mz-green-600) !important; }
.bg-soft { background: var(--mz-bg-soft); }

/* ---------- Utility sections ---------- */
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
@media (max-width: 767px) {
  .section { padding: 56px 0; }
  .section-sm { padding: 36px 0; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mz-green-600);
  background: var(--mz-green-100);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section-title { font-size: clamp(1.7rem, 2.4vw, 2.5rem); line-height: 1.2; margin-bottom: 14px; }
.section-lead { color: var(--mz-ink-500); font-size: 1.05rem; max-width: 640px; }

/* ---------- Buttons ---------- */
.btn-mz-primary {
  background: linear-gradient(135deg, var(--mz-green-600), var(--mz-green-500));
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--mz-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-mz-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(15,122,74,.35); color: #fff; }

.btn-mz-outline {
  background: transparent;
  color: var(--mz-green-700);
  border: 1.5px solid var(--mz-green-500);
  padding: 11px 26px;
  border-radius: 999px;
  font-weight: 600;
  transition: all .2s ease;
}
.btn-mz-outline:hover { background: var(--mz-green-500); color: #fff; }

.btn-mz-light {
  background: #fff;
  color: var(--mz-green-700);
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--mz-shadow-sm);
}
.btn-mz-light:hover { color: var(--mz-green-700); transform: translateY(-2px); }

/* ---------- Navbar ---------- */
.mz-topbar {
  background: var(--mz-green-900);
  color: #d9f2e6;
  font-size: .85rem;
}
.mz-topbar a { color: #d9f2e6; }
.mz-topbar .divider { opacity: .35; }

.mz-navbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: var(--mz-shadow-sm);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.mz-navbar .navbar-brand { padding: 0; }
.mz-navbar .mz-logo { height: 60px; width: auto; display: block; }
@media (max-width: 400px) {
  .mz-navbar .mz-logo { height: 60px; }
}
.mz-navbar .nav-link {
  font-weight: 600;
  color: var(--mz-ink-700) !important;
  padding: 8px 16px !important;
  border-radius: 999px;
}
.mz-navbar .nav-link.active,
.mz-navbar .nav-link:hover { color: var(--mz-green-600) !important; background: var(--mz-green-100); }
.mz-navbar .dropdown-menu {
  border: none;
  border-radius: var(--mz-radius-sm);
  box-shadow: var(--mz-shadow-lg);
  padding: 10px;
}
.mz-navbar .dropdown-item { border-radius: 8px; padding: 10px 14px; font-weight: 500; }
.mz-navbar .dropdown-item:hover { background: var(--mz-green-100); color: var(--mz-green-700); }

/* ---------- Hero ---------- */
.mz-hero {
  position: relative;
  background: radial-gradient(1100px 500px at 85% -10%, var(--mz-green-100), transparent),
              linear-gradient(180deg, var(--mz-bg-soft), #fff 70%);
  overflow: hidden;
  padding: 90px 0 60px;
}
.mz-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(23,177,103,.12) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 60%);
  pointer-events: none;
}
.mz-hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 999px; padding: 8px 16px;
  box-shadow: var(--mz-shadow-sm); font-weight: 600; font-size: .85rem;
  color: var(--mz-ink-700); margin-bottom: 20px;
}
.mz-hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.12; }
.mz-hero-visual {
  border-radius: var(--mz-radius-lg);
  box-shadow: var(--mz-shadow-lg);
  overflow: hidden;
}

/* ---------- Hero: DNA animated background (image-style plexus + helix) ---------- */
.mz-hero-dna {
  background:
    radial-gradient(1100px 620px at 25% 15%, rgba(63, 212, 135, .16), transparent 60%),
    radial-gradient(900px 500px at 80% 80%, rgba(63, 212, 135, .10), transparent 65%),
    linear-gradient(160deg, #030b08 0%, #05130f 45%, #0a2420 100%);
  isolation: isolate;
  padding: 130px 0 96px;
}
.mz-hero-dna::before {
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1.5px, transparent 1.5px);
  mask-image: none;
}
.mz-hero-dna .container { position: relative; z-index: 3; }

/* Canvas "plexus" particle network — faint connected dots drifting behind the helix */
.dna-network {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .8;
}

/* Horizontal double-helix strand made from a seamlessly looping sine-wave chain */
.dna-wave-wrap {
  position: absolute;
  inset: -10% -5%;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  transform: rotate(-6deg);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.dna-wave-track {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  animation: dnaScroll 16s linear infinite;
}
.dna-period {
  position: relative;
  flex: none;
  height: 1px;
}
.dna-pair {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
}
.dna-rung2 {
  position: absolute;
  left: -1px;
  top: calc(min(var(--yt), var(--yb)));
  width: 2px;
  height: calc(max(var(--yt), var(--yb)) - min(var(--yt), var(--yb)));
  background: linear-gradient(180deg, var(--mz-green-400), rgba(255, 255, 255, .55));
  opacity: .3;
}
.dna-node {
  position: absolute;
  left: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: dnaPulse 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.25s);
}
.dna-node-top {
  top: calc(var(--yt) - 6px);
  background: radial-gradient(circle at 35% 30%, #e3ffef, var(--mz-green-400) 55%, transparent 78%);
  box-shadow: 0 0 12px 3px rgba(63, 212, 135, .65);
}
.dna-node-bottom {
  top: calc(var(--yb) - 6px);
  background: radial-gradient(circle at 35% 30%, #f3fffb, #ffffff 55%, transparent 78%);
  box-shadow: 0 0 10px 3px rgba(255, 255, 255, .45);
  animation-direction: reverse;
}

@keyframes dnaScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-480px); } /* one dna-period width (dnaPeriodWidth in Index.cshtml) */
}
@keyframes dnaPulse {
  0%, 100% { opacity: .6; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.25); }
}

.mz-hero-dna .mz-hero-badge { background: rgba(255, 255, 255, .08); color: #eafff4; box-shadow: none; border: 1px solid rgba(255, 255, 255, .18); }
.mz-hero-dna h1 { color: #fff; }
.mz-hero-dna h1 .text-green { color: var(--mz-green-400) !important; }
.mz-hero-dna .section-lead { color: rgba(255, 255, 255, .78); }
.mz-hero-dna .mz-check-list li { color: rgba(255, 255, 255, .92); }
.mz-hero-dna .mz-check-list .ico { background: rgba(255, 255, 255, .12); color: var(--mz-green-400); }
.mz-hero-dna .btn-mz-outline { color: #fff; border-color: rgba(255, 255, 255, .5); }
.mz-hero-dna .btn-mz-outline:hover { background: #fff; color: var(--mz-green-700); }
.mz-hero-dna .mz-hero-visual { box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .5); border: 6px solid rgba(255, 255, 255, .08); }

@media (prefers-reduced-motion: reduce) {
  .dna-node, .dna-wave-track { animation: none !important; }
}
@media (max-width: 767px) {
  .dna-network { opacity: .5; }
  .dna-wave-wrap { opacity: .7; }
  .mz-hero-dna { padding: 96px 0 64px; }
}

/* small page hero (inner pages) */
.mz-page-hero {
  background: linear-gradient(135deg, var(--mz-green-900), var(--mz-green-700) 60%, var(--mz-green-500));
  color: #fff;
  padding: 70px 0 64px;
  position: relative;
  overflow: hidden;
}
.mz-page-hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}
.mz-page-hero .breadcrumb-mz { color: rgba(255,255,255,.75); font-weight: 600; font-size: .85rem; letter-spacing: .03em; text-transform: uppercase; }
.mz-page-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); position: relative; z-index: 1; }
.mz-page-hero p { color: rgba(255,255,255,.85); max-width: 680px; position: relative; z-index: 1; }

/* ---------- Cards ---------- */
.mz-card {
  background: #fff;
  border: 1px solid var(--mz-border);
  border-radius: var(--mz-radius);
  padding: 30px;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.mz-card:hover { transform: translateY(-6px); box-shadow: var(--mz-shadow); border-color: transparent; }

.mz-icon-tile {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--mz-green-100);
  color: var(--mz-green-600);
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.mz-stat { text-align: center; }
.mz-stat .num { font-family: var(--mz-font-display); font-size: 2.4rem; font-weight: 800; color: var(--mz-green-700); }
.mz-stat .label { color: var(--mz-ink-500); font-weight: 600; font-size: .92rem; }

.mz-module-card {
  display: block;
  background: #fff;
  border: 1px solid var(--mz-border);
  border-radius: var(--mz-radius);
  padding: 26px 22px;
  text-align: center;
  height: 100%;
  transition: all .25s ease;
}
.mz-module-card:hover { background: var(--mz-green-600); border-color: var(--mz-green-600); transform: translateY(-4px); box-shadow: var(--mz-shadow); }
.mz-module-card:hover, .mz-module-card:hover .mz-module-icon { color: #fff; }
.mz-module-icon { font-size: 2rem; color: var(--mz-green-600); margin-bottom: 12px; transition: color .25s ease; }
.mz-module-card .title { font-weight: 700; font-size: .95rem; color: inherit; }

.mz-testimonial {
  background: var(--mz-bg-soft);
  border-radius: var(--mz-radius);
  padding: 28px;
  height: 100%;
}
.mz-testimonial .quote-mark { font-size: 2.4rem; color: var(--mz-green-400); line-height: 1; font-family: Georgia, serif; }

.mz-cta {
  background: linear-gradient(120deg, var(--mz-green-700), var(--mz-green-500));
  border-radius: var(--mz-radius-lg);
  color: #fff;
  padding: 56px;
  position: relative;
  overflow: hidden;
}
.mz-cta::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.15) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}
.mz-cta * { position: relative; z-index: 1; }

.mz-accordion .accordion-button { font-weight: 600; color: var(--mz-ink-900); }
.mz-accordion .accordion-button:not(.collapsed) { background: var(--mz-green-100); color: var(--mz-green-700); box-shadow: none; }
.mz-accordion .accordion-item { border: 1px solid var(--mz-border); border-radius: var(--mz-radius-sm) !important; overflow: hidden; margin-bottom: 12px; }
.mz-accordion .accordion-button:focus { box-shadow: none; }

/* ---------- Feature list ---------- */
.mz-check-list { list-style: none; padding: 0; margin: 0; }
.mz-check-list li { display: flex; gap: 12px; margin-bottom: 14px; }
.mz-check-list .ico {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--mz-green-100); color: var(--mz-green-600);
  display: flex; align-items: center; justify-content: center; font-size: .85rem; margin-top: 2px;
}

/* ---------- Blog ---------- */
.mz-blog-card img { border-radius: var(--mz-radius) var(--mz-radius) 0 0; height: 210px; object-fit: cover; width: 100%; }
.mz-blog-card { border: 1px solid var(--mz-border); border-radius: var(--mz-radius); overflow: hidden; height: 100%; background: #fff; transition: box-shadow .25s ease, transform .25s ease; }
.mz-blog-card:hover { box-shadow: var(--mz-shadow); transform: translateY(-4px); }
.mz-blog-card .body { padding: 22px; }
.mz-tag { display: inline-block; background: var(--mz-green-100); color: var(--mz-green-700); font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Forms ---------- */
.mz-form .form-control, .mz-form .form-select {
  border-radius: var(--mz-radius-sm);
  border: 1.5px solid var(--mz-border);
  padding: 12px 16px;
  /* Fixed px (not rem) so it stays 16px even where the mobile root font-size is 14px —
     inputs under 16px trigger an unwanted auto-zoom on focus in iOS Safari. */
  font-size: 16px;
}
.mz-form .form-control:focus, .mz-form .form-select:focus {
  border-color: var(--mz-green-500);
  box-shadow: 0 0 0 4px var(--mz-green-100);
}
.mz-form label { font-weight: 600; color: var(--mz-ink-900); margin-bottom: 6px; }

.mz-contact-card {
  background: #fff; border-radius: var(--mz-radius); border: 1px solid var(--mz-border);
  padding: 26px; height: 100%; text-align: center;
}

/* ---------- Footer ---------- */
.mz-footer { background: var(--mz-ink-900); color: #b9c7d3; padding: 72px 0 0; }
.mz-footer h6 { color: #fff; font-weight: 700; margin-bottom: 20px; text-transform: uppercase; font-size: .85rem; letter-spacing: .05em; }
.mz-footer a { color: #b9c7d3; }
.mz-footer a:hover { color: var(--mz-green-400); }
.mz-footer ul { list-style: none; padding: 0; margin: 0; }
.mz-footer ul li { margin-bottom: 12px; }
.mz-footer .brand img { height: 40px; margin-bottom: 16px; }
.mz-footer .social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.06); margin-right: 8px;
}
.mz-footer .social a:hover { background: var(--mz-green-500); color: #fff; }
.mz-footer .bottom-bar { border-top: 1px solid rgba(255,255,255,.08); margin-top: 48px; padding: 22px 0; font-size: .85rem; color: #7f909e; }
.mz-footer .bottom-bar a { color: #b9c7d3; }
.mz-footer .bottom-bar a:hover { color: var(--mz-green-400); }

/* Cookie consent banner */
.mz-cookie-consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1050;
  background: var(--mz-ink-900);
  color: #d9e3ec;
  box-shadow: 0 -10px 30px -10px rgba(0, 0, 0, .35);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .35s ease, opacity .35s ease, visibility 0s linear .35s;
}
.mz-cookie-consent.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform .35s ease, opacity .35s ease;
}
.mz-cookie-consent-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.mz-cookie-consent-inner p { flex: 1 1 320px; font-size: .92rem; color: #d9e3ec; margin: 0; }
.mz-cookie-consent-inner a { color: var(--mz-green-400); font-weight: 600; }
.mz-cookie-consent-actions { display: flex; gap: 10px; flex: none; }
.mz-cookie-consent .btn-mz-outline { color: #fff; border-color: rgba(255, 255, 255, .5); }
.mz-cookie-consent .btn-mz-outline:hover { background: #fff; color: var(--mz-ink-900); }
body.mz-has-cookie-banner #mzBackToTop { bottom: 110px; }
@media (max-width: 575px) {
  .mz-cookie-consent-inner { padding: 16px; }
  .mz-cookie-consent-actions { width: 100%; }
  .mz-cookie-consent-actions .btn { flex: 1; }
  body.mz-has-cookie-banner #mzBackToTop { bottom: 140px; }
}

/* Back to top */
#mzBackToTop {
  position: fixed; right: 24px; bottom: 24px; z-index: 1040;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--mz-green-600); color: #fff; border: none;
  box-shadow: var(--mz-shadow); display: none; align-items: center; justify-content: center;
}

/* Responsive tweaks */
@media (max-width: 991px) {
  .mz-navbar .navbar-collapse {
    background: #fff;
    border-radius: var(--mz-radius-sm);
    box-shadow: var(--mz-shadow-lg);
    padding: 16px;
    margin-top: 10px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }
  /* Bigger, easier-to-tap nav items stacked full width */
  .mz-navbar .nav-link { display: block; padding: 12px 16px !important; }
  .mz-navbar .navbar-nav { gap: 2px; }
  .mz-navbar .dropdown-toggle::after { float: right; margin-top: 8px; }
  /* Let the Solutions submenu expand inline instead of floating off-screen */
  .mz-navbar .dropdown-menu {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    box-shadow: none;
    background: var(--mz-green-50);
    margin: 4px 0 8px;
  }
  .mz-navbar .dropdown-item { padding: 10px 16px; }
  .mz-navbar .btn-mz-primary { width: 100%; text-align: center; }
}

/* ---------- Mobile friendliness ---------- */
@media (max-width: 767px) {
  .mz-hero .d-flex.flex-wrap.gap-3 { flex-direction: column; align-items: stretch; }
  .mz-hero .btn-mz-primary,
  .mz-hero .btn-mz-outline { width: 100%; text-align: center; }

  .mz-cta { padding: 36px 22px; }
  .mz-cta .btn-mz-light { width: 100%; }

  .mz-footer { padding: 48px 0 0; }
  .mz-footer .col-lg-4,
  .mz-footer .col-lg-2,
  .mz-footer .col-lg-3 { margin-bottom: 8px; }

  #mzBackToTop { width: 42px; height: 42px; right: 16px; bottom: 16px; }

  .mz-topbar .d-flex.align-items-center.gap-3 span,
  .mz-topbar .d-flex.align-items-center.gap-3 a { font-size: .8rem; }
}

@media (max-width: 575px) {
  .mz-hero-badge { white-space: normal; text-align: left; }
  .mz-stat .num { font-size: 1.9rem; }
  .mz-testimonial, .mz-contact-card, .mz-card { padding: 22px; }
}

/* Comfortable touch targets everywhere */
@media (pointer: coarse) {
  .btn, .btn-mz-primary, .btn-mz-outline, .btn-mz-light,
  .mz-navbar .nav-link, .mz-navbar .dropdown-item,
  .navbar-toggler { min-height: 44px; }
  .mz-accordion .accordion-button { min-height: 52px; }
  .mz-module-card, .mz-card a, .mz-blog-card a { -webkit-tap-highlight-color: transparent; }
}

/* Extra-small phones (<= 400px) */
@media (max-width: 400px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .mz-page-hero { padding: 56px 0 44px; }
  .mz-hero-dna { padding: 84px 0 52px; }
  .mz-cta { padding: 28px 16px; }
  .mz-cta h2 { font-size: 1.4rem; }
  .mz-card, .mz-testimonial, .mz-contact-card { padding: 18px; }
  .mz-icon-tile { width: 48px; height: 48px; font-size: 1.25rem; }
  .eyebrow { font-size: .7rem; padding: 5px 12px; }
}

/* Prevent long words/links from forcing horizontal scroll on narrow screens */
h1, h2, h3, h4, h5, .mz-check-list li, .mz-form label, a {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Safety net: any incidental wide content (embeds, iframes, tables) scrolls
   internally instead of breaking the page layout on small screens */
.section, .mz-page-hero, .mz-hero {
  max-width: 100vw;
}
table { display: block; max-width: 100%; overflow-x: auto; }
iframe { max-width: 100%; }
