/*
Theme Name: EnPhysio Health
Theme URI: https://enphysiohealth.com/
Author: EnPhysio Health
Description: Custom production theme for EnPhysio Health, an in-home physical therapy practice serving Oahu.
Version: 1.0.20
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: enphysio
*/

:root {
  --navy: #061f45;
  --navy-2: #0b3767;
  --blue: #0a5cb8;
  --gold: #d7aa31;
  --gold-2: #f2ca57;
  --ink: #172033;
  --muted: #5a6678;
  --line: #dce4ee;
  --paper: #ffffff;
  --wash: #f6f8f5;
  --mist: #eaf3f5;
  --shadow: 0 22px 60px rgba(6, 31, 69, 0.14);
  --radius: 8px;
  --max: 1180px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(220, 228, 238, 0.9);
  backdrop-filter: blur(16px);
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner,
.section-inner,
.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand img {
  width: clamp(164px, 20vw, 248px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--blue);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: var(--radius);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  content: "";
}

.nav-toggle span {
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

.button,
.wp-block-button__link,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus,
.submit-button:hover,
.submit-button:focus {
  background: var(--gold-2);
}

.button.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--navy);
}

.button.secondary:hover,
.button.secondary:focus {
  border-color: var(--gold);
  background: #fff9e7;
}

.button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(6, 31, 69, 0.96) 0%, rgba(6, 31, 69, 0.86) 44%, rgba(6, 31, 69, 0.28) 66%, rgba(6, 31, 69, 0.02) 100%),
    var(--hero-image) center / cover no-repeat;
  color: #fff;
}

.hero-inner {
  width: min(var(--max), calc(100% - 40px));
  min-height: clamp(620px, 78vh, 760px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(280px, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(4rem, 8vw, 7rem) 0 5rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--gold-2);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.65rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 610px;
  margin: 1.25rem 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.08rem, 2.2vw, 1.35rem);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero-panel {
  align-self: end;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.hero-panel h2 {
  margin: 0 0 0.75rem;
  color: var(--navy);
  font-size: 1.05rem;
}

.quick-contact {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.quick-contact div {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 0.75rem;
}

.quick-contact dt {
  color: var(--muted);
  font-weight: 800;
}

.quick-contact dd {
  margin: 0;
  color: var(--navy);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section.alt {
  background: var(--wash);
}

.section.mist {
  background: var(--mist);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.95fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.section-header h2,
.content-page h1,
.content-page h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.section-header p,
.content-page > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.trust-strip {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.trust-item {
  min-height: 118px;
  background: #fff;
  padding: 1.35rem;
}

.trust-item strong {
  display: block;
  color: var(--navy);
  font-size: 1.2rem;
}

.trust-item span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-card,
.team-card,
.contact-card,
.insurance-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(6, 31, 69, 0.06);
}

.service-card {
  padding: 1.35rem;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  color: var(--navy);
  font-size: 1.25rem;
}

.service-card p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(300px, 0.72fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.insurance-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.insurance-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0.75rem 0.9rem;
  color: var(--navy);
  font-weight: 800;
}

.flyer-frame {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(6, 31, 69, 0.16);
  box-shadow: var(--shadow);
  background: #fff;
}

.flyer-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none !important;
  object-fit: contain !important;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

.team-page-grid {
  align-items: stretch;
}

.team-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.roster-grid {
  margin-top: 1rem;
}

.team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.team-card-feature .team-photo {
  aspect-ratio: auto;
  height: clamp(270px, 19.8vw, 320px);
}

.team-card.is-text-only {
  display: flex;
  min-height: 132px;
}

.team-card.is-text-only .team-card-body {
  align-self: center;
}

.team-photo {
  aspect-ratio: 4 / 3;
  max-height: 320px;
  overflow: hidden;
  background: var(--mist);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card-body {
  display: grid;
  grid-template-rows: auto auto minmax(4.8rem, 1fr) auto;
  gap: 0.35rem;
  height: 100%;
  padding: 1.1rem;
}

.team-card h2,
.team-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.15rem;
  line-height: 1.25;
}

.team-card .role {
  margin: 0.35rem 0 0;
  color: var(--gold);
  font-weight: 900;
}

.team-card p:not(.role) {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.team-card .member-summary {
  min-height: 4.8rem;
}

.team-page-grid .team-card {
  height: 100%;
}

.team-page-grid .team-photo {
  aspect-ratio: auto !important;
  flex: 0 0 300px;
  height: 300px !important;
  max-height: none;
}

.team-page-grid .team-photo img {
  object-position: center 28%;
}

.team-page-grid .team-card-body {
  display: flex;
  flex-direction: column;
}

.team-page-grid .team-card .member-summary {
  display: -webkit-box;
  min-height: 6.75rem;
  max-height: 6.75rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.team-page-grid .bio-button {
  margin-top: auto;
}

.bio-button {
  align-self: start;
  margin-top: 0.65rem;
}

.bio-button-disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.bio-modal {
  width: min(860px, calc(100% - 32px));
  max-height: min(820px, calc(100% - 32px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(6, 31, 69, 0.32);
  overflow: hidden;
}

.bio-modal::backdrop {
  background: rgba(6, 31, 69, 0.66);
}

.bio-modal-panel {
  position: relative;
  max-height: inherit;
  overflow: auto;
}

.bio-modal-head {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  padding: clamp(1.3rem, 4vw, 2rem);
}

.bio-modal-head img {
  width: 170px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.7);
}

.bio-modal-head .eyebrow,
.bio-modal-head h2,
.bio-modal-head .role {
  color: inherit;
}

.bio-modal h2 {
  margin: 0;
  max-width: calc(100% - 3rem);
}

.bio-modal .role {
  margin: 0.4rem 0 0;
  color: var(--gold);
  font-weight: 900;
}

.bio-modal-copy {
  padding: clamp(1.3rem, 4vw, 2rem);
}

.bio-modal-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(320px, 1fr);
  gap: 1rem;
  align-items: start;
}

.contact-card {
  padding: 1.35rem;
}

.contact-card h3 {
  margin: 0 0 1rem;
  color: var(--navy);
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.contact-list div {
  display: grid;
  gap: 0.25rem;
}

.contact-list dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
  color: var(--navy);
  font-size: 1.12rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--navy);
  font-weight: 850;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #c7d2df;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0.75rem 0.85rem;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(215, 170, 49, 0.28);
  border-color: var(--gold);
}

.form-status {
  min-height: 1.5rem;
  color: var(--muted);
  font-weight: 700;
}

.page-hero {
  background: var(--navy);
  color: #fff;
  padding: clamp(4rem, 7vw, 6rem) 0;
}

.page-hero p {
  max-width: 760px;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.14rem;
}

.content-page {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.content-page > * + * {
  margin-top: 1rem;
}

.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 3rem 0 1.35rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(200px, 0.5fr) minmax(260px, 0.7fr);
  gap: 2rem;
  align-items: start;
}

.footer-logo {
  width: 220px;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.footer-heading {
  margin: 0 0 0.75rem;
  color: var(--gold-2);
  font-weight: 900;
}

.footer-links {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #fff;
}

.footer-contact {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.footer-contact div {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.6rem;
}

.footer-contact dt {
  color: rgba(255, 255, 255, 0.62);
}

.footer-contact dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 1rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
}

.hidden-socials {
  display: none;
}

@media (max-width: 980px) {
  .hero-inner,
  .section-header,
  .split,
  .contact-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
  }

  .hero-panel {
    align-self: start;
    max-width: 520px;
  }

  .service-grid,
  .team-grid,
  .team-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-bar .site-header {
    top: 46px;
  }

  .header-inner,
  .section-inner,
  .footer-inner,
  .hero-inner,
  .content-page {
    width: min(100% - 28px, var(--max));
  }

  .header-inner {
    min-height: 72px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    border-bottom: 1px solid var(--line);
    background: #fff;
    padding: 1rem 14px 1.2rem;
    box-shadow: 0 18px 36px rgba(6, 31, 69, 0.12);
  }

  .site-header.nav-open .site-nav {
    display: block;
  }

  .nav-links {
    display: grid;
    gap: 0.7rem;
  }

  .nav-links a,
  .site-nav .button {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    background:
      linear-gradient(180deg, rgba(6, 31, 69, 0.94) 0%, rgba(6, 31, 69, 0.82) 58%, rgba(6, 31, 69, 0.18) 100%),
      var(--hero-image) center / cover no-repeat;
  }

  .hero-inner {
    padding: 3.5rem 0 3rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.8rem);
  }

  .hero-actions,
  .section-actions {
    display: grid;
  }

  .service-grid,
  .team-grid,
  .team-feature-grid,
  .insurance-list,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .bio-modal {
    width: min(100% - 20px, 720px);
    max-height: calc(100% - 20px);
  }

  .bio-modal-head {
    grid-template-columns: 1fr;
  }

  .bio-modal-head img {
    width: 132px;
  }

  .team-photo,
  .team-card:nth-child(2) .team-photo,
  .team-card:nth-child(3) .team-photo,
  .team-card:nth-child(4) .team-photo,
  .team-card:nth-child(5) .team-photo,
  .team-card:nth-child(6) .team-photo,
  .team-card:nth-child(7) .team-photo {
    aspect-ratio: 4 / 3;
  }

  .team-card-feature .team-photo {
    aspect-ratio: auto;
    height: min(70vw, 320px);
  }

  .team-card-body {
    grid-template-rows: auto auto auto auto;
  }

  .team-card .member-summary {
    min-height: 0;
  }

  .team-page-grid .team-photo {
    flex-basis: min(78vw, 360px);
    height: min(78vw, 360px) !important;
  }

  .team-page-grid .team-card .member-summary {
    min-height: 0;
    max-height: none;
    -webkit-line-clamp: unset;
  }

  .footer-bottom {
    display: grid;
  }
}
