/* Multidisciplinary Sydney Pain — shared site styles
   Colours and fonts sampled from multidisciplinarysydneypain.com.au */

:root {
  --bg-page: #F4F6FF;
  --bg-panel: #DDE4FF;
  --bg-panel-80: rgba(221, 228, 255, 0.8);
  --color-primary: #2952D9;
  --color-text: #2952D9;
  --color-button-bg: #1B3898;
  --color-button-text: #F4F6FF;
  --font-heading: 'Poppins', Arial, Helvetica, sans-serif;
  --font-body: 'Poppins', Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--color-text);
  font-family: var(--font-body);
}

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

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

ul { margin: 0; padding: 0; }

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-page);
  border-bottom: 1px solid var(--bg-panel);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand svg { width: 34px; height: 34px; }

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  color: var(--color-primary);
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  flex-wrap: wrap;
}

.main-nav a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--color-primary);
  white-space: nowrap;
}

.main-nav a.active,
.main-nav a:hover {
  text-decoration: underline;
}

.btn-bookings {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 50px;
  padding: 10px 22px;
  flex-shrink: 0;
}

.btn-bookings:hover { background: var(--bg-panel); }

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

.hero {
  position: relative;
  background: url('../images/hero-sunrise-clouds.jpg') center 82% / cover no-repeat;
  padding: 90px 24px;
  min-height: 680px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  background: var(--bg-panel-80);
  max-width: 760px;
  width: 100%;
  padding: 56px 48px;
  text-align: center;
  border-radius: 4px;
}

.hero-card h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 48px;
  line-height: 1.15;
  margin: 0 0 28px;
  color: var(--color-primary);
}

.hero-card p {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 20px;
}

.btn-primary {
  display: inline-block;
  margin-top: 12px;
  background: var(--color-button-bg);
  color: var(--color-button-text);
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .3px;
  padding: 16px 40px;
  border-radius: 2px;
}

.btn-primary:hover { opacity: .9; }

/* ---------- Page header (non-home pages) ---------- */

.page-hero {
  padding: 64px 24px 40px;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 40px;
  color: var(--color-primary);
  margin: 0 0 20px;
}

.page-hero p {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto 14px;
}

/* ---------- Areas of Expertise ---------- */

.expertise {
  background: var(--bg-panel-80);
  padding: 70px 24px;
}

.expertise h2 {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  color: var(--color-primary);
  margin: 0 0 50px;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.expertise-card {
  text-align: center;
}

.expertise-card .thumb {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 18px;
}

.expertise-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expertise-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 12px;
  color: var(--color-primary);
}

.expertise-card p {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Consultations ---------- */

.consultations {
  padding: 70px 24px;
}

.consultations h2 {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  color: var(--color-primary);
  margin: 0 0 46px;
}

.consult-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.consult-grid h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  margin: 0 0 10px;
  color: var(--color-primary);
}

.consult-grid p {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  margin: 0;
}

/* ---------- Generic content sections (Locations / Conditions / Procedures) ---------- */

.content-section {
  padding: 50px 24px;
}

.content-section.alt {
  background: var(--bg-panel-80);
}

.content-section h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 28px;
  color: var(--color-primary);
  margin: 0 0 24px;
  text-align: center;
}

/* Locations */

.office-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto 10px;
  text-align: center;
}

.office-cards .icon {
  font-size: 30px;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.office-cards h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--color-primary);
}

.office-cards p {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  margin: 2px 0;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
  max-width: 1140px;
  margin: 0 auto;
}

.location-grid.single {
  grid-template-columns: repeat(4, 1fr);
}

.location-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  color: var(--color-primary);
  margin: 0 0 14px;
}

.location-card ul {
  list-style: none;
  text-align: center;
}

.location-card li {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 4px;
}

.location-card li a { color: var(--color-primary); text-decoration: underline; }

/* Conditions we treat */

.condition-block {
  max-width: 900px;
  margin: 0 auto 56px;
}

.condition-block h2 {
  text-align: left;
  font-size: 26px;
}

.condition-block > p {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 20px;
}

.condition-block h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-primary);
  margin: 18px 0 8px;
}

.condition-block ul {
  list-style: disc;
  padding-left: 22px;
}

.condition-block li {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 6px;
}

/* Conditions A-Z interactive grid */

.conditions-grid-section {
  padding: 20px 24px 60px;
}

.conditions-grid-section .section-intro {
  max-width: 900px;
  margin: 0 auto 40px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.conditions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 26px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.condition-card {
  background: none;
  border: none;
  padding: 10px 8px 0;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  border-radius: 10px;
  transition: background .15s ease, transform .15s ease;
}

.condition-card:hover,
.condition-card:focus-visible {
  background: var(--bg-panel);
  transform: translateY(-2px);
  outline: none;
}

.condition-card .condition-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  color: var(--color-primary);
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.condition-card .condition-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  border: 3px solid var(--bg-panel);
}

.condition-card .condition-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Condition info modal — deliberately black / white / Times New Roman per spec */

.condition-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.condition-modal-overlay[hidden] { display: none; }

.condition-modal {
  background: #000000;
  color: #ffffff;
  font-family: 'Times New Roman', Times, serif;
  font-size: 14px;
  line-height: 1.6;
  max-width: 680px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 34px 38px;
  border-radius: 6px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.condition-modal h3 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 16px;
  padding-right: 30px;
}

.condition-modal p {
  font-family: 'Times New Roman', Times, serif;
  font-size: 14px;
  color: #ffffff;
  margin: 0 0 14px;
}

.condition-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.condition-modal-close:hover { opacity: .7; }

@media (max-width: 1000px) {
  .conditions-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .conditions-grid { grid-template-columns: repeat(2, 1fr); }
  .condition-modal { padding: 26px 22px; }
}

/* Procedures */

.procedures-intro {
  max-width: 900px;
  margin: 0 auto 40px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}

.procedure-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.procedure-group h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-primary);
  margin: 0 0 12px;
}

.procedure-group ul {
  list-style: disc;
  padding-left: 20px;
}

.procedure-group li {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 6px;
}

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

.site-footer {
  background: var(--bg-panel);
  padding: 50px 24px 30px;
  margin-top: 20px;
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 34px;
}

.footer-logos img {
  max-height: 60px;
  width: auto;
}

.footer-contact {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 22px;
}

.footer-contact a { text-decoration: underline; }

.footer-brand {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .5px;
  margin-bottom: 6px;
}

.footer-copy {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 13px;
  margin-top: 14px;
}

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

@media (max-width: 900px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .office-cards { grid-template-columns: repeat(2, 1fr); }
  .location-grid { grid-template-columns: repeat(2, 1fr); }
  .consult-grid { grid-template-columns: 1fr; }
  .procedure-groups { grid-template-columns: 1fr; }
  .main-nav ul { gap: 16px; }
}

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; }
  .main-nav ul { justify-content: center; }
  .expertise-grid { grid-template-columns: 1fr; }
  .office-cards { grid-template-columns: 1fr; }
  .location-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 36px 24px; }
  .hero-card h1 { font-size: 32px; }
}


.category-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-primary);
  text-align: center;
  margin: 46px 0 26px;
}
.category-heading:first-child { margin-top: 0; }

/* ==========================================================================
   Added: Procedures / Conditions hover-grid + individual detail pages
   ========================================================================== */

/* ---- Shared 4-across grid with hover(2s) tooltip + optional link ---- */

.item-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 44px 28px;
  max-width: 1180px;
  margin: 0 auto;
}

.item-card {
  position: relative;
  text-align: center;
}

.item-card .item-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.item-card .item-link.not-linked {
  cursor: default;
}

.item-card .item-name {
  font-family: 'Times New Roman', Times, serif;
  font-size: 14pt;
  color: #000;
  line-height: 1.3;
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
}

.item-card .item-image-box {
  width: 10cm;
  height: 10cm;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.item-card .item-image-box.has-image {
  border: 1px solid #ccc;
  background: #fafafa;
}

.item-card .item-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-card .item-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  margin-top: 10px;
  width: 300px;
  max-width: 85vw;
  background: #000;
  color: #fff;
  font-family: 'Times New Roman', Times, serif;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
  padding: 16px 18px;
  border-radius: 6px;
  z-index: 60;
  box-shadow: 0 14px 34px rgba(0,0,0,.4);
}

.item-card.tooltip-visible .item-tooltip {
  display: block;
}

@media (max-width: 1000px) {
  .item-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .item-grid { grid-template-columns: repeat(2, 1fr); }
  .item-card .item-image-box { width: 8cm; height: 8cm; }
}
@media (max-width: 420px) {
  .item-grid { grid-template-columns: 1fr; }
}

/* ---- Individual procedure / condition detail pages ---- */

.detail-back-link {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 24px;
}

.detail-back-link a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--color-primary);
  text-decoration: underline;
}

.detail-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 70px;
}

.detail-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: 20pt;
  font-weight: bold;
  color: #000;
  text-align: center;
  margin: 0 0 34px;
}

.detail-layout-wrap {
  width: 100%;
  overflow-x: auto;
}

.detail-layout {
  border-collapse: collapse;
  margin: 0 auto;
}

.detail-layout td {
  vertical-align: top;
  padding: 0 20px;
}

.detail-text {
  font-family: 'Times New Roman', Times, serif;
  font-size: 13pt;
  line-height: 1.65;
  color: #000;
  width: 500px;
  max-width: 46vw;
}

.detail-text p {
  margin: 0 0 16px;
}

.detail-image-cell {
  width: 20cm;
  text-align: center;
}

.detail-image-cell img {
  width: 20cm;
  height: 20cm;
  object-fit: cover;
  border: 1px solid #ccc;
  background: #fafafa;
}

.detail-image-placeholder {
  display: inline-block;
  width: 20cm;
  height: 20cm;
}

@media (max-width: 900px) {
  .detail-layout, .detail-layout tbody, .detail-layout tr, .detail-layout td {
    display: block;
    width: 100% !important;
  }
  .detail-layout td { padding: 0 0 24px; }
  .detail-image-cell img, .detail-image-placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* ---- Procedures-page-only overrides (Procedures.html) ---- */

/* Fix: a grid column's minimum width defaults to the size of its content
   (here, a fixed 10cm image box), so a full 4-across row could demand more
   width than the grid's own max-width and spill past the right edge of the
   page -- shrinking the right-hand margin to nothing on rows with 4 items
   while rows with fewer items stayed correctly centered. Allowing the
   column (and therefore the fixed-size image box inside it, via its
   existing max-width:100%) to shrink below its content size keeps every
   row -- full or partial -- inside the same centered box, so the left and
   right margins end up equal everywhere on the page. */
.procedures-grid-instance .item-card {
  min-width: 0;
}

/* Larger, bolder procedure names */
.procedures-grid-instance .item-card .item-name {
  font-size: 16pt;
  font-weight: bold;
}

/* The row-to-row gap itself stays at the shared default (see .item-grid
   above); JS (hover-grid.js) measures each row's own tallest hover
   dropdown and adds exactly as much extra space below that specific row
   as it needs, so short-text rows stay compact and only the rows with
   long descriptions get pushed further apart. */

/* Bigger, more spaced-out category headings (e.g. "Epidural Steroid
   Injections", "Sympathetic & Ganglion Blocks") */
.category-heading.procedures-heading {
  font-size: 30px;
  margin-bottom: 78px;
}

/* ---- Conditions We Treat-page-only overrides (same treatment as the
   Procedures page above: equal margins fix, larger bold condition names,
   bigger/more-spaced category headings). Per-row dropdown-overlap spacing
   and row image-alignment are handled generically by hover-grid.js for
   both grids. ---- */
.conditions-grid-instance .item-card {
  min-width: 0;
}

.conditions-grid-instance .item-card .item-name {
  font-size: 16pt;
  font-weight: bold;
}

.category-heading.conditions-heading {
  font-size: 30px;
  margin-bottom: 78px;
}


/* ---- Centred rows for the Procedures and Patient Education grids ----
   Flex-wrap instead of a fixed 4-column grid, so every row, including a
   partly filled last row, sits in the middle of the page with equal space
   on the left and right. hover-grid.js detects the flex layout and counts
   the cards in each row itself. */
.procedures-grid-instance {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 28px;
  row-gap: 44px;
}

.procedures-grid-instance .item-card {
  width: calc((100% - 84px) / 4);
}

@media (max-width: 1000px) {
  .procedures-grid-instance .item-card { width: calc((100% - 56px) / 3); }
}
@media (max-width: 720px) {
  .procedures-grid-instance .item-card { width: calc((100% - 28px) / 2); }
}
@media (max-width: 420px) {
  .procedures-grid-instance .item-card { width: 100%; }
}

/* ---- Site logo in the header ---- */
.brand .brand-logo {
  width: 46px;
  height: auto;
  display: block;
}

/* ==========================================================================
   Site design update (27 Sept 2026): shaded blue background, two-row header
   (logo + name + Bookings on top, menu centred below), style 4 wordmark,
   Deep Navy intro text.
   ========================================================================== */
body {
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,0.9) 0, rgba(255,255,255,0) 35%),
    radial-gradient(circle at 88% 40%, rgba(120,175,255,0.45) 0, rgba(120,175,255,0) 45%),
    radial-gradient(circle at 25% 95%, rgba(110,210,230,0.45) 0, rgba(110,210,230,0) 45%),
    linear-gradient(180deg, #e2ecfc 0%, #c9daf5 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

.site-header {
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(41,82,217,0.15);
}

.site-header .header-inner {
  max-width: none;
  padding: 12px 32px;
  gap: 28px;
  flex-wrap: wrap;
  row-gap: 4px;
}

/* Menu on its own centred row, slightly below the logo and Bookings */
.main-nav { order: 3; flex-basis: 100%; }
.main-nav ul { justify-content: center; gap: 34px; row-gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { font-size: 22.5px; color: #000; }

/* Logo and "Multidisciplinary / SYDNEY PAIN" wordmark */
.brand { gap: 14px; }
.brand .brand-logo { width: 69px; height: auto; }
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  border-left: 3px solid #18c6c6;
  padding-left: 12px;
}
.brand-name .l1 { font-family: Lato, Arial, sans-serif; font-weight: 300; font-size: 14px; letter-spacing: 4.5px; text-transform: uppercase; color: #1B2A5E; }
.brand-name .l2 { font-family: Lato, Arial, sans-serif; font-weight: 900; font-size: 25px; letter-spacing: 3px; text-transform: uppercase; color: #1B2A5E; }

/* Bookings button sized to match the logo */
.btn-bookings {
  font-size: 22px;
  line-height: 1.2;
  padding: 15px 38px;
  border: 2px solid #1B2A5E;
  color: #1B2A5E;
}
.btn-bookings:hover { background: #1B2A5E; color: #fff; }

/* Intro text under page titles */
.page-hero p { color: #1B2A5E; }

@media (max-width: 640px) {
  .site-header .header-inner { padding: 10px 16px; gap: 12px; }
  .brand .brand-logo { width: 50px; }
  .brand-name { padding-left: 9px; }
  .brand-name .l1 { font-size: 10px; letter-spacing: 2.6px; }
  .brand-name .l2 { font-size: 18px; letter-spacing: 1.8px; }
  .btn-bookings { font-size: 16px; padding: 9px 20px; }
  .main-nav ul { gap: 16px; }
  .main-nav a { font-size: 17px; }
}

/* Home page: black text under "Take control of your pain" */
.hero-card p { color: #000; }

/* ==========================================================================
   Radicular Pain + Dermatomes additions
   ========================================================================== */

/* Multi-paragraph hover dropdowns, with clickable links on the black box */
.item-card .item-tooltip p { margin: 0 0 10px; }
.item-card .item-tooltip p:last-child { margin-bottom: 0; }
.item-card .item-tooltip a { color: #8db6ff; text-decoration: underline; }
.item-card .item-tooltip a:hover { color: #fff; }
@media (min-width: 721px) {
  .item-card .item-tooltip.item-tooltip-wide { width: 440px; }
}

/* Anchor links (e.g. Procedures.html#epidural-steroid-injections) must not
   hide underneath the sticky header */
.category-heading[id] { scroll-margin-top: 190px; }

/* Clickable procedure / page links inside detail-page text */
.detail-text a { color: #1a4fd0; text-decoration: underline; }
.detail-text a:hover { color: #0b2a8a; }

/* Long article pages (Radicular Pain): section subheadings, wider text
   column, and a picture that stays in view while reading */
.detail-text .detail-subheading {
  font-family: 'Times New Roman', Times, serif;
  font-size: 15pt;
  font-weight: bold;
  color: #000;
  margin: 28px 0 10px;
}
.detail-layout.detail-layout-wide .detail-text { width: 760px; max-width: 54vw; }
.detail-layout.detail-layout-wide .detail-image-cell { width: 14cm; }
.detail-layout.detail-layout-wide .detail-image-cell img { width: 14cm; height: 18cm; }
.detail-layout.detail-layout-wide .detail-image-cell .sticky-img { position: sticky; top: 190px; }

/* Dermatome diagrams: shown whole (not cropped), on their own navy background */
.detail-image-cell img.detail-img-natural {
  height: auto;
  object-fit: contain;
  border: none;
  background: transparent;
  border-radius: 6px;
  max-width: 100%;
}

/* The default wrapper clips overflow (overflow-x:auto), which stops
   position:sticky from working; the wide article layout stacks on smaller
   screens instead, so it does not need the clipping. */
.detail-layout-wrap.detail-wrap-wide { overflow: visible; }

@media (max-width: 1250px) {
  .detail-layout.detail-layout-wide,
  .detail-layout.detail-layout-wide tbody,
  .detail-layout.detail-layout-wide tr,
  .detail-layout.detail-layout-wide td { display: block; width: 100% !important; }
  .detail-layout.detail-layout-wide td { padding: 0 0 24px; }
  .detail-layout.detail-layout-wide .detail-text { max-width: none; }
  .detail-layout.detail-layout-wide .detail-image-cell img { width: 100%; max-width: 14cm; height: auto; display: block; margin: 0 auto; }
  .detail-layout.detail-layout-wide .detail-image-cell .sticky-img { position: static; }
}

@media (max-width: 900px) {
  .detail-image-cell img.detail-img-natural { aspect-ratio: auto; width: 100% !important; }
}

/* SEO headings: a screen-reader/search-engine only <h1>, and an <h1> styled like the old <h2> */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.content-section h1.as-h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 28px;
  color: var(--color-primary);
  margin: 0 0 24px;
  text-align: center;
}
/* Text-only information pages (e.g. For Referrers) */
.detail-text.single-col { width: auto; max-width: 860px; margin: 0 auto; }
.detail-text ul { margin: 0 0 16px; padding-left: 22px; }
.detail-text li { margin-bottom: 6px; }
.detail-text .detail-note { font-size: 11.5pt; color: #444; border-top: 1px solid #ccc; padding-top: 14px; margin-top: 26px; }
/* Header: Bookings with the Referrers Portal button underneath it */
.header-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; flex-shrink: 0; }
.header-actions .btn-bookings { text-align: center; white-space: nowrap; font-size: 20px; padding: 10px 28px; }
@media (max-width: 640px) {
  .header-actions { gap: 6px; }
  .header-actions .btn-bookings { font-size: 14px; padding: 7px 14px; }
}
/* hero-mobile-height */
@media (max-width: 640px) { .hero { min-height: 0; } }
