/* ==========================================================================
   Nirmay Ortho & Gynae Clinic — theme styles
   Palette: cream #FAF6ED · maroon #6B2135 · teal #2F4B5E · gold #B8892E
   ========================================================================== */

:root {
  --nm-cream: #FAF6ED;
  --nm-cream-2: #EFEBDF;
  --nm-card: #FDFBF5;
  --nm-maroon: #6B2135;
  --nm-maroon-deep: #3E1220;
  --nm-teal: #2F4B5E;
  --nm-gold: #B8892E;
  --nm-ink: #33272A;
  --nm-muted: #6E5F5F;
  --nm-line: rgba(107, 33, 53, 0.14);
  --nm-wa: #22C55E;
  --nm-display: 'Playfair Display', Georgia, serif;
  --nm-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --nm-mono: 'JetBrains Mono', 'Courier New', monospace;
}

body { -webkit-font-smoothing: antialiased; }

/* ---------- generic section rhythm ---------- */
.nm-section { padding: 76px 24px; }
.nm-section--tint { background: var(--nm-cream-2); }
.nm-wrap { max-width: 1160px; margin: 0 auto; }

.nm-eyebrow {
  font-family: var(--nm-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nm-gold);
  margin: 0 0 10px;
}

.nm-h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 0 0 34px; }

/* ---------- grids ---------- */
.nm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.nm-grid-2--tight { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.nm-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.nm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* WordPress flow layout injects margin-block-start on every sibling child
   (block gap). Inside our grids and flex cards that margin staggers items
   vertically, so neutralise it there. */
.nm-grid-2 > *, .nm-grid-2--tight > *, .nm-grid-3 > *,
.nm-grid-4 > *, .nm-svc > *, .nm-doc > *, .nm-doc__top > * {
  margin-block-start: 0 !important;
}

/* ---------- buttons ---------- */
.nm-btn .wp-block-button__link,
a.nm-btn-link {
  font-family: var(--nm-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  padding: 13px 26px;
  text-decoration: none;
  display: inline-block;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.nm-btn .wp-block-button__link:hover,
a.nm-btn-link:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(62, 18, 32, 0.18); }

.nm-btn--maroon .wp-block-button__link { background: var(--nm-maroon); color: #fff; }
.nm-btn--outline .wp-block-button__link { background: transparent; color: var(--nm-maroon); border-color: var(--nm-maroon); }
.nm-btn--dark .wp-block-button__link { background: var(--nm-maroon-deep); color: #fff; }
.nm-btn--wa .wp-block-button__link { background: var(--nm-wa); color: #063; }

/* ==========================================================================
   Header
   ========================================================================== */
.nm-header {
  background: var(--nm-cream);
  border-bottom: 1px solid var(--nm-line);
  padding: 14px 24px;
  position: relative;
  z-index: 30;
}
.nm-header .nm-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.nm-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nm-brand img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 1px solid var(--nm-line); }
.nm-brand__name {
  font-family: var(--nm-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--nm-ink);
  line-height: 1.1;
  margin: 0;
}
.nm-brand__tag {
  font-family: var(--nm-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--nm-gold);
  margin: 3px 0 0;
  text-transform: uppercase;
}
.nm-header .wp-block-navigation a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--nm-ink);
  text-decoration: none;
}
.nm-header .wp-block-navigation a:hover { color: var(--nm-maroon); }
.nm-header-cta { display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap; justify-content: center; }

/* ==========================================================================
   Hero
   ========================================================================== */
.nm-hero { padding: 84px 24px 64px; text-align: center; }
.nm-badge {
  display: inline-block;
  font-family: var(--nm-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--nm-gold);
  border: 1px solid rgba(184, 137, 46, 0.45);
  border-radius: 999px;
  padding: 7px 18px;
  margin: 0 0 26px;
  background: rgba(184, 137, 46, 0.06);
}
.nm-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  margin: 0 auto 24px;
  max-width: 820px;
}
.nm-hero h1 em { font-style: italic; color: var(--nm-maroon); }
.nm-hero__sub {
  max-width: 560px;
  margin: 0 auto 34px;
  color: var(--nm-muted);
  font-size: 1.06rem;
}
.nm-hero .wp-block-buttons { justify-content: center; }

.nm-trust {
  display: flex;
  justify-content: center;
  gap: 42px;
  flex-wrap: wrap;
  border-top: 1px solid var(--nm-line);
  margin: 52px auto 0;
  padding: 26px 12px 0;
  max-width: 760px;
  color: var(--nm-muted);
  font-size: 0.92rem;
}
.nm-trust span::before { content: "✓"; color: var(--nm-gold); font-weight: 700; margin-right: 8px; }

/* ==========================================================================
   Specialty cards
   ========================================================================== */
.nm-svc { background: var(--nm-card); border: 1px solid var(--nm-line); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(62,18,32,0.05); height: 100%; display: flex; flex-direction: column; }
.nm-svc__head { padding: 28px 28px 22px; color: #fff; flex-shrink: 0; }
.nm-svc__head--teal { background: var(--nm-teal); }
.nm-svc__head--maroon { background: var(--nm-maroon); }
.nm-svc__head h3 { color: #fff; margin: 0 0 6px; font-size: 1.45rem; }
.nm-svc__head p { margin: 0; font-size: 0.9rem; opacity: 0.85; color: #fff; }
.nm-svc__body { padding: 22px 28px 26px; flex-grow: 1; display: flex; flex-direction: column; }
.nm-svc__body ul { list-style: none; margin: 0 0 18px; padding: 0; }
.nm-svc__body li { padding: 9px 0 9px 26px; position: relative; border-bottom: 1px dashed var(--nm-line); font-size: 0.98rem; }
.nm-svc__body li:last-child { border-bottom: 0; }
.nm-svc__body li::before { content: "◆"; position: absolute; left: 2px; top: 10px; font-size: 0.6rem; color: var(--nm-gold); }
.nm-svc__body p:last-child { margin-top: auto; padding-top: 8px; }
.nm-svc__more { font-weight: 600; font-size: 0.94rem; text-decoration: none; }
.nm-svc__more:hover { text-decoration: underline; }

/* ==========================================================================
   Doctor cards
   ========================================================================== */
.nm-doc { background: var(--nm-card); border: 1px solid var(--nm-line); border-radius: 14px; padding: 28px; height: 100%; display: flex; flex-direction: column; }
.nm-doc__top { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 16px; }
.nm-doc__top figure, .nm-doc__top .wp-block-image { margin: 0; flex-shrink: 0; }
.nm-doc__top img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid var(--nm-cream-2); }
.nm-doc h3 { margin: 4px 0 10px; font-size: 1.3rem; }
.nm-doc__badge {
  display: inline-block;
  font-family: var(--nm-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0;
}
.nm-doc__badge--teal { background: rgba(47, 75, 94, 0.12); color: var(--nm-teal); }
.nm-doc__badge--maroon { background: rgba(107, 33, 53, 0.1); color: var(--nm-maroon); }
.nm-doc__bio { color: var(--nm-muted); font-size: 0.97rem; margin: 0 0 18px; flex-grow: 1; }
.nm-doc__link { font-weight: 600; font-size: 0.94rem; text-decoration: none; border-top: 1px solid var(--nm-line); display: block; padding-top: 16px; margin-top: auto; }
.nm-doc__link:hover { text-decoration: underline; }

/* ==========================================================================
   Stats band
   ========================================================================== */
.nm-stats { background: var(--nm-maroon); padding: 46px 24px; }
.nm-stats .nm-grid-4 > div { text-align: center; border-right: 1px solid rgba(255,255,255,0.18); padding: 6px 12px; }
.nm-stats .nm-grid-4 > div:last-child { border-right: 0; }
.nm-stats strong {
  display: block;
  font-family: var(--nm-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: #fff;
  margin-bottom: 6px;
}
.nm-stats span { font-family: var(--nm-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.75); }

/* ==========================================================================
   Why cards
   ========================================================================== */
.nm-why { background: var(--nm-card); border: 1px solid var(--nm-line); border-radius: 12px; padding: 26px 28px; }
.nm-why h3 { font-family: var(--nm-body); font-weight: 600; font-size: 1.06rem; margin: 0 0 8px; }
.nm-why h3::before { content: "❖"; color: var(--nm-maroon); margin-right: 10px; }
.nm-why p { margin: 0; color: var(--nm-muted); font-size: 0.95rem; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.nm-quote { background: var(--nm-cream-2); border: 1px solid var(--nm-line); border-radius: 12px; padding: 30px; }
.nm-quote blockquote { margin: 0 0 20px; font-style: italic; font-size: 1.02rem; line-height: 1.7; border: 0; padding: 0; }
.nm-quote__who { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--nm-line); padding-top: 18px; }
.nm-quote__dot { width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nm-quote__dot--teal { background: var(--nm-teal); }
.nm-quote__dot--maroon { background: var(--nm-maroon); }
.nm-quote__who p { margin: 0; font-size: 0.95rem; font-weight: 600; }
.nm-quote__who small { font-family: var(--nm-mono); font-size: 0.7rem; color: var(--nm-gold); letter-spacing: 0.08em; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.nm-cta { background: var(--nm-gold); text-align: center; padding: 66px 24px; }
.nm-cta h2 { margin: 0 0 14px; color: #2A1E08; }
.nm-cta p { max-width: 520px; margin: 0 auto 30px; color: #4A3A14; }
.nm-cta .wp-block-buttons { justify-content: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.nm-footer { background: var(--nm-maroon-deep); color: rgba(255,255,255,0.82); padding: 58px 24px 0; font-size: 0.94rem; }
.nm-footer h2, .nm-footer h3 { color: #fff; }
.nm-footer .nm-foot-name { font-family: var(--nm-display); font-size: 1.25rem; margin: 0 0 14px; }
.nm-footer .nm-foot-label { font-family: var(--nm-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--nm-gold); margin: 0 0 12px; }
.nm-footer p { margin: 0 0 8px; }
.nm-footer a { color: rgba(255,255,255,0.85); }
.nm-footer .nm-foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 44px;
  padding: 20px 0 26px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.nm-foot-bottom p { margin: 0; }

/* ---------- floating WhatsApp button ---------- */
.nm-wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--nm-wa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  text-decoration: none;
  transition: transform 0.15s ease;
}
.nm-wa-float:hover { transform: scale(1.07); }
.nm-wa-float svg { width: 30px; height: 30px; }

/* ---------- Google rating badge ---------- */
.nm-google-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--nm-line);
  border-radius: 999px;
  padding: 8px 18px 8px 12px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  margin: 0 0 20px;
}
.nm-google-badge:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.13); transform: translateY(-1px); }
.nm-google-badge__logo { width: 22px; height: 22px; flex-shrink: 0; }
.nm-google-badge__stars { color: #FBBC04; font-size: 1rem; letter-spacing: 1px; line-height: 1; }
.nm-google-badge__text { font-family: var(--nm-body); font-size: 0.88rem; font-weight: 600; color: var(--nm-ink); line-height: 1.2; }
.nm-google-badge__text small { display: block; font-weight: 400; color: var(--nm-muted); font-size: 0.78rem; }

/* stats band google rating cell */
.nm-stats .nm-google-stat { text-align: center; border-right: 1px solid rgba(255,255,255,0.18); padding: 6px 12px; }
.nm-stats .nm-google-stat:last-child { border-right: 0; }
.nm-stats .nm-google-stat strong { display: block; font-family: var(--nm-display); font-size: clamp(1.7rem,3vw,2.3rem); color: #FBBC04; margin-bottom: 6px; letter-spacing: 1px; }
.nm-stats .nm-google-stat span { font-family: var(--nm-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.75); }

/* ---------- large doctor profile (service pages) ---------- */
.nm-doc > .nm-doc__photo { margin: 0 0 18px; }
.nm-doc > .nm-doc__photo img { width: 100%; max-width: 360px; height: auto; border-radius: 12px; display: block; }
.nm-doc-hero { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 36px; align-items: start; background: var(--nm-card); border: 1px solid var(--nm-line); border-radius: 14px; padding: 28px; }
.nm-doc-hero > * { margin-block-start: 0 !important; }
.nm-doc-hero figure, .nm-doc-hero .wp-block-image { margin: 0; }
.nm-doc-hero img { width: 100%; height: auto; border-radius: 12px; display: block; }
.nm-doc-hero h2 { margin: 6px 0 12px; }
@media (max-width: 760px) {
  .nm-doc-hero { grid-template-columns: 1fr; gap: 22px; }
  .nm-doc-hero img { max-width: 340px; margin: 0 auto; }
}

/* ---------- inner page hero ---------- */
.nm-page-hero { background: var(--nm-cream-2); text-align: center; padding: 64px 24px; border-bottom: 1px solid var(--nm-line); }
.nm-page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 14px; }
.nm-page-hero p { max-width: 620px; margin: 0 auto; color: var(--nm-muted); }

/* ---------- accessibility / motion ---------- */
a:focus-visible, button:focus-visible, .wp-block-button__link:focus-visible {
  outline: 3px solid var(--nm-gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .nm-grid-4 { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .nm-stats .nm-grid-4 > div:nth-child(2) { border-right: 0; }
  .nm-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nm-section { padding: 56px 20px; }
  .nm-grid-2, .nm-grid-2--tight { grid-template-columns: 1fr; }
  .nm-hero { padding: 58px 20px 48px; }
  .nm-trust { gap: 18px; }
  .nm-header .nm-wrap { justify-content: center; }
  .nm-footer .nm-foot-bottom { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
  .nm-grid-4 { grid-template-columns: 1fr; }
  .nm-stats .nm-grid-4 > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.18); padding-bottom: 18px; }
  .nm-stats .nm-grid-4 > div:last-child { border-bottom: 0; }
  .nm-doc__top { flex-direction: column; }
}
