/*
Theme Name:   Shree Ortho Clinic
Theme URI:    https://shreeorthoclinic.in/
Author:       Supremacy Technologies Private Limited
Author URI:   https://supremacytechnologies.in/
Description:  The website for Shree Ortho Clinic, Chennai — orthopaedics and sports medicine under Dr. Sripal J, across two clinics. Four pages: a home page whose body diagram lets a patient tap the joint that hurts, an About page for the consultant, an Appointments page whose enquiry form emails reception and keeps a copy in the dashboard, and a Contact page with WhatsApp and a printable QR code. A live indicator reads your consulting hours and tells patients whether the clinic is open. Everything is edited from a plain form on each page — no blocks, no page builder.
Version:      1.14.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  shree-ortho
Tags:         one-column, custom-menu, custom-logo, editor-style, translation-ready
*/

/* ============================================================
   The design system is assets/style.css, enqueued ahead of this
   file and kept byte-identical to the original static site — do
   not edit it, so a future diff against the source still lines up.

   This file carries the theme header, and exactly one thing else:
   the two collisions between that stylesheet and the class names
   WordPress writes onto <body>.
   ============================================================ */

/* --- collision 1: .page ------------------------------------------------
   assets/style.css line 165 has `.page{display:none;}` — a leftover from
   the single-file build, where the five "pages" were panels toggled by
   JavaScript. WordPress adds `page` to the body class of every static
   page, so that rule would match <body> and render the whole site blank.

   Re-scoping the rule to the page wrapper inside <main> keeps the
   original behaviour for the div and takes <body> out of its reach. */
body.page,
body.tag {
  display: block;
}

#main > .page {
  display: none;
}

#main > .page.active {
  display: block;
  animation: fade .34s ease;
}

/* --- collision 2: .tag -------------------------------------------------
   `.tag` is the pill used in the old records table. WordPress adds `tag`
   to the body class on a tag archive, which would paint the whole page
   as a pill. Only the visual properties need undoing; the display fix is
   above. */
body.tag {
  border-radius: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 400;
  background: var(--paper);
  color: var(--body);
}

/* --- the logo mark is a circle ------------------------------------------
   The clinic's logo is circular; the rounded-square box the design system
   gives .brand-mark left corners showing around it. The masthead and the
   footer both use the mark, so one rule covers both. */
.brand-mark,
.brand-mark img {
  border-radius: 50%;
}

/* --- justified body text ----------------------------------------------
   Every running paragraph on the site — ledes, card descriptions, FAQ
   answers, the footer blurb and disclaimer — is justified on desktop and
   mobile alike. Headings, buttons, chips, list items, navigation and
   tables are left as they are: short lines justify badly. Hyphenation is
   on so narrow columns do not open rivers between words. */
p,
.lede,
.ans,
.disclaim .shell,
.rpanel,
.qcard > span > span:last-child,
.svc-tile > span:last-child,
.cred span,
.svc span,
.step p,
.aside-card p,
.prose p {
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* Short, centred or label-like text stays as designed. */
.center p,
.center .lede,
.sec-head.center p,
.btn,
.chip,
.pill,
.eyebrow,
.rpanel .foot-note,
.qrnote,
.toast,
.hero-dots,
.svc-count,
.fact > span,
.hours td,
.hours th {
  text-align: inherit;
  -webkit-hyphens: manual;
  hyphens: manual;
}

/* --- the hero, without the joint picker --------------------------------
   The picker has moved down the page. The hero keeps its photograph and
   its copy in one column, held to a reading width. */
.hero-slider .hero-grid {
  grid-template-columns: 1fr;
}

.hero-slider .hero-grid > div {
  max-width: 760px;
}

/* --- the joint picker section -----------------------------------------
   Built from the hero's own classes, so the photograph, the navy wash,
   the faint grid and the frosted card are the hero's exact rules. Only
   the vertical padding differs: this is a mid-page section, not the top
   of the page, so it has no room reserved for the quick-action bar. */
.picker {
  padding: 92px 0;
}

.picker-grid {
  grid-template-columns: 1fr 520px;
  gap: 56px;
}

.picker .h2 {
  color: #fff;
}

.picker-intro .lede {
  margin-top: 14px;
}

@media (max-width: 960px) {
  .picker-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .picker .mapcard {
    max-width: 560px;
  }
}

/* --- treatments & services --------------------------------------------
   Three rows, one per group. A label rail on the left carries the group's
   index, name, a one-line descriptor and its count; the treatments sit to
   its right as numbered tiles, three across. Six, three and six items,
   so every row fills its grid exactly. */
.svc-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.svc-row:first-of-type {
  border-top: 0;
  padding-top: 8px;
}

.svc-row:last-of-type {
  padding-bottom: 0;
}

.svc-rail {
  position: relative;
  padding-top: 6px;
}

.svc-index {
  display: block;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--blue-100);
  margin-bottom: 10px;
}

.svc-rail .h3 {
  font-size: 21px;
}

.svc-rail p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--slate);
  line-height: 1.6;
  max-width: 26ch;
}

.svc-count {
  display: inline-block;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.svc-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-content: start;
}

.svc-tiles > * {
  min-width: 0;
}

.svc-tile {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 20px 20px;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}

.svc-tile::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue-600);
  opacity: 0;
  transition: opacity .18s;
}

.svc-tile:hover {
  transform: translateY(-2px);
  border-color: var(--blue-300);
  box-shadow: 0 12px 28px rgba(7, 29, 61, .08);
}

.svc-tile:hover::before {
  opacity: 1;
}

.svc-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--blue-600);
  background: var(--blue-050);
  border-radius: 6px;
  padding: 3px 7px;
  margin-bottom: 12px;
}

.svc-tile b {
  display: block;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 5px;
}

.svc-tile > span:last-child {
  display: block;
  font-size: 13px;
  color: var(--slate);
  line-height: 1.55;
}

@media (max-width: 960px) {
  .svc-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .svc-index {
    font-size: 40px;
  }

  .svc-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .svc-tiles {
    grid-template-columns: 1fr;
  }
}

/* --- the conditions grid ----------------------------------------------
   Four across, eight cards, every card the same height and every button
   on the same baseline, whatever the length of the list above it. */
#conditions .sec-head {
  margin-bottom: 22px;
}

.cond-card {
  display: flex;
  flex-direction: column;
}

.cond-card .cond-cta {
  margin-top: auto;
  align-self: flex-start;
  padding-top: 9px;
}

.cond-card ul {
  margin-bottom: 18px;
}

.cond-card--other p {
  margin-top: 12px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--body);
}

@media (max-width: 960px) {
  .cond-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .cond-grid {
    grid-template-columns: 1fr;
  }
}

/* --- the hero slider --------------------------------------------------
   Two slides crossfading on a slow loop: the banner artwork, then the
   hero. The slides have different heights — the banner keeps its own
   proportions, the hero keeps its full layout — so the wrapper's height
   is set by the script to the active slide's and animated between the
   two, rather than one slide being cropped to fit the other. */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  transition: height 1.1s cubic-bezier(.4, 0, .2, 1);
}

.hero-slide {
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
  transition: opacity 1.3s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

/* The quick-action bar overlaps the section above it by 64px (48px on
   phones); the hero carries that much bottom padding for it. The banner
   slide does the same so the bar lands on navy, not on the artwork. */
.hero-slide--banner {
  padding-bottom: 64px;
}

.hero-slide--banner img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .hero-slide--banner {
    padding-bottom: 48px;
  }

  /* The banner is short at phone widths and the quick-action bar covers
     the band beneath it, so there is nowhere for the dots to sit. */
  .hero-dots {
    display: none;
  }
}

/* Inside the slider the hero is one slide, not the page's top edge. */
.hero-slider .hero {
  margin: 0;
}

/* Sits just above the band the quick-action bar overlaps. */
.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 78px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
  transition: background .3s, transform .3s;
}

.hero-dot.is-active {
  background: #fff;
  transform: scale(1.25);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slider,
  .hero-slide {
    transition: none;
  }
}

/* --- the consultant card, when the picture is not a portrait ----------
   assets/style.css gives this card a fixed 1 : 1.12 box, a navy gradient
   and `object-fit: cover`. All three are right for a head-and-shoulders
   photograph and wrong for anything taller — the Lausanne montage is 9:16,
   and cover would crop it to a square and throw most of it away.

   When the image carries .doc-photo--contain the card drops its fixed
   ratio and its background and takes the picture's own proportions, so
   nothing is cropped and nothing is letterboxed. PHP adds that class to
   the shipped montage and to any chosen image taller than 1.5 : 1. */
.doc-portrait .doc-photo--contain {
  position: static;
  width: 100%;
  height: auto;
  padding: 0;
  display: block;
  border-radius: var(--r-lg);
  object-fit: fill;
}

.doc-portrait:has(.doc-photo--contain) {
  aspect-ratio: auto;
  background: none;
  display: block;
}

/* The about page gives its picture a wider column than the home page. */
.soc-page-about .doc {
  grid-template-columns: 360px 1fr;
  align-items: start;
}

@media (max-width: 860px) {
  .soc-page-about .doc {
    grid-template-columns: 1fr;
  }

  .doc-portrait:has(.doc-photo--contain) {
    max-width: 340px;
    aspect-ratio: auto;
  }
}

/* --- the milestone section --------------------------------------------
   The only translucent section on the page, sitting between two white
   ones — which is what makes it the thing you stop at.

   Every ingredient is borrowed from the hero rather than invented: the
   photograph dimmed behind a navy wash, the same two radial gradients,
   the same faint 58px grid masked to a circle, and the frosted panel the
   joint diagram sits in. The amber hairline across the top of the panel
   and the amber badge on the photograph are the one accent colour the
   site already uses for "this is the selected thing".

   Nothing here touches assets/style.css: .eyebrow.on-dark, .lede.on-dark,
   .chip and .hero-facts were all written for a dark background already. */
.milestone {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: #fff;
  padding: 104px 0;
}

/* The montage again, blurred past recognition. Reusing the picture the
   section is about means there is no second image to ship, and nothing
   for the client to keep in sync when they swap the photograph. */
.milestone-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  opacity: .42;
  filter: blur(15px) saturate(.9);
  /* The blur bleeds transparent pixels in from the edges; scaling the
     image past the frame pushes that bleed outside the section. */
  transform: scale(1.14);
  z-index: 0;
}

/* The hero's own two washes, over a navy veil deep enough to keep the
   text at full contrast whatever photograph is chosen. */
.milestone::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(760px 520px at 78% 34%, rgba(30, 136, 229, .34), transparent 62%),
    radial-gradient(620px 460px at 8% 0%, rgba(19, 74, 168, .5), transparent 60%),
    linear-gradient(180deg, rgba(7, 29, 61, .76), rgba(7, 29, 61, .9));
}

/* The hero's grid, masked to a soft circle. */
.milestone::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at 50% 42%, #000, transparent 76%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000, transparent 76%);
}

.milestone > .shell {
  position: relative;
  z-index: 2;
}

/* The frosted panel — the joint diagram's .mapcard treatment, scaled up
   and centred, so the section has a clear middle to look at. */
.milestone-card {
  position: relative;
  max-width: 1020px;
  margin-inline: auto;
  padding: 38px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 28px;
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  box-shadow:
    0 30px 80px rgba(3, 13, 30, .5),
    inset 0 1px 0 rgba(255, 255, 255, .14);
}

.milestone-card::before {
  content: "";
  position: absolute;
  left: 38px;
  right: 38px;
  top: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: .8;
}

.milestone-grid {
  display: grid;
  /* 300px is the consultant block's own figure, so the picture here lines
     up with the portrait further up the page. */
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: center;
}

.milestone-figure {
  position: relative;
  margin: 0;
}

.milestone-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 18px 44px rgba(3, 13, 30, .45);
}

.milestone-badge {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--amber);
  color: #3b2600;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 24px rgba(3, 13, 30, .4);
}

.milestone-body .h2 {
  color: #fff;
}

.milestone-body .lede {
  margin-top: 14px;
  max-width: 56ch;
}

.milestone-body .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.milestone-body .hero-facts {
  margin-top: 28px;
  padding-top: 22px;
}

/* The about page gives its consultant block a wider column; the milestone
   follows suit so the two line up there as well. */
.soc-page-about .milestone-grid {
  grid-template-columns: 340px 1fr;
}

@media (max-width: 860px) {
  .milestone {
    padding: 64px 0;
  }

  .milestone-card {
    padding: 24px;
    border-radius: 22px;
  }

  .milestone-card::before {
    left: 24px;
    right: 24px;
  }

  .milestone-grid,
  .soc-page-about .milestone-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .milestone-figure {
    max-width: 300px;
    margin-inline: auto;
  }

  /* Stacked, a centred column reads better than a ragged left edge. */
  .milestone-body {
    text-align: center;
  }

  .milestone-body .eyebrow {
    justify-content: center;
  }

  .milestone-body .lede {
    margin-inline: auto;
  }

  .milestone-body .chips {
    justify-content: center;
  }
}

/* --- a third status, for Sunday ----------------------------------------
   assets/style.css has two states: .pill.open (green) and .pill.shut
   (orange). Sunday is now "Subject to availability" rather than a flat
   closure, and painting that orange tells a patient the clinic is shut
   when it might well see them. Amber sits between the two: not
   consulting, worth ringing. Set the Sunday note back to "Closed" in the
   Customizer and the red state returns automatically. */
.pill.maybe {
  background: var(--amber-soft);
  color: #8a5a00;
}

.status-dot.maybe {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(232, 163, 23, .22);
}

/* --- the spine's selected state ----------------------------------------
   Every other region on the joint diagram lights up through two rules in
   assets/style.css: `.region.on .joint` and `.region.on .bone`. The spine
   is drawn as eight vertebra rectangles and has neither — its only .joint
   is a zero-radius, zero-opacity circle — so choosing "Spine & back" lit
   up the list button and changed nothing on the figure.

   These give the vertebrae the same amber treatment the joints get. The
   ping ellipse added to the markup is picked up by the existing .pulse
   rules, so the spine now behaves exactly like every other region. */
.vertebrae rect {
  transition: fill .22s;
}

.region:hover .vertebrae rect,
.region:focus-visible .vertebrae rect {
  fill: rgba(255, 255, 255, .9);
}

.region.on .vertebrae rect {
  fill: var(--amber);
}

/* --- editor convenience ------------------------------------------------
   The generic page template wraps post content in .prose. Nothing in the
   original stylesheet styles free-form editor output, so give it the
   site's own typography rather than browser defaults. */
.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -.02em;
  margin-top: 1.6em;
}

.prose h3 {
  font-size: 21px;
  color: var(--ink);
  letter-spacing: -.015em;
  margin-top: 1.4em;
}

.prose a {
  color: var(--blue-600);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: .4em;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
}
