/* PEHN - Main Stylesheet */
/* Shared styles across all theme versions */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  line-height: 1.3;
  color: var(--heading-color);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0.875rem 0;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 0.05em;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--primary-color);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 1.5rem;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
  text-align: center;
  background: var(--hero-bg);
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero-region {
  display: block;
  font-size: 0.8em;
  opacity: 0.9;
}

.hero-subhead {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-about {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.about-content {
  max-width: 800px;
}

.section-serve {
  background-color: var(--bg-alt);
  border-bottom: 1px solid var(--border-color);
}

.serve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.serve-card {
  background-color: var(--bg-color);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.serve-icon {
  width: 48px;
  height: 48px;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.serve-icon svg {
  width: 100%;
  height: 100%;
}

.section-do {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.do-list {
  list-style: none;
  max-width: 700px;
}

.do-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 1rem;
}

.do-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
}

.do-note {
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background-color: var(--bg-alt);
  border-left: 3px solid var(--primary-color);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* Directory */
.section-directory {
  background-color: var(--bg-alt);
}

.directory-intro {
  max-width: 600px;
  margin-bottom: 2rem;
}

/* Filter Panel - Main decision-making UI */
.filter-panel {
  background-color: var(--bg-color);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.filter-panel-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 1.5rem 0;
  text-align: center;
}

.filter-section {
  margin-bottom: 1.75rem;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
}

/* Category Buttons - Big clickable cards */
.filter-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  background-color: var(--bg-alt);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 80px;
}

.category-btn:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.category-btn.active {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: white;
}

.category-icon {
  font-size: 1.5rem;
}

.category-text {
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

/* Location Toggle Buttons */
.location-toggles {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.location-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.5rem;
  background-color: var(--bg-alt);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 140px;
  justify-content: center;
}

.location-btn:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.location-btn.active {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: white;
}

.location-icon {
  font-size: 1.25rem;
}

/* Refine Section */
.filter-refine {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.filter-group-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-select-lg,
.filter-input-lg {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.filter-select-lg {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235A6B5C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.filter-select-lg:focus,
.filter-input-lg:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-input-lg::placeholder {
  color: var(--text-muted);
}

/* Provider Grid */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.provider-card {
  background-color: var(--bg-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.provider-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.provider-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 0.25rem;
}

.provider-credentials {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.provider-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.specialty-tag {
  padding: 0.25rem 0.625rem;
  background-color: var(--tag-bg);
  color: var(--tag-color);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.provider-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.provider-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
}

/* Get Involved */
.section-involved {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
}

.section-involved h2,
.section-involved p {
  color: white;
}

.involved-intro {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.section-involved .btn-primary {
  margin-top: 1.5rem;
  background: white !important;
  color: var(--primary-color) !important;
  border: 2px solid white !important;
  font-weight: 600;
}

.section-involved .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--primary-hover) !important;
}

/* Events */
.section-events {
  background-color: var(--bg-color);
}

/* Coordination */
.section-coordination {
  background-color: var(--bg-alt);
}

/* Contact */
.section-contact {
  background-color: var(--bg-color);
  text-align: center;
}

.contact-email {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1rem 0;
}

.contact-note {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 1.5rem;
}

/* Footer */
.footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo .logo-text {
  color: var(--footer-text);
  margin-bottom: 0.5rem;
}

.footer-logo p {
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--footer-text);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-psi p {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.footer-psi a {
  color: var(--footer-text);
  font-weight: 500;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal-content {
  position: relative;
  background-color: var(--bg-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  margin-top: 4rem;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text-color);
}

/* Modal Provider Detail */
.provider-detail-header {
  margin-bottom: 1.5rem;
}

.provider-detail-name {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.provider-detail-credentials {
  color: var(--text-muted);
}

.provider-detail-section {
  margin-bottom: 1.5rem;
}

.provider-detail-section h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.provider-detail-contact a {
  display: block;
  margin-bottom: 0.25rem;
}

.provider-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  padding: 0.375rem 0.75rem;
  background-color: var(--tag-bg);
  color: var(--tag-color);
  border-radius: var(--radius);
  font-size: 0.8125rem;
}

/* Provider Detail V2 - Improved Hierarchy */
.provider-detail-v2 {
  padding: 0.5rem 0;
}

.pd-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.pd-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.pd-credentials {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 500;
  margin: 0 0 0.25rem 0;
}

.pd-business {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

/* Contact Buttons - Prominent CTA Row */
.pd-contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.pd-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.pd-btn svg {
  flex-shrink: 0;
}

.pd-btn-primary {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pd-btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: white;
}

.pd-btn-secondary {
  background-color: var(--bg-alt);
  color: var(--text-color);
  border-color: var(--border-color);
}

.pd-btn-secondary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pd-btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.pd-btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Location Badge */
.pd-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background-color: var(--bg-alt);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.pd-location svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

/* About Section */
.pd-about {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background-color: var(--bg-alt);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary-color);
}

.pd-about p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* Section & Tags */
.pd-section {
  margin-bottom: 1.5rem;
}

.pd-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
  font-weight: 600;
}

.pd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pd-tag {
  padding: 0.375rem 0.75rem;
  background-color: var(--tag-bg);
  color: var(--tag-color);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Collapsible Details */
.pd-details {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.pd-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background-color: var(--bg-color);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-color);
  list-style: none;
}

.pd-summary::-webkit-details-marker {
  display: none;
}

.pd-summary svg {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.pd-details[open] .pd-summary svg {
  transform: rotate(180deg);
}

.pd-details-content {
  padding: 1rem;
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border-color);
}

.pd-insurance-list {
  font-size: 0.875rem;
  color: var(--text-color);
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.pd-payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pd-payment-badge {
  padding: 0.25rem 0.625rem;
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
}

.pd-muted {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

/* Mobile adjustments for provider detail */
@media (max-width: 480px) {
  .pd-contact-buttons {
    flex-direction: column;
  }

  .pd-btn {
    justify-content: center;
    width: 100%;
  }
}

/* Forms (shared) */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-label .required {
  color: #e53e3e;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.checkbox-group,
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-item input,
.radio-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .filter-panel {
    padding: 1.5rem;
  }

  .filter-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .location-toggles {
    flex-direction: column;
  }

  .location-btn {
    min-width: 100%;
  }

  .filter-group-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 3rem 0 4rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .filter-panel {
    padding: 1.25rem;
  }

  .filter-panel-title {
    font-size: 1.125rem;
  }

  .filter-section-label {
    font-size: 0.9375rem;
  }

  .filter-categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .category-btn {
    padding: 0.75rem 0.5rem;
    min-height: 70px;
  }

  .category-icon {
    font-size: 1.25rem;
  }

  .category-text {
    font-size: 0.75rem;
  }
}

/* Filter Prompt - shown before filters are selected */
.filter-prompt {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-color);
}

.filter-prompt-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.filter-prompt h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--heading-color);
}

.filter-prompt p {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 0.5rem;
}

.filter-prompt-hint {
  font-size: 0.875rem;
  color: var(--primary-color);
  font-weight: 500;
}

/* Logo image */
.logo-img {
  height: 40px;
  width: auto;
  margin-right: 0.5rem;
}

.logo {
  display: flex;
  align-items: center;
}
