/* ==========================================================================
   Specialty Page — practice page design system (pp- tokens)
   Compact header, sticky sidebar, teal headings, Poppins typography
   ========================================================================== */

:root {
  --sp-navy: #0e2a47;
  --sp-navy-2: #143a61;
  --sp-teal: #00a9c1;
  --sp-teal-dark: #008ba1;
  --sp-teal-soft: #e6f7fa;
  --sp-gold: #f6b93b;
  --sp-green: #28b57a;
  --sp-red: #e5484d;
  --sp-ink: #22303e;
  --sp-muted: #5d6b7a;
  --sp-line: #e3ecf1;
  --sp-light-bg: #f8f9fa;
  --sp-ice: #f4f9fb;
  --sp-radius: 16px;
  --sp-shadow: 0 6px 24px rgba(14, 42, 71, 0.08);
  --sp-shadow-sm: 0 2px 10px rgba(14, 42, 71, 0.06);
  --sp-font: 'Poppins', 'Plus Jakarta Sans', sans-serif;
}

/* Prevent horizontal scrollbar from full-width breakout
   ========================================================================== */
.sp-page {
  overflow-x: clip;
}

/* Hide Drupal page title block (banner has its own h1)
   ========================================================================== */
.node--type-practice-specialty-page .block-page-title-block,
.node--type-practice-specialty-page #page-title {
  display: none !important;
}

/* Breadcrumb — above the header
   ========================================================================== */
.sp-breadcrumb {
  background: #fff;
  border-bottom: 1px solid var(--sp-line);
  width: 100%;
  border-radius: 1rem;
}
.sp-breadcrumb .container {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}
.sp-breadcrumb ol {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--sp-font);
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.sp-breadcrumb li + li::before {
  content: '›';
  margin: 0 0.5rem;
  color: #94a3b8;
}
.sp-breadcrumb a {
  color: var(--sp-teal);
  text-decoration: none;
}
.sp-breadcrumb a:hover { text-decoration: underline; }
.sp-breadcrumb li[aria-current] { color: var(--sp-muted); }

/* Hero — compact, light gradient, no action card
   ========================================================================== */
.sp-hero {
  background: linear-gradient(135deg, #e4f2fa 0%, #dcedf7 55%, #d6ecf3 100%);
  padding: 24px 0 28px;
  border-bottom: 1px solid #cfe4ef;
  width: 100%;
  border-radius: 1rem;
  position: static !important;
  z-index: auto !important;
}

.sp-practice-id {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.sp-title-wrap {
  flex: 1;
  min-width: 200px;
}

.sp-logo-tile {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #fff;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(14, 42, 71, 0.1);
}
.sp-logo-tile a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.sp-logo-tile img { width: 80%; height: 80%; object-fit: contain; }

.sp-hero h1 {
  font-family: var(--sp-font);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 800;
  color: var(--sp-navy);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.sp-sub {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
  color: var(--sp-muted);
  font-family: var(--sp-font);
  font-size: 0.88rem;
}
.sp-sub__addr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sp-sub__addr svg { opacity: 0.6; flex-shrink: 0; }

/* Patient status pill */
.sp-page .pp-patient-stop {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--sp-red);
  font-family: var(--sp-font);
  font-weight: 700;
  font-size: 0.8rem;
}

.sp-page .pp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid #cfe4ef;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-family: var(--sp-font);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sp-navy);
}
.sp-page .pp-pill.open { background: #effaf5; border-color: #bfe8d6; color: #0f7a4f; }
.sp-page .pp-pill.closed { background: #fef2f2; border-color: #fecaca; color: var(--sp-red); }
.sp-page .pp-pill.warn { background: #fff9ee; border-color: #f3e2b3; color: #8a6a10; }

.sp-page .pp-pill .pp-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sp-green);
  box-shadow: 0 0 0 3px rgba(40, 181, 122, 0.18);
}
.sp-page .pp-pill.closed .pp-dot { background: var(--sp-red); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.18); }
.sp-page .pp-pill.warn .pp-dot { background: #d4930a; box-shadow: 0 0 0 3px rgba(212, 147, 10, 0.18); }

/* Treatment rating banner
   ========================================================================== */
.sp-treatment-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #f0fbfd 0%, #e6f7fa 100%);
  border: 1px solid var(--sp-teal-soft);
  border-radius: 12px;
  padding: 14px 20px;
  margin-top: 16px;
  font-family: var(--sp-font);
}
.sp-treatment-banner__score {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--sp-teal);
  line-height: 1;
  white-space: nowrap;
}
.sp-treatment-banner__score small {
  font-size: 0.7rem;
  font-weight: 600;
  color: #9ab0bf;
}
.sp-treatment-banner__text {
  font-size: 0.88rem;
  color: var(--sp-ink);
  line-height: 1.4;
}
.sp-treatment-banner__text strong {
  color: var(--sp-navy);
}

@media (max-width: 600px) {
  .sp-treatment-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 16px;
  }
  .sp-treatment-banner__score { font-size: 1.3rem; }
  .sp-treatment-banner__text { font-size: 0.82rem; }
}

/* Two-column layout: content + sidebar
   ========================================================================== */
.sp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  align-items: start;
}

.sp-content {
  min-width: 0;
}

.sp-sidebar {
  align-self: stretch;
  padding-top: 1rem;
}

/* Sidebar (sticky action card on the right)
   ========================================================================== */
.sp-sidebar__sticky {
  position: sticky;
  top: 110px;
}

.sp-page .pp-action-card {
  background: #fff;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  padding: 1.4rem;
  box-shadow: var(--sp-shadow);
  margin-top: 12px !important;
}
.sp-page .pp-action-card h3 {
  font-family: var(--sp-font);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sp-navy);
  margin: 0 0 0.4rem;
}
.sp-page .pp-addr {
  font-family: var(--sp-font);
  font-size: 0.82rem;
  color: var(--sp-muted);
  margin: 0 0 0.9rem;
  line-height: 1.4;
}

/* Buttons — replicating practice page exactly */
.sp-page .pp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-family: var(--sp-font);
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  margin-bottom: 8px;
  text-decoration: none !important;
  cursor: pointer;
  color: #fff !important;
}
.sp-page .pp-btn:hover,
.sp-page .pp-btn:focus,
.sp-page .pp-btn:active,
.sp-page .pp-btn:visited {
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none !important;
}
.sp-page .pp-btn--primary {
  background: var(--sp-teal);
  box-shadow: 0 5px 14px rgba(0, 169, 193, 0.28);
}
.sp-page .pp-btn--primary:hover { background: var(--sp-teal-dark); }
.sp-page .pp-btn--gold {
  background: var(--sp-navy);
  color: #fff !important;
  border: 2px solid var(--sp-gold);
  box-shadow: 0 4px 14px rgba(14, 42, 71, 0.25);
}
.sp-page .pp-btn--gold:hover { background: var(--sp-navy-2); color: #fff !important; }
.sp-page .pp-btn--newpatient {
  background: var(--sp-navy);
  color: #fff !important;
  border: 2px solid var(--sp-gold);
  box-shadow: 0 4px 14px rgba(14, 42, 71, 0.25);
}
.sp-page .pp-btn--newpatient:hover { background: var(--sp-navy-2); color: #fff !important; }
.sp-page .pp-btn--spoed {
  background: var(--sp-red);
  box-shadow: 0 5px 14px rgba(229, 72, 77, 0.25);
}

.sp-page .pp-divider { height: 1px; background: var(--sp-line); margin: 12px 0; }

.sp-page .pp-fineprint {
  font-family: var(--sp-font);
  font-size: 0.7rem;
  color: var(--sp-muted);
  text-align: center;
  margin: 0;
  line-height: 1.35;
}

/* Practice info card — below the action card in sidebar
   ========================================================================== */
.sp-practice-card {
  background: #fff;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  overflow: hidden;
  box-shadow: var(--sp-shadow-sm);
}

.sp-practice-card__img {
  display: block;
  width: 100%;
  height: 170px;
  overflow: hidden;
}
.sp-practice-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.sp-practice-card__img:hover img {
  transform: scale(1.04);
}

.sp-practice-card__body {
  padding: 1rem 1.25rem;
}
.sp-practice-card__body h4 {
  font-family: var(--sp-font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--sp-navy);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}
.sp-practice-card__body h4 a {
  color: inherit;
  text-decoration: none;
}
.sp-practice-card__body h4 a:hover {
  color: var(--sp-teal);
}

.sp-practice-card__addr {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sp-font);
  font-size: 0.78rem;
  color: var(--sp-muted);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.sp-practice-card__addr svg { opacity: 0.5; flex-shrink: 0; }

.sp-practice-card__desc {
  font-family: var(--sp-font);
  font-size: 0.82rem;
  color: var(--sp-ink);
  line-height: 1.55;
  margin: 0 0 0.6rem;
}

.sp-practice-card__link {
  font-family: var(--sp-font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sp-teal);
  text-decoration: none;
}
.sp-practice-card__link:hover { text-decoration: underline; }

/* Rating boxes inside practice card */
.sp-ratings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 1.25rem 1.25rem;
}

.sp-rating {
  background: var(--sp-ice);
  border: 1px solid var(--sp-line);
  border-radius: 10px;
  padding: 0.6rem 0.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.sp-rating--hl {
  border-color: var(--sp-teal-soft);
  background: #f0fbfd;
}

.sp-rating__logo {
  width: 32px;
  height: 32px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-rating__logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.sp-rating__data {
  display: flex;
  flex-direction: column;
}
.sp-rating__val {
  font-family: var(--sp-font);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--sp-navy);
  line-height: 1.1;
}
.sp-rating__val small {
  font-size: 0.65rem;
  font-weight: 600;
  color: #9ab0bf;
}
.sp-rating__cnt {
  font-family: var(--sp-font);
  font-size: 0.65rem;
  color: #93a3b1;
  line-height: 1.2;
}

/* Mobile CTA card (shown below article on mobile) */
.sp-cta-mobile { display: none; }

/* Article typography — teal/blue headings, generous spacing
   ========================================================================== */
.sp-article {
  font-family: var(--sp-font);
  line-height: 1.85;
  color: var(--sp-ink);
  font-size: 1.05rem;
}

.sp-article h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sp-teal-dark);
  margin: 0 0 1.25rem;
  line-height: 1.25;
}

.sp-article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sp-teal);
  margin: 2.5rem 0 0.9rem;
  line-height: 1.3;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--sp-teal-soft);
}

.sp-article h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--sp-navy);
  margin: 2rem 0 0.7rem;
  line-height: 1.35;
}

.sp-article p { margin: 0 0 1.2rem; }

.sp-article ul,
.sp-article ol {
  margin: 0 0 1.2rem;
  padding-left: 1.4rem;
}
.sp-article li { margin-bottom: 0.5rem; }
.sp-article li::marker { color: var(--sp-teal); }

.sp-article a {
  color: var(--sp-teal);
  text-decoration: underline;
  text-decoration-color: rgba(0, 169, 193, 0.3);
  text-underline-offset: 2px;
}
.sp-article a:hover {
  text-decoration-color: var(--sp-teal);
}

.sp-article img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1rem 0;
}

.sp-article blockquote {
  border-left: 4px solid var(--sp-teal);
  background: var(--sp-ice);
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--sp-muted);
}

.sp-article strong { color: var(--sp-navy); }

/* FAQ as article continuation — no separate section title, just h3 + p
   ========================================================================== */
.sp-article--faq {
  margin-top: 1rem;
}

/* Back link
   ========================================================================== */
.sp-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
  padding: 0.6rem 0;
  color: var(--sp-teal);
  font-family: var(--sp-font);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.sp-back-link:hover { text-decoration: underline; }

/* Responsive
   ========================================================================== */

/* Tablet: collapse to single column, show mobile CTA */
@media (max-width: 960px) {
  .sp-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sp-sidebar .pp-action-card { display: none; }
  .sp-sidebar .sp-practice-card { margin-top: 0; }

  .sp-cta-mobile {
    display: block;
    margin: 2rem 0;
  }
  .sp-cta-mobile__inner {
    background: #fff;
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    padding: 1.25rem;
    box-shadow: var(--sp-shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .sp-cta-mobile .pp-btn {
    flex: 1 1 auto;
    min-width: 140px;
    margin-bottom: 0;
  }

  .sp-hero { padding: 20px 0 22px; }
  .sp-hero h1 { font-size: 1.4rem; }
  .sp-logo-tile { width: 60px; height: 60px; border-radius: 14px; }
  .sp-logo-tile img { width: 78%; height: 78%; }
  .sp-practice-id { gap: 14px; }
}

/* Mobile */
@media (max-width: 600px) {
  .sp-hero { padding: 16px 0 18px; }
  .sp-hero h1 { font-size: 1.2rem; }
  .sp-practice-id { gap: 10px; }
  .sp-logo-tile { width: 52px; height: 52px; border-radius: 12px; }
  .sp-sub { font-size: 0.82rem; gap: 6px; margin-top: 4px; }
  .sp-sub__addr svg { width: 12px; height: 12px; }
  .sp-breadcrumb ol { font-size: 0.75rem; }

  .sp-layout { padding-top: 1.5rem; padding-bottom: 2.5rem; }

  .sp-article { font-size: 0.97rem; line-height: 1.75; }
  .sp-article h1 { font-size: 1.5rem; }
  .sp-article h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
  .sp-article h3 { font-size: 1.1rem; margin: 1.5rem 0 0.6rem; }

  .sp-cta-mobile__inner {
    flex-direction: column;
  }
  .sp-cta-mobile .pp-btn {
    min-width: 100%;
  }

  .sp-practice-card__img { height: 140px; }
  .sp-ratings { grid-template-columns: 1fr; }
}
