/* ===========================================================
   RSM Medicals Ltd — modern site styles
   =========================================================== */

:root {
  --navy: #0b2e6b;
  --navy-dark: #071f4a;
  --navy-light: #12409a;
  --ink: #10192b;
  --muted: #57647a;
  --line: #e4e8f0;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --red: #e0596b;
  --green: #4cae5c;
  --blue: #4fb3d9;
  --radius: 14px;
  --shadow: 0 20px 45px -20px rgba(11, 46, 107, 0.28);
  --shadow-sm: 0 8px 20px -12px rgba(11, 46, 107, 0.25);
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-light);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--navy-light);
  display: inline-block;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 16px; font-weight: 800; letter-spacing: -0.01em; }

h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--navy-dark); }

.section-head { max-width: 680px; margin-bottom: 52px; }

.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }

.lede { color: var(--muted); font-size: 1.08rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover { background: var(--navy-light); }

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.btn-outline {
  background: #fff;
  border-color: var(--line);
  color: var(--navy-dark);
}

.btn-outline:hover { border-color: var(--navy-light); color: var(--navy-light); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
  border-color: var(--line);
  box-shadow: 0 4px 20px -10px rgba(11, 46, 107, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--navy-dark); font-size: 1.05rem; }

.brand img { height: 64px; width: auto; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-text small { font-weight: 600; color: var(--muted); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 32px; }

.main-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--navy-light);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.main-nav a:hover::after { transform: scaleX(1); }

.header-cta { display: flex; align-items: center; gap: 14px; }

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--navy-dark);
  font-size: 0.92rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span { width: 24px; height: 2px; background: var(--navy-dark); border-radius: 2px; }

/* ---------- Hero ---------- */

.hero {
  padding: 168px 0 96px;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(79, 179, 217, 0.18), transparent 60%),
    linear-gradient(180deg, #f5f8fd 0%, #ffffff 100%);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #eef2fc;
  color: var(--navy-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.1rem);
  color: var(--navy-dark);
}

.hero h1 span { color: var(--navy-light); }

.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.btn-primary.dark, .btn-outline.dark {}

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.hero-stats div strong { display: block; font-size: 1.6rem; color: var(--navy-dark); font-weight: 800; }

.hero-stats div span { font-size: 0.85rem; color: var(--muted); }

.hero-media { position: relative; }

.hero-media .frame {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}

.hero-media .frame img { width: 100%; height: 100%; object-fit: cover; }

.hero-card {
  position: absolute;
  bottom: -28px;
  left: -28px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 260px;
}

.hero-card .dot {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 1.3rem;
}

.hero-card strong { display: block; font-size: 0.95rem; color: var(--navy-dark); }

.hero-card span { font-size: 0.8rem; color: var(--muted); }

/* ---------- Logo strip ---------- */

.logo-strip { padding: 40px 0; border-bottom: 1px solid var(--line); }

.logo-strip p {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 26px;
}

.logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
}

.logo-row img { height: 56px; width: auto; object-fit: contain; }

/* ---------- Services ---------- */

.services { background: var(--bg-soft); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 34px 28px;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.service-card.has-photo { padding: 0; overflow: hidden; }

.service-photo { height: 170px; }

.service-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.service-card.has-photo .service-body { padding: 24px 28px 34px; }

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #fff;
}

.service-icon.red { background: linear-gradient(135deg, var(--red), #c94459); }
.service-icon.green { background: linear-gradient(135deg, var(--green), #348a41); }
.service-icon.blue { background: linear-gradient(135deg, var(--blue), #2f8bb0); }

.service-card h3 { font-size: 1.15rem; color: var(--navy-dark); }

.service-card p { color: var(--muted); font-size: 0.96rem; margin: 0; }

/* ---------- Testing detail ---------- */

.testing {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.testing-media {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}

.testing-media img { width: 100%; height: 100%; object-fit: cover; }

.check-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }

.check-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--ink);
}

.check-list .tick {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e9f6ec;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  margin-top: 2px;
}

.check-list strong { display: block; color: var(--navy-dark); font-size: 0.98rem; }

.check-list span.detail { color: var(--muted); font-size: 0.92rem; }

.callout-strip {
  margin-top: 34px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.callout-strip .badge {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 0.85rem;
}

.callout-strip p { margin: 0; font-size: 0.92rem; color: #dfe6f5; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-media { position: relative; }

.about-media .frame {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 5 / 4;
}

.about-media img { width: 100%; height: 100%; object-fit: cover; }

.location-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }

.location-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--navy-dark);
  font-size: 0.98rem;
}

.location-list .pin {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #eef2fc;
  color: var(--navy-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ---------- Testimonials ---------- */

.testimonials { background: var(--bg-soft); }

.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testi-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.testi-stars { color: #f2a93c; font-size: 0.95rem; letter-spacing: 2px; }

.testi-card p.quote {
  color: var(--ink);
  font-size: 0.95rem;
  margin: 0;
  flex-grow: 1;
}

.testi-who { display: flex; align-items: center; gap: 12px; margin-top: 4px; }

.testi-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.testi-who strong { display: block; font-size: 0.9rem; color: var(--navy-dark); }
.testi-who span { font-size: 0.8rem; color: var(--muted); }

.testi-logo {
  height: 44px;
  min-width: 44px;
  max-width: 108px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 6px 8px;
}
.testi-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- CTA banner ---------- */

.cta-banner {
  background: linear-gradient(120deg, var(--navy-dark), var(--navy) 60%, var(--navy-light));
  color: #fff;
  border-radius: 28px;
  margin: 0 24px;
  padding: 64px 48px;
  text-align: center;
  max-width: calc(var(--container) - 48px);
  margin-left: auto;
  margin-right: auto;
}

.cta-banner h2 { color: #fff; }

.cta-banner p { color: #d7e0f5; max-width: 560px; margin: 0 auto 30px; }

.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.contact-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 34px;
  border: 1px solid var(--line);
  height: fit-content;
}

.contact-row { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }

.contact-row:last-child { border-bottom: none; padding-bottom: 0; }

.contact-row .icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--navy-light);
}

.contact-row strong { display: block; color: var(--navy-dark); font-size: 0.95rem; margin-bottom: 2px; }
.contact-row span, .contact-row a { color: var(--muted); font-size: 0.92rem; }
.contact-row a:hover { color: var(--navy-light); }

.form-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form-grid .full { grid-column: 1 / -1; }

label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--navy-dark); margin-bottom: 8px; }

input, textarea, select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 0.94rem;
  background: #fbfcfe;
  transition: border-color 0.15s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--navy-light);
  background: #fff;
}

textarea { resize: vertical; min-height: 110px; }

.form-card .btn { margin-top: 6px; width: 100%; justify-content: center; }

.form-note { font-size: 0.82rem; color: var(--muted); margin-top: 14px; text-align: center; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-dark); color: #cfd8ec; padding: 64px 0 28px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 40px 28px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.footer-brand img { height: 60px; border-radius: 10px; background: #fff; padding: 5px; }

.footer-brand strong { color: #fff; font-size: 1rem; }

.site-footer p { font-size: 0.88rem; color: #aab6d4; max-width: 320px; }

.footer-social { display: flex; gap: 12px; margin-top: 20px; }

.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.footer-social a:hover { transform: translateY(-3px) scale(1.06); filter: brightness(1.1); box-shadow: 0 10px 20px -6px rgba(0,0,0,0.55); }

.footer-social a.instagram { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.footer-social a.facebook { background: #1877f2; }
.footer-social a.linkedin { background: #0a66c2; }

.footer-social svg { width: 19px; height: 19px; fill: currentColor; }

.footer-col h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; }

.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }

.footer-col a { color: #aab6d4; font-size: 0.9rem; }

.footer-col a:hover { color: #fff; }

.footer-col-badges { display: flex; flex-direction: column; align-items: flex-start; }

.footer-certs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-certs img {
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  object-fit: contain;
}

.footer-certs .cert-verified { width: 83px; height: 123px; }
.footer-certs .cert-audited { width: 75px; height: 117px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.82rem;
  color: #8b98bd;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a { color: #8b98bd; text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero .container, .testing, .about, .contact-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .card-grid, .testi-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-phone span.text { display: none; }
}

@media (max-width: 640px) {
  section { padding: 64px 0; }
  .hero { padding-top: 140px; }
  .card-grid, .testi-grid, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .hero-card { position: static; margin-top: 20px; max-width: none; }
  .cta-banner { padding: 44px 24px; margin: 0 16px; }
  .logo-row { gap: 30px; }
}

/* Mobile nav panel */
.main-nav.open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  flex-direction: column;
  padding: 20px 24px 28px;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease, visibility 0.2s;
  z-index: 60;
}

.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

.back-to-top:hover { background: var(--navy-light); }

.back-to-top svg { width: 20px; height: 20px; fill: currentColor; }

@media (max-width: 640px) {
  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}
