/* ==========================================================================
   Marigat Catholic Mission Hospital — 2026 Site Rebuild
   Fresh design system. Built from scratch (not the old ThemeMascot theme).
   ========================================================================== */

:root {
  --blue: #1662ac;
  --blue-dark: #0c3b68;
  --blue-light: #eaf2fb;
  --pink: #e7268e;
  --pink-dark: #b81c70;
  --pink-light: #fdeaf4;
  --ink: #182634;
  --muted: #66788a;
  --bg-soft: #f6f8fb;
  --border: #e6ebf1;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(22, 98, 172, 0.08);
  --shadow-lg: 0 20px 50px rgba(22, 98, 172, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--ink);
}

p { line-height: 1.75; color: var(--muted); }

a { color: var(--blue); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--pink); }

img { max-width: 100%; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

section { padding: 80px 0; }
@media (max-width: 767px) { section { padding: 50px 0; } }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pink);
  margin-bottom: 12px;
}
.section-tag::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--pink);
  display: inline-block;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 14px;
}

.section-lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.02rem;
}

.bg-soft { background: var(--bg-soft); }
.bg-blue { background: var(--blue); }
.bg-blue-dark { background: var(--blue-dark); }
.text-white { color: #fff !important; }
.text-white p, .text-white h1, .text-white h2, .text-white h3 { color: #fff; }

/* ---------- Buttons ---------- */
.btn-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-brand:hover { transform: translateY(-2px); }

.btn-pink {
  background: var(--pink);
  color: #fff;
}
.btn-pink:hover { background: var(--pink-dark); color: #fff; box-shadow: 0 14px 28px rgba(231,38,142,0.3); }

.btn-blue {
  background: var(--blue);
  color: #fff;
}
.btn-blue:hover { background: var(--blue-dark); color: #fff; box-shadow: 0 14px 28px rgba(22,98,172,0.3); }

.btn-outline-white {
  background: transparent;
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
.btn-outline-white:hover { background: #fff; color: var(--blue-dark); }

.btn-outline-blue {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}
.btn-outline-blue:hover { background: var(--blue); color: #fff; }

.btn-sm { padding: 9px 18px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn-brand:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--blue-dark);
  color: #cfe0f2;
  font-size: 12.5px;
  padding: 8px 0;
}
@media (max-width: 767px) {
  .topbar { display: none; }
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar a { color: #eaf2fb; }
.topbar a:hover { color: var(--pink); }
.topbar .topbar-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; }
.topbar .pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #35d07f; display: inline-block;
  box-shadow: 0 0 0 0 rgba(53,208,127,0.6);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(53,208,127,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(53,208,127,0); }
  100% { box-shadow: 0 0 0 0 rgba(53,208,127,0); }
}

/* ---------- Main nav ---------- */
.navbar-main {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
}
.navbar-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav-brand img { height: 54px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links > li { position: relative; }
.nav-links a {
  color: var(--ink);
  font-weight: 600;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.nav-links > li.active > a,
.nav-links a:hover { color: var(--pink); }
.dd-caret { font-size: 9px; margin-left: 4px; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 8px 0;
  margin: 0;
  list-style: none;
  z-index: 20;
}
.has-dropdown:hover > .dropdown-menu { display: block; }
.has-dropdown.open > .dropdown-menu { display: block; }
@media (min-width: 992px) {
  .has-dropdown { padding-bottom: 12px; margin-bottom: -12px; }
}
.dropdown-menu li a {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  text-transform: none;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.dropdown-menu li a:hover { background: var(--blue-light); color: var(--blue); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--blue-dark);
  cursor: pointer;
}
.nav-cta { margin-left: 6px; }
.nav-cta .btn-brand { color: #fff !important; }
.nav-cta .btn-brand:hover { color: #fff !important; }

@media (max-width: 991px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: 80vh;
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; }
  .nav-links > li > a { display: block; padding: 14px 24px; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-cta { margin: 14px 24px; }
  .nav-toggle { display: block; }
  .dropdown-menu {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: var(--bg-soft);
    margin: 0;
    width: 100%;
  }
  .has-dropdown.open > .dropdown-menu { display: block; }
  .has-dropdown:hover > .dropdown-menu { display: none; }
  .has-dropdown.open:hover > .dropdown-menu { display: block; }
}

/* ---------- Hero Slider ---------- */
.hero-slider {
  position: relative;
  height: 88vh;
  min-height: 520px;
  max-height: 780px;
  overflow: hidden;
  background: var(--blue-dark);
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,59,104,0.55) 0%, rgba(12,59,104,0.78) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  max-width: 680px;
}
.hero-content .section-tag { color: #ffd1e9; }
.hero-content .section-tag::before { background: #ffd1e9; }
.hero-content h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  margin-bottom: 18px;
}
.hero-content p { color: #dce9f7; font-size: 1.08rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.4);
  cursor: pointer; padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-dots button.is-active { background: var(--pink); transform: scale(1.25); }

/* ---------- Stats strip ---------- */
.stats-strip {
  background: #fff;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  margin-top: -60px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stats-strip .stat { text-align: center; padding: 28px 10px; border-right: 1px solid var(--border); }
.stats-strip .stat:last-child { border-right: none; }
.stats-strip .stat .num { font-size: 1.9rem; font-weight: 800; color: var(--blue); }
.stats-strip .stat .lbl { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 767px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); margin-top: -40px; }
  .stats-strip .stat:nth-child(2) { border-right: none; }
}

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.icon-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.icon-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.icon-circle {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.icon-card:hover .icon-circle { background: var(--pink); color: #fff; }
.icon-card h4 { font-size: 1.05rem; margin-bottom: 8px; }
.icon-card p { font-size: 14px; margin-bottom: 0; }

.photo-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.photo-card img { width: 100%; height: 230px; object-fit: cover; transition: transform 0.4s ease; }
.photo-card:hover img { transform: scale(1.08); }
.photo-card .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(12,59,104,0.85));
  color: #fff; padding: 30px 18px 14px; font-weight: 600; font-size: 14px;
}

/* ---------- Testimonial / quote ---------- */
.quote-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow);
}
.quote-card .fa-quote-left { color: var(--pink-light); font-size: 34px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--blue-dark), var(--pink-dark));
  border-radius: var(--radius);
  padding: 50px 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.cta-band h3 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue));
  padding: 70px 0 50px;
  color: #fff;
  text-align: center;
}
.page-header h1 { color: #fff; margin-bottom: 8px; }
.page-header .crumbs { font-size: 13px; color: #cfe0f2; }
.page-header .crumbs a { color: #fff; }
.page-header .crumbs a:hover { color: var(--pink-light); }

/* ---------- Accordion (FAQs) ---------- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q .fa { transition: transform 0.2s ease; color: var(--pink); }
.faq-item.open .faq-q .fa { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 22px;
  background: var(--bg-soft);
}
.faq-item.open .faq-a { padding: 0 22px 18px; }

/* ---------- Forms ---------- */
.form-control-brand {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control-brand:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22,98,172,0.12);
}
label.field-label { font-weight: 600; font-size: 13px; margin-bottom: 6px; display: block; }
.field-group { margin-bottom: 18px; }
.field-required { color: var(--pink); }

.form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px;
}
@media (max-width: 575px) { .form-card { padding: 26px; } }

.status-msg {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-top: 12px;
}
.status-msg.ok { background: #eafaf1; border: 1px solid #b7ecd0; color: #1a7f4d; }
.status-msg.err { background: #fdecec; border: 1px solid #f6bcbc; color: #b8272e; }

.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 12px; font-weight: 700;
  margin-right: 8px;
}
.otp-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.otp-row input { max-width: 150px; letter-spacing: 6px; font-weight: 700; text-align: center; }
.verified-badge { color: #1a7f4d; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
fieldset:disabled { opacity: 0.55; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-dark); color: #cfe0f2; padding-top: 60px; }
.site-footer h5 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 18px; }
.site-footer a { color: #cfe0f2; }
.site-footer a:hover { color: var(--pink-light); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-logo img { height: 60px; margin-bottom: 14px; background: #fff; padding: 6px 10px; border-radius: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 40px;
  padding: 20px 0;
  font-size: 12.5px;
  text-align: center;
  color: #9fb7cf;
}
.social-row { display: flex; gap: 10px; margin-top: 16px; }
.social-row a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.social-row a:hover { background: var(--pink); }

/* ---------- Gallery grid ---------- */
.gallery-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ---------- Front desk dashboard ---------- */
.fd-wrap { background: var(--blue-dark); min-height: 100vh; padding: 30px 0 60px; }
.fd-header { color: #fff; margin-bottom: 24px; }
.fd-header .fd-sub { color: rgba(255,255,255,0.6); font-size: 13px; }
.fd-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.fd-table th { text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em; color: var(--muted); border-top: none !important; }
.fd-table td { vertical-align: middle; font-size: 14px; }
.fd-row-new { animation: fdFlash 1.8s ease-in-out 3; }
@keyframes fdFlash { 0%, 100% { background-color: transparent; } 50% { background-color: rgba(231,38,142,0.18); } }
.fd-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.fd-badge.pending { background: rgba(231,38,142,0.12); color: var(--pink-dark); }
.fd-badge.confirmed { background: rgba(22,172,142,0.15); color: #0e7a63; }
.fd-badge.cancelled { background: rgba(220,53,69,0.12); color: #c0392b; }
.fd-sound-toggle {
  display: inline-flex; align-items: center; gap: 8px; color: #fff;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.fd-sound-toggle.is-muted { opacity: 0.6; }
.fd-empty { padding: 60px 20px; text-align: center; color: var(--muted); }

/* ---------- Mini slider (service gallery, testimonials) ---------- */
.mini-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.mini-slider-track {
  display: flex;
  transition: transform 0.5s ease;
}
.mini-slide {
  flex: 0 0 100%;
  width: 100%;
  padding: 0 6px;
  box-sizing: border-box;
}
.mini-slide img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 8px;
}
.mini-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--blue-dark);
  box-shadow: var(--shadow);
  z-index: 5;
}
.mini-slider-arrow.prev { left: 14px; }
.mini-slider-arrow.next { right: 14px; }
.mini-slider-dots {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
  z-index: 5;
}
.mini-slider-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.6);
  cursor: pointer; padding: 0;
}
.mini-slider-dots button.is-active { background: var(--pink); }

.testimonial-slider .mini-slide { padding: 6px; }

/* ---------- Pagination ---------- */
.pagination-brand { display: flex; justify-content: center; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.pagination-brand a, .pagination-brand span {
  min-width: 38px; height: 38px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--ink);
}
.pagination-brand a:hover { border-color: var(--pink); color: var(--pink); }
.pagination-brand .is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.pagination-brand .disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Pricing table ---------- */
.pricing-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pricing-table th { background: var(--blue-dark); color: #fff; text-align: left; padding: 14px 18px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.pricing-table td { padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-table tr:hover td { background: var(--blue-light); }
.pricing-dept-row td { background: var(--pink-light); font-weight: 800; color: var(--pink-dark); text-transform: uppercase; font-size: 12px; letter-spacing: 0.03em; }
.price-tag { font-weight: 800; color: var(--blue); }

/* ---------- Events ---------- */
.event-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.event-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.event-card img { width: 100%; height: 190px; object-fit: cover; }
.event-card .body { padding: 20px; }
.event-date-badge {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--pink); color: #fff; border-radius: 10px;
  width: 56px; height: 56px; line-height: 1.1; margin-right: 12px; flex-shrink: 0;
}
.event-date-badge .d { font-size: 20px; font-weight: 800; }
.event-date-badge .m { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.event-meta { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; margin: 10px 0 14px; }
.event-meta span { display: flex; align-items: center; gap: 6px; }
.event-status { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px; display: inline-block; margin-bottom: 10px; }
.event-status.upcoming { background: var(--blue-light); color: var(--blue); }
.event-status.today { background: #fff3cd; color: #8a6516; }
.event-status.past { background: #f1f1f1; color: var(--muted); }
.event-countdown { display: flex; gap: 10px; margin: 16px 0; }
.event-countdown .box { background: var(--blue-dark); color: #fff; border-radius: 8px; padding: 10px 12px; text-align: center; min-width: 60px; }
.event-countdown .box .n { font-size: 20px; font-weight: 800; }
.event-countdown .box .l { font-size: 10px; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.8; }
.events-section-title { display: flex; align-items: center; gap: 10px; margin: 50px 0 22px; }
.events-section-title h3 { margin: 0; }
.events-section-title .line { flex: 1; height: 1px; background: var(--border); }

/* ---------- Facility groups ---------- */
.group-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.group-card img { width: 100%; height: 200px; object-fit: cover; }
.group-card .body { padding: 22px; }

/* ---------- Partners grid ---------- */
.partner-tile {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  height: 100px; padding: 16px; transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.partner-tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.partner-tile img { max-height: 60px; max-width: 100%; object-fit: contain; }

/* ---------- Daktari Mashinani banner ---------- */
.dm-banner {
  background: linear-gradient(120deg, var(--pink-dark), var(--blue-dark));
  border-radius: var(--radius);
  padding: 36px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.dm-banner .dm-icon {
  width: 74px; height: 74px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; flex-shrink: 0;
}
.dm-banner h3 { color: #fff; font-size: 1.5rem; margin-bottom: 6px; }
.dm-banner .dm-badge {
  display: inline-block; background: #ffd94d; color: #5c4400;
  font-weight: 800; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.dm-banner p { color: rgba(255,255,255,0.92); margin-bottom: 0; font-size: 15px; }
.dm-banner strong { color: #ffe37a; }

/* ---------- Job cards ---------- */
.job-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.job-card .tags { display: flex; gap: 8px; margin: 10px 0 14px; flex-wrap: wrap; }
.job-tag { background: var(--blue-light); color: var(--blue); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; }
.line-divider { width: 60px; height: 3px; background: var(--pink); border-radius: 2px; margin: 10px 0 22px; }
.badge-soft { background: var(--pink-light); color: var(--pink-dark); font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 999px; text-transform: uppercase; }

/* ---------- Floating badges ---------- */
.float-badge-24-7 {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 900;
  background: var(--blue-dark);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid var(--pink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
}
.float-badge-24-7.shake {
  animation: badgeShake 0.6s ease;
}

.badge-door-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  perspective: 60px;
  flex-shrink: 0;
}
.badge-door {
  font-size: 15px;
  color: var(--gold, #ffd94d);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.float-badge-24-7.shake .badge-door {
  animation: badgeDoorSwing 0.6s ease;
}
@keyframes badgeDoorSwing {
  0%   { transform: rotateY(0deg); }
  30%  { transform: rotateY(55deg); }
  60%  { transform: rotateY(-15deg); }
  100% { transform: rotateY(0deg); }
}
@keyframes badgeShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px) rotate(-3deg); }
  30% { transform: translateX(5px) rotate(3deg); }
  45% { transform: translateX(-4px) rotate(-2deg); }
  60% { transform: translateX(3px) rotate(2deg); }
  75% { transform: translateX(-2px); }
}

.scroll-top-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  border: none;
  font-size: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.scroll-top-btn.show { display: flex; }
.scroll-top-btn:hover { background: var(--pink-dark); transform: translateY(-3px); }

@media (max-width: 575px) {
  .float-badge-24-7 { font-size: 11px; padding: 8px 12px; left: 12px; bottom: 12px; }
  .scroll-top-btn { width: 40px; height: 40px; right: 12px; bottom: 12px; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 28, 0.94);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-content {
  max-width: 88vw;
  max-height: 84vh;
  text-align: center;
}
.lightbox-content img {
  max-width: 88vw;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  margin: 0 auto;
}
.lightbox-content p {
  color: #fff;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--pink); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}
.lightbox-nav:hover { background: var(--pink); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }
@media (max-width: 575px) {
  .lightbox-nav { width: 38px; height: 38px; font-size: 15px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; width: 36px; height: 36px; }
}

/* ---------- Facility groups: fixed 3-per-row grid ---------- */
.group-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 991px) {
  .group-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .group-grid { grid-template-columns: 1fr; }
}

/* ---------- Responsive cover image helper (service/event hero photos) ---------- */
.responsive-cover-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
@media (max-width: 767px) {
  .responsive-cover-img { height: 240px; }
}

/* ============================================================
   Mobile-friendly pass: tighten up spacing, type scale, and
   fixed-height elements across small screens.
   ============================================================ */
@media (max-width: 767px) {
  section { padding: 40px 0; }
  .hero-slider { height: 78vh; min-height: 440px; }
  .hero-content { max-width: 100%; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn-brand { flex: 1 1 auto; justify-content: center; }

  .mini-slide img { height: 200px; }
  .photo-card img { height: 170px; }
  .event-card img { height: 150px; }
  .group-card img { height: 150px; }

  .dm-banner { padding: 24px 20px; flex-direction: column; text-align: center; }
  .dm-banner .dm-icon { margin: 0 auto; }
  .dm-banner .btn-brand { width: 100%; justify-content: center; }

  .cta-band { flex-direction: column; text-align: center; padding: 32px 24px; }
  .cta-band .btn-brand { width: 100%; justify-content: center; }

  .stats-strip .stat .num { font-size: 1.5rem; }

  .pricing-table th, .pricing-table td { padding: 10px 12px; font-size: 13px; }

  .job-card, .icon-card, .quote-card, .group-card .body, .event-card .body { padding: 20px; }

  .event-date-badge { width: 48px; height: 48px; }
  .event-countdown { flex-wrap: wrap; gap: 8px; }
  .event-countdown .box { min-width: 52px; padding: 8px 10px; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: left; }

  .topbar .container { flex-direction: column; align-items: flex-start; gap: 4px; }
  .topbar .topbar-item { margin-right: 12px; font-size: 11.5px; }

  .otp-row input[type="text"] { max-width: 120px; }
}

@media (max-width: 400px) {
  .hero-content h1 { font-size: 1.7rem; }
  .section-title { font-size: 1.4rem; }
  .nav-brand img { height: 42px; }
}

/* 4-across service gallery slider: shorter thumbnails look better than the tall 1-per-view style */
.mini-slider[data-per-view="4"] .mini-slide img { height: 220px; }
@media (max-width: 767px) {
  .mini-slider[data-per-view="4"] .mini-slide img { height: 240px; }
}

/* ---------- Hide wordy/explanatory content on mobile, form-only pages ---------- */
@media (max-width: 767px) {
  .hide-wordy-mobile { display: none !important; }
}

/* ============================================================
   Global overflow safety net + final mobile audit pass
   ============================================================ */
html, body { max-width: 100%; overflow-x: clip; }
* { min-width: 0; }
img, video, iframe { max-width: 100%; height: auto; }
table { max-width: 100%; }
pre, code { white-space: pre-wrap; word-break: break-word; }

.container { width: 100%; box-sizing: border-box; }
.row { margin-left: 0; margin-right: 0; }

/* Long unbroken strings (emails, URLs, refs) shouldn't force horizontal scroll */
.admin-table td, .pricing-table td, .quote-card p, .form-card, .status-msg {
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 575px) {
  .container { padding: 0 16px; }
  .btn-brand { font-size: 12px; padding: 11px 20px; }
  .page-header { padding: 50px 0 36px; }
  .page-header h1 { font-size: 1.5rem; }
  .form-card { padding: 22px 18px; }
  .otp-row { flex-direction: column; align-items: stretch; }
  .otp-row input[type="text"] { max-width: 100%; }
  .event-countdown { justify-content: center; }
  .dm-banner h3 { font-size: 1.15rem; }
  .nav-brand img { height: 40px; }
  .icon-card, .job-card, .group-card .body, .event-card .body, .quote-card { padding: 18px; }
  .admin-content { padding: 14px; }
  .admin-topbar { padding: 14px 16px 14px 60px; }
  .admin-topbar h1 { font-size: 1.05rem; }
  .admin-stat-card { padding: 16px; }
}

@media (max-width: 480px) {
  .dm-banner > div[style*="min-width"] { min-width: 0 !important; }
}
