/**
 * overrides.css — Surgical CSS overrides for ORCounselors
 * Loaded on every page via header.php. Use page-scoped body classes
 * for targeted rules (e.g. .page-provider-page, .page-home, .page-dashboard).
 *
 * Body classes set by header.php:
 *   .page-home, .page-provider, .page-provider-page, .page-dashboard,
 *   .page-match, .page-quickmatch, .page-about, .page-admin, etc.
 */

.page-clinic .clinic-hero {
  padding-top: 5em;
}

.page-clinic.mobile .clinic-hero {
  padding-top: 7em;
}

.page-clinic-page .clinic-hero {
  padding-top: 1em;
}

.page-pricing main {
  padding-top: 3em;
}

.page-quickmatch main {
  max-width: 900px;
  margin: 0 auto;
}

.about-me-box {
  background: white;
  padding: 1.5em;
  border-top-left-radius: 1em;
  border-top-right-radius: 1em;
  background: rgba(255, 255, 255, 0.99);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: none;
  border-radius: 1.25rem;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px -2px rgba(0, 0, 0, 0.06),
    0 12px 48px -8px rgba(0, 0, 0, 0.05);
  transition:
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Header title: always one line */
#main-header a[href="/"],
#main-header a[href*="://"][class*="font-bold"] {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

body.screen-xs #main-header a[href="/"],
body.screen-xs #main-header a[href*="://"][class*="font-bold"] {
  font-size: 13px !important;
}

.provider-hero .text-sm {
  margin-bottom: 0.33em;
}

body.mobile .hero-content h1 {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
}

/* ═══════════════════════════════════════════
 * HERO: 2-Column Layout via Body Checkpoints
 * ═══════════════════════════════════════════ */

/* 481px–768px (mobile but NOT xs): Force 2-column row */
body.mobile:not(.screen-xs) .hero-content {
  flex-direction: row !important;
  align-items: center !important;
  gap: 1.25rem !important;
}

body.mobile:not(.screen-xs) .hero-content > .flex-1 {
  align-items: flex-start !important;
  text-align: left !important;
}

/* Left-align location/license row */
body.mobile:not(.screen-xs) .hero-content .hero-animate-delay-2 {
  justify-content: flex-start !important;
}

.page-index .about-me-box {
  background: white;
  padding: 2em;
  border-radius: 1em;
}

.page-clinics .clinics-fade-up {
  border: none;
  margin-top: 6em;
}

@media (max-width: 767px) {
  .hero-content .avatar-container img {
    border-width: 0 !important;
    border-radius: 0 !important;
  }

  .hero-content {
    align-items: center;
    text-align: center;
    gap: 1rem;
    display: flex;
    flex-direction: row;
  }

  /* ≤480px (screen-xs): Stack vertically, center everything */
  body.screen-xs .hero-content {
    flex-direction: column !important;
    text-align: center;
    align-items: center !important;
  }

  body.screen-xs .hero-content > .flex-1 {
    align-items: center !important;
    text-align: center !important;
  }

  body.screen-xs .hero-content h1 {
    justify-content: center;
  }

  body.mobile .provider-hero {
    padding-bottom: 0em;
  }

  body.page-index.mobile .about-me-box {
    margin-top: 0.8em;
  }

  body.mobile h1 .ph-chalkboard-teacher {
    display: none;
  }

  /* === Provider Sub-Pages (Condensed Hero) === */
  .page-provider-page .provider-hero {
    padding-top: 15px;
  }

  /* === Clinic Pages (Condensed Hero) === */
  .page-clinic-page .clinic-hero {
    padding-top: 20px;
  }

  /* === Clinic Main Page Hero === */
  .page-clinic .clinic-hero {
    padding-top: 6em;
  }

  .page-index .clinic-hero {
    padding-top: 5em;
  }

  .page-index.mobile .clinic-hero {
    padding-top: 7em;
  }

  .page-clinic-dashboard .clinic-hero {
    padding-top: 0em;
  }

  .page-index .provider-hero {
    padding-top: none;
  }

  /* .page-index.mobile .provider-hero — no overrides needed */

  .page-dashboard .dashboard-hero {
    padding-top: 0 !important;
  }

  .page-clinics .clinics-fade-up {
    padding-top: 5em;
  }
}

/* ============================================================
 * GLOBAL UTILITIES & HELPERS
 * ============================================================ */

/** 
 * Can be applied to any sidebar or element to make it stick 
 * below the fixed header (top-20 / 5rem).
 */
.sticky-sidebar {
  position: sticky !important;
  top: 5rem !important;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 30;
}

/* Helper to hide scrollbars while maintaining scroll functionality */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* ============================================================
 * WYSIWYG Bio Display Styles
 * 
 * Controls how rich-text content from the TinyMCE editor
 * renders on the public-facing provider and clinic pages.
 *
 * Containers:
 *   .clinic-description  — clinic.php (public clinic page)
 *   #bio-container        — provider.php (public provider page)
 * ============================================================ */

/* --- Shared base for both bio containers --- */
.clinic-description,
#bio-container {
  font-size: 15px;
  line-height: 1.8;
  color: #475569;
  /* slate-600 */
}

/* --- Headings --- */
.clinic-description h1,
#bio-container h1,
.clinic-description h2,
#bio-container h2,
.clinic-description h3,
#bio-container h3,
.clinic-description h4,
#bio-container h4,
.clinic-description h5,
#bio-container h5,
.clinic-description h6,
#bio-container h6 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: #0f172a; /* slate-900 */
  line-height: 1.3;
}

.clinic-description h1,
#bio-container h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 1.8em 0 0.8em;
}

.clinic-description h2,
#bio-container h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 1.6em 0 0.8em;
}

.clinic-description h3,
#bio-container h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1.4em 0 0.6em;
}

.clinic-description h4,
#bio-container h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.2em 0 0.5em;
  color: #1e293b;
}

.clinic-description h5,
.clinic-description h6,
#bio-container h5,
#bio-container h6 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1em 0 0.4em;
  color: #334155;
}

/* --- Paragraphs --- */
.clinic-description p,
#bio-container p {
  margin: 0 0 1.25em;
  line-height: 1.8;
}

.clinic-description p:last-child,
#bio-container p:last-child {
  margin-bottom: 0;
}

/* --- Inline formatting --- */
.clinic-description strong,
.clinic-description b,
#bio-container strong,
#bio-container b {
  font-weight: 700;
  color: #1e293b;
  /* slate-800 */
}

.clinic-description em,
.clinic-description i,
#bio-container em,
#bio-container i {
  font-style: italic;
}

.clinic-description u,
#bio-container u {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.clinic-description s,
.clinic-description del,
.clinic-description strike,
#bio-container s,
#bio-container del,
#bio-container strike {
  text-decoration: line-through;
  opacity: 0.7;
}

.clinic-description mark,
#bio-container mark {
  background: #fef9c3;
  /* yellow-100 */
  padding: 0.1em 0.25em;
  border-radius: 2px;
}

.clinic-description small,
#bio-container small {
  font-size: 0.85em;
  color: #64748b;
  /* slate-500 */
}

.clinic-description sub,
#bio-container sub {
  font-size: 0.75em;
  vertical-align: sub;
}

.clinic-description sup,
#bio-container sup {
  font-size: 0.75em;
  vertical-align: super;
}

/* --- Links --- */
.clinic-description a,
#bio-container a {
  color: #059669; /* emerald-600 */
  text-decoration: underline;
  text-decoration-color: rgba(5, 150, 105, 0.4);
  text-underline-offset: 3px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.clinic-description a:hover,
#bio-container a:hover {
  color: #047857; /* emerald-700 */
  text-decoration-color: #047857;
  background-color: rgba(5, 150, 105, 0.05);
  border-radius: 2px;
}

/* --- Lists --- */
.clinic-description ul,
#bio-container ul {
  list-style-type: disc;
  padding-left: 1.5em;
  margin: 0.5em 0 1em;
}

.clinic-description ol,
#bio-container ol {
  list-style-type: decimal;
  padding-left: 1.5em;
  margin: 0.5em 0 1em;
}

.clinic-description li,
#bio-container li {
  margin-bottom: 0.35em;
  line-height: 1.7;
}

.clinic-description li > ul,
.clinic-description li > ol,
#bio-container li > ul,
#bio-container li > ol {
  margin-top: 0.25em;
  margin-bottom: 0.25em;
}

/* --- Blockquotes --- */
.clinic-description blockquote,
#bio-container blockquote {
  border-left: 4px solid #10b981; /* emerald-500 */
  padding: 1em 1.5em;
  margin: 1.5em 0;
  background: #ecfdf5; /* emerald-50 */
  color: #064e3b; /* emerald-900 */
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.1em;
  line-height: 1.7;
}

/* --- Code / Pre --- */
.clinic-description code,
#bio-container code {
  font-family: "SF Mono", Menlo, Monaco, monospace;
  font-size: 0.875em;
  background: #f1f5f9;
  /* slate-100 */
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: #be123c;
  /* rose-700 */
}

.clinic-description pre,
#bio-container pre {
  font-family: "SF Mono", Menlo, Monaco, monospace;
  font-size: 0.875em;
  background: #1e293b;
  /* slate-800 */
  color: #e2e8f0;
  /* slate-200 */
  padding: 1em 1.25em;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1em 0;
  line-height: 1.6;
}

.clinic-description pre code,
#bio-container pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* --- Tables --- */
.clinic-description table,
#bio-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.9em;
}

.clinic-description th,
#bio-container th {
  background: #f8fafc;
  font-weight: 700;
  text-align: left;
  color: #0f172a;
}

.clinic-description th,
.clinic-description td,
#bio-container th,
#bio-container td {
  border: 1px solid #e2e8f0;
  padding: 0.6em 0.8em;
}

.clinic-description tr:nth-child(even),
#bio-container tr:nth-child(even) {
  background: #f8fafc;
}

/* --- Horizontal Rules --- */
.clinic-description hr,
#bio-container hr {
  border: none;
  border-top: 2px solid #e2e8f0;
  margin: 1.5em 0;
}

/* ============================================================
 * "The Sanctuary" Premium Aesthetic Refinements [2026-03-18]
 * ============================================================ */

/* --- Homepage Hero Enhancements --- */
.page-home .home-hero {
  background:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.8) 50%,
      rgba(255, 255, 255, 1) 100%
    ),
    url("../assets/images/portland-oregon-nature.jpeg") center/cover no-repeat
      fixed;
  transition: background 0.5s ease;
}

.healing-text {
  font-family: Georgia, "Times New Roman", serif;
  background: linear-gradient(90deg, #065f46, #10b981, #059669);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 4s ease-in-out infinite;
}

@keyframes textShimmer {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.text-oregon-multi {
  background: linear-gradient(135deg, #047857 0%, #10b981 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* --- Footer Refinements --- */
footer {
  border-top: 3px solid #10b981 !important;
  /* Subtle bright green top-border */
}

footer a[href*="clinics"],
footer a[href*="clinic-register"] {
  color: #10b981 !important;
  font-weight: 700;
}

footer .ph-buildings {
  color: #10b981;
}

/* --- Provider & Clinic Page Styles (Image 501 Aesthetic) --- */

/* Professional Bio / About Me Box */
.about-me-box {
  /* emerald-50 */
  border: 1px solid rgba(16, 185, 129, 0.1);
  border-radius: 24px;
  padding: 2rem;
  margin-top: 0rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.about-me-box h2,
.about-me-box h3 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: #064e3b; /* emerald-900 */
  margin-top: 0 !important;
  border-bottom: 2px solid rgba(16, 185, 129, 0.1);
  padding-bottom: 0.5rem;
}

/* My Approach Cards */
.approach-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.approach-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
}

.approach-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #ecfdf5;
  /* emerald-50 */
  color: #059669;
  /* emerald-600 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Specialty Pills */
.specialty-pill {
  background: #f1f5f9;
  color: #475569;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.specialty-pill:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* CTA Buttons */
.btn-emerald {
  background: #059669;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 14px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.2);
}

.btn-emerald:hover {
  background: #047857;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
}

.btn-emerald-outline {
  background: transparent;
  border: 2px solid #059669;
  color: #059669;
  padding: 0.8rem 1.5rem;
  border-radius: 14px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.btn-emerald-outline:hover {
  background: rgba(5, 150, 105, 0.05);
  border-color: #047857;
  color: #047857;
}

/* --- Global Micro-Animations: The Sanctuary --- */

:root {
  --sanctuary-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --sanctuary-breathe: cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.sanctuary-fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: sanctuaryFadeIn 0.8s var(--sanctuary-spring) forwards;
}

@keyframes sanctuaryFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sanctuary-hover {
  transition: all 0.4s var(--sanctuary-spring);
}

.sanctuary-hover:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px -10px rgba(6, 78, 59, 0.12);
}

.sanctuary-shimmer {
  position: relative;
  overflow: hidden;
}

.sanctuary-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: sanctuaryShimmer 3s infinite linear;
  pointer-events: none;
}

@keyframes sanctuaryShimmer {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(300%);
  }
}

.sanctuary-float {
  animation: sanctuaryFloat 6s ease-in-out infinite;
}

@keyframes sanctuaryFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.sanctuary-pulse {
  animation: sanctuaryPulse 4s var(--sanctuary-breathe) infinite;
}

@keyframes sanctuaryPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

/* Stagger Helpers */
.stagger-1 {
  animation-delay: 0.1s;
}

.stagger-2 {
  animation-delay: 0.2s;
}

.stagger-3 {
  animation-delay: 0.3s;
}

.stagger-4 {
  animation-delay: 0.4s;
}

/* Fixed Background Fade Effect */
.bg-fade-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.8) 50%,
    white 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
 * CLINICS PAGE (.page-clinics) — Overrides & Enhancements
 * Scoped to body.page-clinics so nothing leaks
 * ============================================================ */

/* Fix serif font for headings */
.page-clinics .font-serif,
.page-clinics h1,
.page-clinics h2,
.page-clinics h3,
.page-clinics h4 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* Fix header collision — clinics page needs no body padding since hero is standalone */
.page-clinics {
  padding-top: 0 !important;
}

/* Hero CTA buttons — scoped to hero section only */
.page-clinics .remotion-section a {
  text-decoration: none;
}

/* Push hero glass card down for breathing room under header */
.page-clinics .clinics-fade-up {
  margin-top: 5em;
  border: none;
}

/* Pricing card hover lift */
.page-clinics #pricing .bg-white:hover,
.page-clinics #pricing .bg-navy-900:hover {
  transform: translateY(-4px);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Feature tile icon bounce on hover */
.page-clinics #features .group:hover .w-14 {
  transform: scale(1.15);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* "Most Popular" badge glow */
.page-clinics .border-emerald-400 {
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.12);
}

/* Enterprise dark-card text contrast */
.page-clinics .bg-navy-900 {
  background-color: #0f172a;
}

/* Fix the "Why register" CTA section */
.page-clinics .bg-emerald-50 {
  background-color: #ecfdf5;
}

/* Tooltip-style info labels */
.page-clinics .text-xs.font-bold {
  transition: gap 0.2s ease;
}

/* Mobile fixes */
@media (max-width: 768px) {
  /* Stack pricing cards better on mobile */
  .page-clinics #pricing .grid {
    gap: 1rem;
  }

  /* Ensure Remotion left text panel doesn't overflow */
  .page-clinics .remotion-section .md\:w-\[45\%\] {
    width: 100%;
  }

  /* Full-width CTA buttons on mobile */
  .page-clinics .page-clinics-info .flex-wrap a {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
 * CLINIC DASHBOARD (.page-clinic-dashboard) — Overrides
 * ============================================================ */
.page-clinic-dashboard .font-serif {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* ============================================================
 * CLINIC DIRECTORY (.page-clinic-directory) — Overrides
 * ============================================================ */
.page-clinic-directory .font-serif {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* ============================================================
 * CLINIC REGISTER (.page-clinic-register) — Overrides
 * ============================================================ */
.page-clinic-register .font-serif {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* ============================================================
 * PRICING PAGE (.page-pricing, .page-clinic-pricing) — Overrides
 * ============================================================ */
.page-pricing .font-serif,
.page-clinic-pricing .font-serif {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* ============================================================
 * ABOUT PAGE (.page-about) — Overrides
 * ============================================================ */
.page-about .font-serif {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}
