/* Allied Physical Therapy – theme layered on Bootstrap 5.3
   Colours are sampled from the logo: navy #0B3A5E and teal #0A9BA5. */
:root {
  --navy: #0b3a5e; --navy-900: #082b46; --navy-700: #14507d;
  --teal: #0a9ba5; --teal-btn: #077983; --teal-700: #076f78;
  --tint: #eaf5f6; --tint-2: #f4f9fa; --ink: #0f2233; --muted: #475b6b; --line: #d5e3e8;
  --font-head: "Lexend", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --bs-primary: var(--navy); --bs-primary-rgb: 11, 58, 94;
  --bs-link-color: var(--teal-700); --bs-link-color-rgb: 7, 111, 120;
  --bs-link-hover-color: var(--navy); --bs-link-hover-color-rgb: 11, 58, 94;
  --bs-body-font-family: var(--font-body); --bs-body-color: var(--ink); --bs-body-color-rgb: 15, 34, 51;
  --bs-border-color: var(--line);
  --bs-border-radius: .5rem; --bs-border-radius-lg: .75rem;
}
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, h5, .navbar-nav, .btn, .form-label { font-family: var(--font-head); }
h1, h2, h3, h4 { color: var(--navy); letter-spacing: -.01em; line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
p { max-width: 68ch; }
.text-muted, .lead-muted { color: var(--muted) !important; }
.icon { flex: none; vertical-align: -.2em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 2000; background: #fff; padding: .6rem 1rem; border-radius: .4rem; }
.skip-link:focus { left: .5rem; }

/* ---------- buttons ---------- */
.btn { font-weight: 600; border-radius: .55rem; padding: .7rem 1.35rem; letter-spacing: .005em; }
.btn-primary { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy-900); --bs-btn-hover-border-color: var(--navy-900); --bs-btn-active-bg: var(--navy-900); --bs-btn-focus-shadow-rgb: 10,155,165; }
.btn-accent { --bs-btn-color: #fff; --bs-btn-bg: var(--teal-btn); --bs-btn-border-color: var(--teal-btn); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--teal-700); --bs-btn-hover-border-color: var(--teal-700); --bs-btn-active-bg: var(--teal-700); --bs-btn-focus-shadow-rgb: 10,155,165; }
.btn-outline-navy { --bs-btn-color: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); --bs-btn-hover-color: #fff; }
.btn-outline-light { --bs-btn-border-color: rgba(255,255,255,.7); }

/* ---------- header ---------- */
.topbar { background: var(--navy-900); color: #d9e7ef; font-size: .9rem; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .icon { color: #5fd2da; margin-right: .35rem; }
.lang-switch a { padding: .15rem .5rem; border-radius: .3rem; color: #cfe0ea; font-weight: 600; font-size: .85rem; }
.lang-switch a[aria-current="true"] { background: #fff; color: var(--navy); }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.site-header .navbar { padding-block: .6rem; }
.navbar-brand img { width: 52px; height: 52px; display: block; }
.brand-text { line-height: 1; } .brand-text b { display: block; font: 700 1.45rem/1 var(--font-head); color: var(--navy); } .brand-text small { display: block; margin-top: .25rem; font: 600 .78rem/1 var(--font-head); color: var(--teal-700); }
.navbar-nav { --bs-nav-link-padding-x: .8rem; --bs-nav-link-color: var(--ink); --bs-nav-link-hover-color: var(--teal-700); font-size: .95rem; font-weight: 500; }
.navbar-nav .nav-link.active, .navbar-nav .nav-link.show { color: var(--teal-700); box-shadow: inset 0 -3px 0 var(--teal); }
.dropdown-menu { border: 1px solid var(--line); border-radius: .75rem; padding: .5rem; box-shadow: 0 18px 40px -18px rgba(8,43,70,.35); font-family: var(--font-body); }
.dropdown-item { border-radius: .45rem; padding: .45rem .8rem; font-size: .98rem; white-space: normal; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--tint); color: var(--navy); }
.dropdown-item.active { background: var(--navy); color: #fff; }
@media (min-width: 992px) {
  .dropdown:hover > .dropdown-menu { display: block; }
  .dropdown-menu.cols { columns: 2; column-gap: .5rem; min-width: 27rem; }
  .dropdown-menu.cols li { break-inside: avoid; }
}
@media (max-width: 991.98px) { .navbar-nav .nav-link.active { box-shadow: none; } .dropdown-menu { border: 0; padding-left: 1rem; } }

/* ---------- hero ---------- */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
/*.hero h1 { color: #edf0f1; max-width: 15ch;text-shadow:3px 0px 3px rgb(18 68 110 / 96%);}*/
.hero h1 { color: var(--navy); max-width: 15ch;text-shadow:3px 2px 6px rgba(245, 247, 248, 0.96);}
/* .hero .lead { color: #eff1f1; max-width: 56ch; font-size: 1.15rem; background: #0b3a5e67; border-radius: 1.5%; padding:1%;} */
.hero .lead { color: var(--navy); max-width: 56ch; font-size: 1.15rem; text-shadow:3px 0px 3px rgba(241, 241, 241, 0.96);}
.hero-inner { padding-block: clamp(3rem, 7vw, 6rem); position: relative; z-index: 1; }
.hero-ring { position: absolute; right: -6%; top: 50%; width: min(52vw, 620px); transform: translateY(-50%); opacity: .95; pointer-events: none; }
.hero-badge { position: absolute; right: clamp(1rem, 9vw, 8rem); bottom: clamp(1.5rem, 4vw, 3rem); z-index: 1; background: #fff; color: var(--navy); border-radius: .9rem; padding: 1rem 1.4rem; box-shadow: 0 24px 48px -24px rgba(0,0,0,.5); }
.hero-badge b { font: 700 2.4rem/1 var(--font-head); color: var(--teal-700); display: block; }
.hero-badge span { font-size: .92rem; color: var(--muted); }
@media (max-width: 767.98px) { .hero-ring { opacity: .18; right: -35%; width: 120vw; } .hero-badge { display: none; } }
.page-hero { background: var(--navy); color: #fff; padding-block: clamp(2.2rem, 5vw, 3.8rem); position: relative; overflow: hidden; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); max-width: 22ch; }
.page-hero p { color: #d4e4ee; max-width: 60ch; margin-bottom: 0; }
.page-hero::after { content: ""; position: absolute; right: -90px; top: -90px; width: 340px; height: 340px; border-radius: 50%; border: 36px solid rgba(10,155,165,.35); }
.breadcrumb { --bs-breadcrumb-divider-color: #8fb4c8; --bs-breadcrumb-item-active-color: #bcd3e0; font-size: .92rem; margin-bottom: .9rem; }
.breadcrumb a { color: #fff; }

/* hero slider */
.hero { min-height: clamp(30rem, 80vh, 46rem); display: flex; align-items: center; }
.hero-inner { width: 100%;}
.hero-slider { position: absolute; inset: 0; }
.hero-slider .carousel-inner, .hero-slider .carousel-item, .hero-slider picture { height: 100%; display: block; }
.hero-slider .carousel-item { transition-duration: 1s; }
.hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-overlay { position: absolute; inset: 0; background:  rgba(221, 233, 243, 0.288); } 
@media (max-width: 767.98px) { .hero-overlay { background:  rgba(220, 229, 236, 0.219);  } }
.hero-controls { position: absolute; left: 0; right: 0; bottom: 1.2rem; z-index: 3; width: min(100% - 2rem, 1320px); margin-inline: auto; padding-inline: calc(var(--bs-gutter-x, 1.5rem) * .5); display: flex; align-items: center; gap: .9rem; }
.hero-dots { display: flex; gap: .55rem; }
.hero-dots button { width: 2.2rem; height: .3rem; padding: 0; border: 0; border-radius: 2px; background: rgba(255,255,255,.45); cursor: pointer; position: relative; }
.hero-dots button::after { content: ""; position: absolute; inset: -.8rem -.1rem; }
.hero-dots button.active { background: #fff; }
.hero-pause { all: unset; cursor: pointer; width: 2rem; height: 2rem; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.hero-pause:focus-visible { outline: 3px solid #5fd2da; outline-offset: 2px; }
.hero-pause .icon:last-child, .hero-pause[aria-pressed="true"] .icon:first-child { display: none; }
.hero-pause[aria-pressed="true"] .icon:last-child { display: block; }
.hero.has-slider .hero-badge { z-index: 3; }

/* ---------- sections ---------- */
.section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section-tint { --overlay: rgba(255,255,255,.55); background: linear-gradient(var(--overlay), var(--overlay)), url("../img/bg-section.webp") center / cover no-repeat, var(--tint-2); background-attachment: fixed;  }
@media (max-width: 767.98px) { .section-tint { --overlay: rgba(255,255,255,.7); } }
.section-navy { background: var(--navy); color: #d9e7ef; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-head { max-width: 46rem; margin-bottom: 2.2rem; }
.rule-teal { width: 3.2rem; height: .3rem; background: var(--teal); border-radius: 2px; margin-bottom: 1rem; }

.pillars > div { padding: 1.6rem 1.4rem 1.6rem 0; }
.pillars h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.pillars .icon { color: var(--teal); margin-bottom: .6rem; }
@media (min-width: 768px) { .pillars > div + div { border-left: 1px solid var(--line); padding-left: 1.6rem; } }

.svc-list { display: grid; gap: 0 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.svc { border-top: 3px solid var(--navy); padding: 1.1rem 0 1.6rem; }
.svc:hover { border-top-color: var(--teal); }
.svc h3 { margin-bottom: .4rem; font-size: 1.2rem; }
.svc p { margin-bottom: .6rem; color: var(--muted); }
.svc a.stretched-link { font-weight: 600; text-decoration: none; }

.mv { border-left: 4px solid var(--teal); padding: .2rem 0 .2rem 1.2rem; margin-bottom: 1.4rem; }
.mv h3 { font-size: 1.1rem; margin-bottom: .25rem; }

.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.steps li { counter-increment: s; position: relative; padding-top: 3rem; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--teal-btn); color: #fff; display: grid; place-items: center; font: 600 1rem var(--font-head); }
.steps h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.steps p { color: var(--muted); margin: 0; }

.quote { border-left: 4px solid var(--teal); padding-left: 1.4rem; margin: 0; }
.quote p { font-size: 1.18rem; line-height: 1.6; color: var(--ink); }
.quote cite { font: 600 .98rem var(--font-head); color: var(--navy); font-style: normal; }

.person { text-align: left; }
.avatar { width: 5.5rem; height: 5.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--navy); font: 600 1.6rem var(--font-head); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--teal); margin-bottom: .9rem; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 1.15rem; margin-bottom: .1rem; }
.person p { color: var(--muted); font-size: .95rem; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 2rem; text-decoration: none; color: var(--navy); font-weight: 600; font-size: .95rem; background: #fff; }
.chips a:hover { border-color: var(--teal); color: var(--teal-700); }

.cta-band { background: var(--tint); border-radius: 1rem; padding: clamp(1.6rem, 4vw, 3rem); border: 1px solid var(--line); }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 1.9rem; position: relative; margin-bottom: .45rem; }
.checks li .icon { position: absolute; left: 0; top: .28em; color: var(--teal-700); }

.yt { position: relative; aspect-ratio: 16/9; border-radius: .9rem; overflow: hidden; background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); }
.yt button { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.yt button span { width: 4.6rem; height: 4.6rem; border-radius: 50%; background: var(--teal-btn); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(255,255,255,.14); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- content pages ---------- */
.article h2 { margin-top: 2.4rem; }
.article h3 { margin-top: 1.6rem; }
.article ul:not(.checks) { padding-left: 1.2rem; } .article li { margin-bottom: .3rem; }
.side { position: sticky; top: 6.5rem; }
.side-box { border: 1px solid var(--line); border-radius: .85rem; padding: 1.3rem; background: #fff; margin-bottom: 1.2rem; }
.side-box h2 { font-size: 1.05rem; margin: 0 0 .7rem; }
.side-box ul { list-style: none; padding: 0; margin: 0; } .side-box li a { display: block; padding: .35rem 0; text-decoration: none; }
.side-box li a[aria-current="page"] { font-weight: 700; color: var(--navy); }
.notice { background: #fff8e6; border: 1px solid #f0d78a; border-radius: .6rem; padding: .7rem 1rem; font-size: .95rem; }
.accordion { --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem rgba(10,155,165,.25); --bs-accordion-active-bg: var(--tint); --bs-accordion-active-color: var(--navy); --bs-accordion-border-color: var(--line); }
.accordion-button { font-family: var(--font-head); font-weight: 500; }

/* ---------- forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1.3rem, 3vw, 2.2rem); box-shadow: 0 24px 48px -36px rgba(8,43,70,.45); }
.form-label { font-weight: 500; font-size: .95rem; margin-bottom: .3rem; }
.req { color: #b3261e; }
.form-control, .form-select { padding: .65rem .85rem; border-color: #b9ccd6; }
.form-control:focus, .form-select:focus { border-color: var(--teal); box-shadow: 0 0 0 .25rem rgba(10,155,165,.2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.counter { font-size: .85rem; color: var(--muted); text-align: right; }
.pdf-frame { width: 100%; height: min(78vh, 900px); border: 1px solid var(--line); border-radius: .75rem; background: var(--tint-2); }

.map-frame { width: 100%; height: 320px; border: 0; border-radius: .85rem; background: var(--tint); }
.loc { border-top: 3px solid var(--navy); padding-top: 1rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-900); color: #bcd0de; font-size: .98rem; }
.site-footer h2 { color: #fff; font-size: 1rem; margin-bottom: .9rem; }
.site-footer a { color: #e5f1f7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; } .site-footer li { margin-bottom: .4rem; }
.site-footer .icon { color: #5fd2da; margin-right: .4rem; }
.footer-logo { width: 200px; height: auto; margin-bottom: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); font-size: .9rem; }
.social-mini a { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; }
.social-mini a:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.social-mini .icon { margin: 0; color: #fff; }
.social a .icon { margin: 0; color: #fff; }
.social a:hover { background: rgba(255,255,255,.14); text-decoration: none !important; }
.social a { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; }
.alert-success { --bs-alert-bg: #e6f6ef; --bs-alert-border-color: #b5e2cd; --bs-alert-color: #14543a; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media print { .topbar, .site-header, .site-footer, .side, .cta-band { display: none !important; } }

/* ============================ motion & polish ============================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes wordIn { from { opacity: 0; transform: translateY(.55em) rotate(2deg); } to { opacity: 1; transform: none; } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.7) translateY(14px); } 70% { transform: scale(1.05); } 100% { opacity: 1; transform: none; } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(16px); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(10,155,165,.55); } 70% { box-shadow: 0 0 0 16px rgba(10,155,165,0); } 100% { box-shadow: 0 0 0 0 rgba(10,155,165,0); } }

/* hero entrance */
.hero .lead { animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) .55s both; }
.hero .hero-cta { animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) .75s both; }
.hero .hero-badge { animation: popIn .9s cubic-bezier(.2,.7,.2,1) 1.1s both; }
.js .hero h1[data-split] { visibility: hidden; }
.js .hero h1.split { visibility: visible; }
.hero h1 .w { display: inline-block; opacity: 0; animation: wordIn .75s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i) * 75ms + 150ms); }
.hero-slider .carousel-item.active .hero-img { animation: kenburns 10s ease-out forwards; }
.hero-slider { inset: -60px 0; will-change: transform; }
.hero-ring { animation: spin 90s linear infinite; }
.btn-accent.pulse { animation: pulseRing 2.6s ease-out 2s infinite; }
.page-hero::after { animation: floaty 10s ease-in-out infinite; }
.page-hero h1 { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) both; }
.page-hero p { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) .15s both; }

/* scroll reveal (only active when pre.js added .js) */
.js :is(.section-head, .pillars > div, .svc, .mv, .steps li, .person, .quote, .cta-band, .side-box, .form-card, .stat, .loc, .yt, .accordion, .chips, .map-frame, .article > h2, .article > p, .article > ul, .checks li, .about-img, .blog-card) {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .75s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .25s;
}
.js .quote { transform: translateX(-30px); }
.js .cta-band { transform: scale(.965); }
.js .yt, .js .map-frame { transform: scale(.94); }
.js .person { transform: translateY(20px) scale(.92); }
.js .checks li { transform: translateX(-16px); }
.js :is(.section-head, .pillars > div, .svc, .mv, .steps li, .person, .quote, .cta-band, .side-box, .form-card, .stat, .loc, .yt, .accordion, .chips, .map-frame, .article > h2, .article > p, .article > ul, .checks li, .about-img, .blog-card).is-visible {
  opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 90ms);
}
.js .is-visible.revealed { transition-delay: 0s; }
.js .rule-teal { width: 0; transition: width .9s cubic-bezier(.2,.7,.2,1) .1s; }
.js .rule-teal.is-visible { width: 3.2rem; }

/* hover polish */
.btn { transition: transform .2s ease, box-shadow .2s ease, background-color .2s, color .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 22px -12px rgba(8,43,70,.55); }
.btn:active { transform: none; }
.svc { transition: border-color .25s, transform .3s ease, box-shadow .3s ease; }
.svc:hover { transform: translateY(-5px); box-shadow: 0 22px 34px -26px rgba(8,43,70,.6); }
.svc a.stretched-link { background: linear-gradient(var(--teal), var(--teal)) 0 100% / 0 2px no-repeat; transition: background-size .3s ease; padding-bottom: 2px; }
.svc:hover a.stretched-link { background-size: 100% 2px; }
.pillars .icon { transition: transform .45s cubic-bezier(.3,1.6,.5,1); }
.pillars > div:hover .icon { transform: translateY(-5px) scale(1.18) rotate(-7deg); }
.avatar { transition: transform .35s ease, box-shadow .35s ease; }
.person:hover .avatar { transform: scale(1.07); box-shadow: 0 0 0 4px var(--teal); }
.chips a { transition: transform .2s, border-color .2s, color .2s, background-color .2s; }
.chips a:hover { transform: translateY(-2px); background: var(--tint); }
.steps li::before { transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.steps li:hover::before { transform: scale(1.18) rotate(-8deg); }
.yt button span { transition: transform .3s ease, box-shadow .3s ease; }
.yt button:hover span { transform: scale(1.1); box-shadow: 0 0 0 16px rgba(255,255,255,.18); }

/* stats band */
.stats { background: linear-gradient(120deg, var(--navy-900), var(--navy) 55%, var(--navy-700)); color: #cfe2ee; padding-block: clamp(2.2rem, 5vw, 3.6rem); margin-top: clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; }
.stats::before { content: ""; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; border: 34px solid rgba(10,155,165,.28); }
.stat { position: relative; }
.stat b { display: block; font: 700 clamp(2.3rem, 1.6rem + 3vw, 3.6rem)/1 var(--font-head); color: #fff; font-variant-numeric: tabular-nums; }
.stat span:last-child { display: block; margin-top: .45rem; color: #8fdde3; font-weight: 600; }

/* header + utilities */
.site-header { transition: box-shadow .3s ease; }
.site-header .navbar { transition: padding .3s ease; }
.navbar-brand img { transition: width .3s ease, height .3s ease; }
.site-header.is-scrolled { box-shadow: 0 14px 30px -20px rgba(8,43,70,.55); }
.site-header.is-scrolled .navbar { padding-block: .2rem; }
.site-header.is-scrolled .navbar-brand img { width: 42px; height: 42px; }
.scroll-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 2000; background: linear-gradient(90deg, var(--teal), #5fd2da); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.to-top { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 1500; width: 2.9rem; height: 2.9rem; border: 0; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 24px -10px rgba(8,43,70,.7); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .3s, transform .3s, background-color .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--teal-btn); }
@media (prefers-reduced-motion: reduce) { .scroll-progress, .to-top { transition: none; } }
@keyframes showFallback { to { visibility: visible; } }
.js .hero h1[data-split] { animation: showFallback 0s 2.5s forwards; }   /* safety net if the script never runs */
.js .svc.is-visible:hover { transform: translateY(-5px); transition-delay: 0s; }

/* ---------- Online patient registration (patient-forms page) ---------- */
.pf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pf-side { position: sticky; top: 6.5rem; }
.pf-loading { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: .75rem; background: var(--tint-2); }
.pf { margin-top: .5rem; }
.pf-bar { position: sticky; top: 5.6rem; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .6rem .9rem; margin-bottom: .75rem; background: #fff; border: 1px solid var(--line); border-radius: .75rem; box-shadow: 0 4px 14px rgba(11, 58, 94, .08); }
.pf-status { font-weight: 600; color: var(--navy); }
.pf-status.pf-ok { color: #0a7a45; }
.pf-jump { display: flex; flex-wrap: wrap; gap: .3rem; margin-left: auto; }
.pf-pg { width: 2rem; height: 2rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--tint-2); color: var(--navy); font-weight: 600; cursor: pointer; }
.pf-pg:hover, .pf-pg:focus-visible { background: var(--tint); border-color: var(--teal); }
.pf-problems { margin-bottom: .75rem; }
.pf-problems ul { padding-left: 1.1rem; }
.pf-link { border: 0; background: none; padding: 0; color: var(--teal-700); text-decoration: underline; cursor: pointer; font: inherit; }
.pf-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: .75rem; background: #dfe9ee; padding: .75rem; }
.pf-pages { min-width: 720px; display: grid; gap: .9rem; }
.pf-page { scroll-margin-top: 9.5rem; position: relative; width: 100%; aspect-ratio: 612 / 792; background: #fff; box-shadow: 0 2px 10px rgba(11, 58, 94, .18); --s: 1.2; }
.pf-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pf-layer { position: absolute; inset: 0; }
.pf-field { position: absolute; box-sizing: border-box; margin: 0; border: 0; border-radius: 2px; padding: 0 .35em; background: rgba(10, 155, 165, .045); color: #0b2a45; font: 500 calc(var(--s) * 10px)/1.2 Arial, Helvetica, sans-serif; }
.pf-field.pf-req { background: rgba(10, 155, 165, .14); }
.pf-field:focus { outline: 2px solid var(--teal); background: rgba(255, 255, 255, .95); }
.pf-multi { padding: .3em .45em; resize: none; line-height: 1.3; overflow: auto; }
.pf-bad { outline: 2px solid #c62828 !important; background: rgba(198, 40, 40, .1) !important; }
.pf-cb { position: absolute; display: flex; align-items: center; justify-content: center; cursor: pointer; margin: 0; }
.pf-cb input { appearance: none; -webkit-appearance: none; width: calc(var(--s) * 9px); height: calc(var(--s) * 9px); margin: 0; border: 1.5px solid #4d6a80; border-radius: 2px; background: #fff; cursor: pointer; }
.pf-cb input:checked { background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 85% no-repeat; border-color: var(--teal-700); }
.pf-cb input:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.pf-cb input.pf-req:not(:checked) { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(10, 155, 165, .35); }
.pf-sig { position: absolute; box-sizing: border-box; display: flex; align-items: center; padding: 0 .4em; overflow: hidden; border: 1px dashed var(--teal); border-radius: 3px; background: rgba(10, 155, 165, .12); color: var(--teal-700); font: 600 calc(var(--s) * 8.5px) Arial, Helvetica, sans-serif; cursor: pointer; }
.pf-sig:hover, .pf-sig:focus-visible { background: rgba(10, 155, 165, .22); outline: 2px solid var(--teal); }
.pf-sig img { position: absolute; left: 4px; top: 1px; height: calc(100% - 2px); width: auto; max-width: calc(100% - 8px); object-fit: contain; object-position: left center; margin: 0; pointer-events: none; }
.pf-sig.pf-signed { border-style: solid; background: rgba(255, 255, 255, .6); }
.pf-clinic { position: absolute; box-sizing: border-box; display: flex; align-items: center; padding: 0 .5em; background: repeating-linear-gradient(135deg, #f1f4f6, #f1f4f6 6px, #e8edf0 6px, #e8edf0 12px); color: #6b7f8e; font: italic calc(var(--s) * 8px) Arial, Helvetica, sans-serif; border-radius: 2px; }
.pf-draw { position: absolute; cursor: crosshair; }
.pf-tools { position: absolute; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.pf-tool { border: 1.5px solid var(--tc, var(--navy)); color: var(--tc, var(--navy)); background: #fff; border-radius: 999px; padding: .2rem .7rem; font: 700 .8rem Arial, Helvetica, sans-serif; cursor: pointer; white-space: nowrap; }
.pf-tool[aria-pressed="true"] { background: var(--tc); color: #fff; }
.pf-tool-alt { --tc: #5b7184; }
.pf-tool-alt:hover { background: var(--tint); }
.pf-submit { margin-left: .25rem; }
.pf-success { padding: 2rem 1.5rem; text-align: center; border: 1px solid #9fd7b8; background: #eaf8f0; border-radius: .85rem; }
.pf-success h3 { margin: 0; color: #0a5f37; font-size: 1.35rem; }
.pf-dlg { width: min(720px, 94vw); border: 0; border-radius: .9rem; padding: 1.2rem 1.3rem; box-shadow: 0 20px 60px rgba(8, 43, 70, .35); }
.pf-dlg::backdrop { background: rgba(8, 43, 70, .55); }
.pf-dlg h3 { margin: 0 0 .25rem; font-size: 1.2rem; }
.pf-sigcanvas { width: 100%; aspect-ratio: 1400 / 440; display: block; margin: .6rem 0; border: 1px solid var(--line); border-radius: .6rem; background: linear-gradient(transparent calc(100% - 44px), #b9ccd6 calc(100% - 44px), #b9ccd6 calc(100% - 43px), transparent calc(100% - 43px)), #fbfdfe; touch-action: none; cursor: crosshair; }
.pf-dlg-err { color: #c62828; margin: 0 0 .5rem; }
.pf-dlg-row { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
@media print { .pf-bar, .pf-tools { display: none; } }
.pf-uploads { margin-top: 1rem; padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: .85rem; background: #fff; }
.pf-up-h { font-size: 1.15rem; margin: 0 0 .3rem; }
.pf-up-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: .8rem; }
.pf-up { padding: .9rem 1rem; border: 1.5px dashed var(--teal); border-radius: .7rem; background: var(--tint-2); }
.pf-up.pf-bad { border-color: #c62828; border-style: solid; background: rgba(198, 40, 40, .06); }
.pf-up-label { display: block; font-weight: 700; color: var(--navy); margin-bottom: .45rem; }
.pf-up input[type="file"] { width: 100%; font-size: .9rem; }
.pf-up-info { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; font-size: .88rem; }
.pf-up-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: .4rem; border: 1px solid var(--line); }
.pf-up-err { color: #c62828; margin-top: .4rem; }
.pf-up-submit { margin-top: 1.1rem; display: flex; justify-content: flex-end; }

/* ---------- Blog + dynamic testimonials ---------- */
.blog-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.blog-card:hover { box-shadow: 0 10px 30px rgba(11, 58, 94, .12); transform: translateY(-2px); }
.blog-thumb { display: block; aspect-ratio: 3 / 2; background: var(--tint); overflow: hidden; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-thumb-ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 3rem; font-weight: 700; color: var(--navy); background: linear-gradient(135deg, var(--tint), #fff); }
.blog-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.blog-body h2 a, .blog-body h3 a { color: var(--navy); text-decoration: none; }
.blog-body h2 a:hover, .blog-body h3 a:hover { color: var(--teal-700); }
.blog-meta { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.blog-more { margin-top: auto; font-weight: 600; text-decoration: none; color: var(--teal-700); }
.post-cover { width: 100%; height: auto; border-radius: 1rem; margin-bottom: 2rem; }
.post-body { font-size: 1.1rem; line-height: 1.8; }
.post-body h2 { margin: 2rem 0 .8rem; font-size: 1.7rem; }
.post-body h3 { margin: 1.6rem 0 .6rem; font-size: 1.3rem; }
.post-body p, .post-body ul, .post-body ol { margin-bottom: 1.1rem; }
.post-body img { max-width: 100%; height: auto; border-radius: .6rem; margin: .5rem 0; }
.post-body blockquote { border-left: 4px solid var(--teal); margin: 1.5rem 0; padding: .4rem 1.2rem; color: var(--navy); background: var(--tint-2); border-radius: 0 .6rem .6rem 0; }
.post-body a { color: var(--teal-700); }
.stars { color: #e8a317; letter-spacing: 2px; font-size: .95rem; }
.quote-sub { color: var(--muted); font-size: .9rem; }

.js .blog-card.is-visible:hover { transform: translateY(-2px); transition-delay: 0s; }
.js .blog-card { transform: translateY(24px) scale(.97); }

/* ======================= floating contact buttons + pop-up ======================= */
.fab { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 1400; display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; }
.fab-btn { --c: var(--navy); display: flex; align-items: center; flex-direction: row-reverse; gap: .6rem; height: 3.2rem; min-width: 3.2rem; padding: 0 .85rem; border: 0; border-radius: 1.6rem 0 0 1.6rem; background: var(--c); color: #fff; text-decoration: none; font: 600 .95rem var(--font-head); box-shadow: -6px 10px 24px -10px rgba(8, 43, 70, .65); cursor: pointer; overflow: hidden; max-width: 3.2rem; white-space: nowrap; transition: max-width .35s cubic-bezier(.2, .7, .2, 1), transform .25s; }
.fab-btn svg { flex: 0 0 auto; }
.fab-btn span { opacity: 0; transition: opacity .2s; }
.fab-btn:hover, .fab-btn:focus-visible { max-width: 14rem; color: #fff; transform: translateX(-4px); }
.fab-btn:hover span, .fab-btn:focus-visible span { opacity: 1; }
.fab-msg { --c: var(--teal-btn, #0a8f99); }
.fab-call { --c: var(--navy); }
.fab-wa { --c: #1fae53; }
.fab-btn:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.fab-msg svg { animation: wobble 4.5s ease-in-out 3s infinite; transform-origin: 50% 80%; }
.fab-call svg { animation: wobble 4.5s ease-in-out 3.6s infinite; transform-origin: 50% 80%; }
.fab-wa { animation: pulseGreen 2.8s ease-out 4s infinite; }
@keyframes pulseGreen { 0% { box-shadow: -6px 10px 24px -10px rgba(8,43,70,.65), 0 0 0 0 rgba(31,174,83,.55); } 70% { box-shadow: -6px 10px 24px -10px rgba(8,43,70,.65), 0 0 0 14px rgba(31,174,83,0); } 100% { box-shadow: -6px 10px 24px -10px rgba(8,43,70,.65), 0 0 0 0 rgba(31,174,83,0); } }
@media (max-width: 575.98px) { .fab { top: auto; bottom: 5rem; transform: none; } .fab-btn { height: 2.9rem; min-width: 2.9rem; max-width: 2.9rem; } }
#contactModal .modal-content { border: 0; border-radius: 1rem; box-shadow: 0 30px 70px -20px rgba(8, 43, 70, .55); }
#contactModal .modal-header { border-bottom: 0; padding-bottom: 0; }
#contactModal .modal-body { padding-top: .75rem; }
.modal-backdrop.show { opacity: .55; }

/* ============================ wow factors ============================ */
@keyframes wobble { 0%, 100% { transform: rotate(0); } 8% { transform: rotate(-12deg); } 16% { transform: rotate(10deg); } 24% { transform: rotate(-7deg); } 32% { transform: rotate(5deg); } 40% { transform: rotate(0); } }
@keyframes wobbleCard { 0%, 100% { transform: rotate(0) translateY(0); } 20% { transform: rotate(-2.2deg) translateY(-4px); } 40% { transform: rotate(1.8deg) translateY(-2px); } 60% { transform: rotate(-1.2deg); } 80% { transform: rotate(.6deg); } }
@keyframes flyInRight { from { opacity: 0; transform: translateX(160px) rotate(14deg) scale(.85); } 60% { transform: translateX(-12px) rotate(-3deg) scale(1.02); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-12px) rotate(.8deg); } }

/* hero: three cards fly in from the side, then float */
.fly-cards { position: absolute; z-index: 3; right: clamp(1rem, 5vw, 5.5rem); top: 50%; transform: translateY(-58%); display: none; flex-direction: column; gap: 1.1rem; width: min(21rem, 30vw); }
@media (min-width: 992px) { .fly-cards { display: flex; } .hero-badge { right: clamp(1rem, 5vw, 5.5rem); } }
.fly-card { display: flex; align-items: center; gap: .9rem; padding: .95rem 1.15rem; border-radius: 1rem; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); color: var(--navy); text-decoration: none; box-shadow: 0 24px 44px -22px rgba(4, 25, 42, .75); border: 1px solid rgba(255, 255, 255, .7); animation: flyInRight 1s cubic-bezier(.2, .8, .2, 1) both, bob 6s ease-in-out infinite; }
.fly-card:nth-child(1) { animation-delay: 1.2s, 2.3s; margin-left: 1.6rem; }
.fly-card:nth-child(2) { animation-delay: 1.45s, 2.9s; margin-left: -.4rem; }
.fly-card:nth-child(3) { animation-delay: 1.7s, 3.5s; margin-left: 2.2rem; }
.fly-card:hover { animation: wobbleCard .7s ease-in-out 1; box-shadow: 0 30px 50px -22px rgba(4, 25, 42, .85); color: var(--navy); }
.fly-card b { display: block; font: 700 1rem var(--font-head); }
.fly-card small { display: block; color: var(--muted); font-size: .88rem; }
.fc-ico { flex: 0 0 auto; width: 2.7rem; height: 2.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; box-shadow: 0 0 0 5px rgba(10, 155, 165, .18); }

/* service cards: real cards that fly in from alternating sides, then tilt in 3D */
.svc { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 1rem; padding: 1.4rem 1.5rem 1.6rem; position: relative; box-shadow: 0 14px 30px -26px rgba(8, 43, 70, .5); }
.svc:hover { border-top-color: var(--teal); }
.js .svc:not(.is-visible):nth-child(odd) { transform: translateX(-90px) rotate(-6deg) scale(.94); }
.js .svc:not(.is-visible):nth-child(even) { transform: translateX(90px) rotate(6deg) scale(.94); }
.js .quote:not(.is-visible) { transform: translateX(-70px) rotate(-3deg); }
.js .col-md-6:nth-child(even) > .quote:not(.is-visible) { transform: translateX(70px) rotate(3deg); }
.js .pillars > div:not(.is-visible):nth-child(1) { transform: translateX(-60px) rotate(-5deg); }
.js .pillars > div:not(.is-visible):nth-child(3) { transform: translateX(60px) rotate(5deg); }
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%); opacity: 0; transition: opacity .25s; }
.tilt.tilting::after { opacity: 1; }

/* testimonials & team: wobble on hover, gentle idle sway */
.quote { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: .5rem 1rem 1rem .5rem; padding: 1.3rem 1.5rem; box-shadow: 0 16px 30px -26px rgba(8, 43, 70, .5); }
.quote:hover { animation: wobbleCard .8s ease-in-out 1; }
.person:hover .avatar { animation: wobble .8s ease-in-out 1; }
.pillars > div:hover .icon { animation: wobble 1s ease-in-out 1; }
.stat:hover b { animation: wobble 1s ease-in-out 1; display: inline-block; }

/* team: larger frames (change --avatar-radius to 1.25rem for rounded rectangles) */
:root { --avatar-radius: 50%; --avatar-size: clamp(8.5rem, 15vw, 11rem); }
.person { text-align: center; }
.avatar { width: var(--avatar-size); height: var(--avatar-size); border-radius: var(--avatar-radius); margin: 0 auto 1.1rem; font-size: calc(var(--avatar-size) * .3); border: 5px solid #fff; box-shadow: 0 0 0 3px var(--teal), 0 22px 34px -18px rgba(8, 43, 70, .6); background: linear-gradient(145deg, var(--tint), #fff); }
.person:hover .avatar { box-shadow: 0 0 0 4px var(--teal), 0 28px 40px -18px rgba(8, 43, 70, .7); }
.person h2.h3, .person h3 { font-size: 1.2rem; }
@media (prefers-reduced-motion: reduce) { .fly-card, .fab-btn svg, .fab-wa { animation: none !important; } .fly-card { opacity: 1; } }
