/* Kelsey Pearson PMHNP-BC — Shared Site Styles (base for all variations) */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--kp-font-body);
  color: var(--kp-text);
  background: var(--kp-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--kp-green); text-decoration: none; transition: color var(--kp-transition); }
a:hover { color: var(--kp-green-light); }

/* Content link underlines — WCAG 1.4.1 */
.page-content a:not(.btn):not(.card-link),
.faq-answer a,
.resource-list a,
.crisis-banner a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--kp-green-light); }

/* Fluid typography */
h1, h2, h3, h4 { font-family: var(--kp-font-heading); color: var(--kp-green); line-height: 1.3; font-weight: 400; }
h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.125rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem); }
h4 { font-size: 1.25rem; }

/* === Focus Visible (Accessibility) === */
:focus-visible { outline: 2px solid var(--kp-accent); outline-offset: 2px; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--kp-accent-light); }
.skip-link:focus-visible { outline: 2px solid var(--kp-white); }

/* === Skip Link (Accessibility) === */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  padding: 0.5rem 1rem; background: var(--kp-green); color: var(--kp-white);
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* === Container === */
.container { max-width: var(--kp-max-width); margin: 0 auto; padding: 0 1.5rem; }

/* === Header & Navigation === */
.site-header {
  background: var(--kp-header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--kp-border);
  position: sticky; top: 0; z-index: 100;
}

.nav-container {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--kp-max-width); margin: 0 auto; padding: 0.875rem 1.5rem;
}

.site-logo { font-family: var(--kp-font-heading); font-size: 1.3rem; font-weight: 400; color: var(--kp-green); }
.site-logo span { display: block; font-size: 0.8rem; font-weight: 400; color: var(--kp-text-light); font-family: var(--kp-font-body); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--kp-green); margin: 5px 0; transition: transform var(--kp-transition), opacity var(--kp-transition); }

.nav-menu { display: flex; gap: 0.25rem; list-style: none; align-items: center; }
.nav-menu a {
  display: block; padding: 0.5rem 0.75rem; color: var(--kp-text);
  font-size: 0.95rem; font-weight: 500; border-radius: var(--kp-radius);
  transition: background var(--kp-transition), color var(--kp-transition);
}
.nav-menu a:hover, .nav-menu a.active { background: var(--kp-green-bg); color: var(--kp-green); }

/* Dropdown — hover only on devices that support it */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--kp-white); border: 1px solid var(--kp-border); border-radius: var(--kp-radius);
  box-shadow: var(--kp-shadow-lg); padding: 0.5rem 0; z-index: 200;
}
@media (hover: hover) {
  .nav-dropdown:hover .nav-dropdown-menu { display: block; }
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { padding: 0.5rem 1rem; font-size: 0.9rem; border-radius: 0; }
.nav-dropdown-menu a:hover { background: var(--kp-green-bg); }

/* === Hero (base layout — variations override) === */
.hero {
  position: relative; padding: 6rem 1.5rem; text-align: center;
  background-size: cover; background-position: center; color: var(--kp-white);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(45, 94, 63, 0.88), rgba(30, 74, 48, 0.75));
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 { color: var(--kp-white); font-size: clamp(2.25rem, 1.75rem + 2.5vw, 3rem); margin-bottom: 1rem; }
.hero p { font-size: 1.25rem; margin-bottom: 2.5rem; opacity: 0.95; }

/* === Buttons === */
.btn {
  display: inline-block; padding: 0.875rem 2.25rem; border-radius: var(--kp-radius);
  font-weight: 600; font-size: 1rem; text-align: center;
  transition: background var(--kp-transition), transform var(--kp-transition), box-shadow var(--kp-transition);
  cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--kp-shadow); }
.btn-primary { background: var(--kp-white); color: var(--kp-green); }
.btn-primary:hover { background: var(--kp-accent-light); color: var(--kp-green); }
.btn-secondary { background: var(--kp-green); color: var(--kp-white); }
.btn-secondary:hover { background: #1E4A30; color: var(--kp-white); }

/* === Sections === */
.section { padding: 5rem 0; }
.section-alt { background: var(--kp-bg-alt); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { color: var(--kp-text-light); font-size: 1.1rem; margin-top: 0.75rem; max-width: 650px; margin-left: auto; margin-right: auto; }

/* === Card Grid === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

.card {
  background: var(--kp-white); border-radius: var(--kp-radius-lg); overflow: hidden;
  box-shadow: var(--kp-shadow); transition: box-shadow var(--kp-transition), transform var(--kp-transition), border-color var(--kp-transition);
}
.card:hover { box-shadow: var(--kp-shadow-lg); transform: translateY(-3px); }
.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 1.75rem; }
.card-body h3 { margin-bottom: 0.75rem; }
.card-body p { color: var(--kp-text-light); margin-bottom: 1rem; line-height: 1.65; }
.card-link { font-weight: 600; color: var(--kp-green); transition: color var(--kp-transition); }
.card-link:hover { color: var(--kp-accent); }
.card-link::after { content: ' \2192'; }

/* === Page Content === */
.page-header {
  background: linear-gradient(135deg, var(--kp-green), #1E4A30);
  color: var(--kp-white); padding: 3.5rem 0; text-align: center;
}
.page-header h1 { color: var(--kp-white); margin-bottom: 0.5rem; }
.page-header p { opacity: 0.9; font-size: 1.1rem; }

.page-content { padding: 3.5rem 0; }
.page-content p { margin-bottom: 1rem; max-width: 75ch; line-height: 1.75; }
.page-content ul, .page-content ol { margin: 1rem 0 1rem 1.5rem; }
.page-content li { margin-bottom: 0.5rem; }

/* === Utility Classes (replacing inline styles) === */
.intro-text { font-size: 1.15rem; max-width: 75ch; margin-bottom: 2rem; }
.intro-text-lg { font-size: 1.15rem; max-width: 75ch; margin-bottom: 3rem; }
.service-intro { font-size: 1.1rem; margin-bottom: 2rem; }
.text-spaced { margin: 1rem 0 1.5rem; max-width: 75ch; }
.mt-1 { margin-top: 1rem; }
.mt-sm { margin-top: 0.5rem; }
.grid-mt { margin-top: 1.5rem; }
.bold-note { margin-top: 1.5rem; font-weight: 700; }
.sidebar-divider { margin: 1.5rem 0; border-color: var(--kp-border); }
.sidebar-btn { width: 100%; margin-top: 0.5rem; }
.sidebar-schedule { font-size: 0.9rem; }
.active-service { font-weight: 700; }
.blockquote-accent {
  font-family: var(--kp-font-heading); font-size: 1.15rem; color: var(--kp-green);
  border-left: 4px solid var(--kp-accent); padding-left: 1.5rem;
  margin: 1.5rem 0; max-width: 600px;
}
.blockquote-accent.large { font-size: 1.35rem; margin: 0 0 3rem; max-width: 700px; }
.two-col-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.5rem;
}
.location-details-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.5rem;
}
.modality-list { margin-top: 1.5rem; max-width: 800px; }
.practice-link { font-weight: 600; }
.footer-practice { margin-top: 1rem; }
.footer-practice-link { color: var(--kp-green-light); }
.footer-practice-address { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.footer-contact { margin-top: 1rem; font-size: 0.9rem; }

/* === Service Detail === */
.service-detail { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
.service-sidebar {
  background: var(--kp-bg-alt); border-radius: var(--kp-radius-lg); padding: 2rem;
  position: sticky; top: 5rem; border-top: 3px solid var(--kp-accent);
}
.service-sidebar h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.service-sidebar ul { list-style: none; }
.service-sidebar li { margin-bottom: 0.5rem; }
.service-sidebar a { font-size: 0.95rem; }

/* === About Page === */
.about-intro { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; align-items: center; }
.about-photo { border-radius: var(--kp-radius-lg); box-shadow: var(--kp-shadow-lg); }
.credential-badges { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.5rem 0; }
.credential-badge {
  background: var(--kp-accent-light); color: var(--kp-green); padding: 0.5rem 1rem;
  border-radius: 2rem; font-size: 0.875rem; font-weight: 600;
}

/* === Education Timeline === */
.timeline { border-left: 3px solid var(--kp-green); padding-left: 2rem; margin: 2rem 0; }
.timeline-item { margin-bottom: 2rem; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.55rem; top: 0.5rem;
  width: 12px; height: 12px; background: var(--kp-accent); border-radius: 50%;
}
.timeline-item h4 { margin-bottom: 0.25rem; }
.timeline-item .date { color: var(--kp-text-light); font-size: 0.9rem; }

/* === Conditions Grid (Expertise page) === */
.conditions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.condition-card {
  background: var(--kp-white); border-radius: var(--kp-radius); padding: 1.5rem;
  box-shadow: var(--kp-shadow); border-left: 4px solid var(--kp-green);
  transition: border-color var(--kp-transition), box-shadow var(--kp-transition);
}
.condition-card:hover { border-left-color: var(--kp-accent); box-shadow: var(--kp-shadow-lg); }
.condition-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.condition-card p { font-size: 0.95rem; color: var(--kp-text-light); margin-bottom: 0.5rem; }
.condition-card .training-link { font-size: 0.8rem; color: var(--kp-accent); font-style: italic; }

/* === Philosophy Pillars (Approach page) === */
.pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.pillar-card {
  text-align: center; padding: 2rem 1.5rem;
  background: var(--kp-white); border-radius: var(--kp-radius-lg); box-shadow: var(--kp-shadow);
}
.pillar-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.pillar-card p { font-size: 0.95rem; color: var(--kp-text-light); }

/* === Modality Cards (Approach page) === */
.modality-card {
  background: var(--kp-white); border-radius: var(--kp-radius); padding: 1.5rem;
  box-shadow: var(--kp-shadow); margin-bottom: 1rem;
}
.modality-card h3 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.modality-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.2rem 0.5rem; border-radius: 3px;
  background: var(--kp-green-bg); color: var(--kp-green); margin-bottom: 0.5rem;
}
.modality-badge.complementary { background: var(--kp-accent-light); color: #8B6B3E; }
.modality-badge.strengths { background: #E8E0F0; color: #5B3F7E; }
.modality-badge.narrative { background: #E0ECF0; color: #3F6B7E; }
.modality-badge.spiritual { background: #F0E8E0; color: #7E5B3F; }
.modality-card p { font-size: 0.95rem; color: var(--kp-text-light); }

/* === First Visit Steps (Approach page) === */
.visit-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.visit-step {
  padding: 1.5rem; background: var(--kp-white); border-radius: var(--kp-radius);
  box-shadow: var(--kp-shadow); border-top: 3px solid var(--kp-accent);
}
.visit-step h4 { margin-bottom: 0.5rem; }
.visit-step p { font-size: 0.95rem; color: var(--kp-text-light); }

/* === Resource Cards (Resources page) === */
.resource-category { margin-bottom: 2rem; }
.resource-category h3 { margin-bottom: 1rem; }
.resource-list { list-style: none; }
.resource-list li {
  padding: 0.75rem 1rem; background: var(--kp-white); border-radius: var(--kp-radius);
  margin-bottom: 0.5rem; box-shadow: var(--kp-shadow);
  font-size: 0.95rem;
}
.resource-list li strong { color: var(--kp-green); }

/* === FAQ Accordion (uses native <details>/<summary>) === */
.faq-section { margin-bottom: 2rem; }
.faq-section h3 { margin-bottom: 1rem; font-size: 1.25rem; }
.faq-item {
  background: var(--kp-white); border-radius: var(--kp-radius); margin-bottom: 0.5rem;
  box-shadow: var(--kp-shadow); overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.25rem; font-family: var(--kp-font-body); font-size: 1rem; font-weight: 600;
  color: var(--kp-text); cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.25rem; color: var(--kp-accent); transition: transform var(--kp-transition); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item summary:hover { color: var(--kp-green); }
.faq-answer { padding: 0 1.25rem 1rem; color: var(--kp-text-light); line-height: 1.7; }

/* === Crisis Banner === */
.crisis-banner {
  background: linear-gradient(135deg, var(--kp-crisis), var(--kp-crisis-light));
  color: var(--kp-white); border-radius: var(--kp-radius-lg); padding: 2.5rem;
  margin-top: 2rem;
}
.crisis-banner h2 { color: var(--kp-white); margin-bottom: 1rem; }
.crisis-banner p { opacity: 0.95; }
.crisis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.5rem; }
.crisis-grid h3 { color: var(--kp-white); font-size: 1.1rem; margin-bottom: 0.75rem; }
.crisis-grid ul { list-style: none; }
.crisis-grid li { margin-bottom: 0.5rem; }
.crisis-grid a { color: rgba(255, 255, 255, 0.9); font-weight: 500; }
.crisis-grid a:hover { color: var(--kp-white); }

/* === Locations / Insurance === */
.location-card {
  background: var(--kp-bg-alt); border-radius: var(--kp-radius-lg); padding: 2rem;
  border-left: 4px solid var(--kp-green);
}
.insurance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem 2rem; margin: 2rem 0; align-items: center; }
.insurance-badge { display: flex; align-items: center; justify-content: center; padding: 0.5rem; }
.insurance-badge img { height: 56px; width: auto; max-width: 160px; object-fit: contain; }
.rate-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.rate-table th, .rate-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--kp-border); }
.rate-table th { background: var(--kp-green); color: var(--kp-white); }

/* === CTA Banner === */
.cta-banner {
  background: linear-gradient(135deg, var(--kp-green), #1E4A30);
  color: var(--kp-white); padding: 3.5rem 0; text-align: center;
}
.cta-banner h2 { color: var(--kp-white); margin-bottom: 1rem; }
.cta-banner p { opacity: 0.9; margin-bottom: 1.5rem; font-size: 1.1rem; }

/* === Footer === */
.site-footer { background: var(--kp-text); color: var(--kp-white); padding: 3.5rem 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-brand { font-family: var(--kp-font-heading); font-size: 1.25rem; margin-bottom: 0.75rem; }
.footer-tagline { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }
.site-footer h4 { color: var(--kp-white); font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: rgba(255, 255, 255, 0.8); }
.site-footer a:hover { color: var(--kp-white); }
/* Phone/email tap targets — WCAG 2.5.5 minimum 44px */
.site-footer a[href^="tel:"],
.site-footer a[href^="mailto:"] { display: inline-block; min-height: 44px; line-height: 44px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.social-links { display: flex; gap: 1rem; }
.social-links a { font-size: 0.95rem; }
.footer-crisis { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.85rem; color: rgba(255,255,255,0.7); }
.footer-crisis a { color: rgba(255,255,255,0.9); font-weight: 600; }
.footer-bottom {
  text-align: center; margin-top: 2rem; padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.5); font-size: 0.85rem;
}

/* === Breadcrumbs === */
.breadcrumbs { padding: 0.75rem 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); }
.breadcrumbs a { color: rgba(255, 255, 255, 0.7); }
.breadcrumbs a:hover { color: var(--kp-white); }
.breadcrumbs span { margin: 0 0.5rem; }

/* === Responsive: Tablet (769–1024px) === */
@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-intro { grid-template-columns: 1fr 1.5fr; }
  .insurance-grid { grid-template-columns: repeat(3, 1fr); }
  .conditions-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
}

/* === Responsive: Large Screen (1400px+) === */
@media (min-width: 1400px) {
  .container { max-width: 1320px; padding: 0 2rem; }
}

/* === Responsive: Mobile (768px and below) === */
@media (max-width: 768px) {
  .hero { padding: 3.5rem 1.5rem; }
  .hero h1 { font-size: 2.25rem; }
  .section { padding: 3.5rem 0; }

  .nav-toggle { display: block; }
  .nav-menu {
    display: none; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--kp-white);
    border-bottom: 1px solid var(--kp-border); padding: 1rem;
    box-shadow: var(--kp-shadow-lg);
  }
  .nav-menu.open { display: flex; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }

  .about-intro { grid-template-columns: 1fr; text-align: center; }
  .about-photo { max-width: 300px; margin: 0 auto; }
  .service-detail { grid-template-columns: 1fr; }
  .service-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .insurance-grid { grid-template-columns: repeat(2, 1fr); }
  .conditions-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }
  .crisis-grid { grid-template-columns: 1fr; }
  .visit-steps { grid-template-columns: 1fr; }
  .two-col-grid, .location-details-grid { grid-template-columns: 1fr; }
}

/* === Print Stylesheet === */
@media print {
  .site-header, .nav-toggle, .cta-banner, .skip-link { display: none; }
  .site-footer { background: none; color: var(--kp-text); padding: 1rem 0; }
  .section { padding: 1.5rem 0; }
  .hero { padding: 2rem 0; background: none !important; color: var(--kp-text); }
  .hero::before { display: none; }
  .hero h1, .page-header h1 { color: var(--kp-green); }
  .page-header { background: none; color: var(--kp-text); padding: 1.5rem 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: var(--kp-text-light); }
}

/* === Reduced Motion (Accessibility) === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
