/*
Theme Name: RCI Injury Treatment Center
Theme URI: https://www.rcicenter.com
Description: Custom theme for RCI Injury Treatment Center — Gladstone, OR
Version: 1.2.0
Author: Spireo Marketing
License: GNU General Public License v2+
Text Domain: rci-theme
*/

:root {
  --navy: #262d7d;
  --navy-dark: #1b2060;
  --cyan: #1fb6ca;
  --cyan-dark: #0f7f90;
  --cyan-pale: #c9f1f6;
  --cyan-wash: #eefafc;
  --surface: #ffffff;
  --surface-alt: #f3f6fb;
  --text: #1d2440;
  --muted: #4d5674;
  --line: #d9e0ee;
  --shadow: 0 6px 22px rgba(27, 32, 96, .10);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; color: var(--text); background: var(--surface); line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 800; color: var(--navy); margin: 0 0 .6em; line-height: 1.2; letter-spacing: -.015em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--cyan-dark); text-decoration: none; }
a:hover { color: var(--navy); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1rem; }
address { font-style: normal; margin: 0 0 1rem; }
figure { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 3px; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--navy); color: #fff; padding: 12px 18px; }
.skip-link:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Layout */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.reading-width { max-width: 860px; }
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-tint { background: var(--surface-alt); }
.section-brand { background: var(--navy); color: #fff; }
.section-brand h2 { color: #fff; }
.section-head { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.section-head p { color: var(--muted); margin: 0; }
.section-foot { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: center; margin: 28px 0 0; font-weight: 700; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
.split-reverse > :first-child { order: 2; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 22px; align-items: stretch; }
.reading-width h2:not(:first-child) { margin-top: 1.6em; }
.reading-width h3 { margin-top: 1.3em; }
main p a, main li a, main address a, main td a { text-decoration: underline; text-underline-offset: 3px; }
main a.btn { text-decoration: none; }
main p, main li, address { overflow-wrap: anywhere; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 22px; border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--cyan-pale); color: var(--navy); }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: var(--cyan-pale); border-color: var(--cyan-pale); color: var(--navy); }
.btn-outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }
.rci-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
p > .btn + .btn { margin-left: 8px; }

/* Utility bar and header */
.rci-utility { background: var(--navy); color: #fff; font-size: .875rem; }
.rci-utility .container { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; padding-top: 7px; padding-bottom: 7px; }
.rci-utility a { color: #fff; }
.rci-utility a:hover { text-decoration: underline; }
.rci-utility-phone { margin-left: auto; font-weight: 800; font-size: .95rem; }
.rci-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.rci-header > .container { display: flex; align-items: center; gap: 12px 20px; padding-top: 10px; padding-bottom: 10px; }
.rci-brand { flex: 0 0 auto; display: block; }
.rci-brand img { width: 156px; height: auto; }
#rci-navigation { flex: 1 1 auto; min-width: 0; }
.rci-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px; }
.rci-nav > a, .rci-nav summary { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: .97rem; color: var(--navy); cursor: pointer; white-space: nowrap; }
.rci-nav summary { list-style: none; }
.rci-nav summary::-webkit-details-marker { display: none; }
.rci-nav summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.rci-nav-group[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.rci-nav > a:hover, .rci-nav summary:hover, .rci-nav-group[open] > summary { background: var(--cyan-wash); color: var(--navy); }
.rci-nav-group { position: relative; }
.rci-nav-children { position: absolute; top: calc(100% + 6px); left: 0; z-index: 101; min-width: 250px; max-width: calc(100vw - 40px); padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.rci-nav-children a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); font-weight: 600; }
.rci-nav-children a:hover { background: var(--cyan-wash); color: var(--navy); }
.rci-header-book { flex: 0 0 auto; white-space: nowrap; }
.rci-menu-toggle { margin-left: auto; min-height: 44px; padding: 8px 18px; border: 2px solid var(--navy); border-radius: 999px; background: #fff; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; }

/* Heroes */
.eyebrow { margin: 0 0 12px; color: var(--cyan-dark); font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lead { color: var(--muted); font-size: 1.2rem; line-height: 1.6; max-width: 46em; }
.rci-hero { background: linear-gradient(120deg, var(--cyan-wash) 0%, var(--cyan-pale) 100%); padding: clamp(36px, 6vw, 72px) 0; overflow: hidden; }
.rci-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.rci-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 18px; }
.rci-hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 700; color: var(--navy); font-size: .97rem; }
.rci-hero-points li, .check-list li { position: relative; padding-left: 28px; }
.rci-hero-points li::before, .check-list li::before { content: ""; position: absolute; left: 0; top: .28em; width: 18px; height: 18px; border-radius: 50%; background: var(--cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.6 2.6L13 6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.rci-hero-photo { position: relative; justify-self: center; max-width: 360px; }
.rci-hero-photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 6px solid var(--cyan); border-radius: 22px; }
.rci-hero-photo img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 22px; box-shadow: var(--shadow); }
.rci-hero-photo figcaption { position: absolute; left: -12px; bottom: 22px; padding: 8px 16px; background: var(--navy); color: #fff; font-weight: 700; font-size: .95rem; border-radius: 999px; }
.rci-page-hero { background: linear-gradient(120deg, var(--cyan-wash) 0%, var(--cyan-pale) 100%); padding: clamp(28px, 5vw, 56px) 0; border-bottom: 4px solid var(--cyan); }
.rci-page-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.025em; margin-bottom: 14px; max-width: 20em; }
.rci-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.rci-breadcrumb a { color: var(--cyan-dark); text-decoration: underline; text-underline-offset: 3px; }

/* Quick links band */
.rci-quicklinks { background: var(--navy); }
.rci-quicklinks .container { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding-top: 0; padding-bottom: 0; }
.rci-quicklinks a { display: block; padding: 22px 18px; color: #fff; text-align: center; border-left: 1px solid rgba(255,255,255,.16); }
.rci-quicklinks a:first-child { border-left: 0; }
.rci-quicklinks a:hover { background: var(--navy-dark); color: #fff; }
.rci-quicklinks strong { display: block; font-size: 1.08rem; }
.rci-quicklinks span { display: block; font-size: .88rem; color: var(--cyan-pale); }

/* Cards, tiles, lists */
.card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card h2 { font-size: 1.3rem; }
.card h3 { margin-bottom: .4em; }
.card h3 a { color: var(--navy); }
.card > a:last-child { margin-top: auto; font-weight: 700; }
.card p:last-child { margin-bottom: 0; }
.card-service .rci-icon { color: var(--cyan-dark); margin-bottom: 8px; }
.rci-icon { flex: 0 0 auto; }
.rci-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rci-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 150px; padding: 22px 14px; background: var(--cyan-pale); border-radius: var(--radius); color: var(--navy); font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .04em; font-size: .95rem; transition: background .15s, color .15s, transform .15s; }
.rci-tile:hover { background: var(--navy); color: #fff; transform: translateY(-3px); }
.check-list { list-style: none; padding: 0; }
.check-list li { margin-bottom: .55em; }
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li { padding: 8px 16px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--cyan); border-radius: 8px; font-weight: 600; }
.steps { padding-left: 1.3rem; }
.steps li { margin-bottom: .7em; padding-left: 4px; }
.steps li::marker { font-weight: 800; color: var(--cyan-dark); }
.callout { padding: 24px 28px; margin: 0 0 24px; background: var(--cyan-wash); border: 1px solid var(--cyan-pale); border-left: 6px solid var(--cyan); border-radius: var(--radius); }
.callout h2 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.care-note { padding: 16px 20px; margin-top: 28px; background: #fff8e8; border-left: 5px solid #d99a1c; border-radius: 8px; font-size: .97rem; }
.jump-links { display: flex; flex-wrap: wrap; gap: 10px; }
.jump-links a { padding: 10px 20px; background: var(--navy); color: #fff; border-radius: 999px; font-weight: 700; }
.jump-links a:hover { background: var(--navy-dark); color: #fff; }
.pull-quote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 5px solid var(--cyan); color: var(--navy); font-size: 1.12rem; font-style: italic; font-weight: 600; }
.pull-quote p { margin: 0; }
.media-frame img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.media-frame figcaption { margin-top: 8px; font-size: .88rem; color: var(--muted); text-align: center; }
.media-small { max-width: 460px; justify-self: center; width: 100%; }
.rci-tile .rci-icon { width: 46px; height: 46px; }
.media-portrait { max-width: 380px; justify-self: center; align-self: start; }
.split > .media-frame + div, .split > div { min-width: 0; }
.hours-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.hours-table th, .hours-table td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.hours-table td { text-align: right; }
.visit-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.visit-steps > li { counter-increment: step; padding: 26px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--cyan); border-radius: var(--radius); }
.visit-steps > li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-bottom: 12px; background: var(--navy); color: #fff; border-radius: 50%; font-weight: 800; }
.visit-steps h2 { font-size: 1.3rem; }
.equipment-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.equipment-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-align: center; transition: transform .15s; }
.equipment-card:hover { transform: translateY(-3px); color: var(--text); }
.equipment-card img { width: 100%; aspect-ratio: 5 / 6; object-fit: contain; background: #fff; }
.equipment-card strong { padding: 14px 14px 2px; color: var(--navy); font-size: 1.05rem; }
.equipment-card span { padding: 0 14px 18px; color: var(--muted); font-size: .92rem; }

/* Video and map */
.rci-video { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: var(--radius); box-shadow: var(--shadow); }
.rci-video img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: opacity .15s; }
.rci-video:hover img { opacity: 1; }
.rci-video-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--navy); box-shadow: 0 0 0 6px rgba(255,255,255,.55); }
.rci-video-play::after { content: ""; position: absolute; left: 30px; top: 23px; border-style: solid; border-width: 15px 0 15px 24px; border-color: transparent transparent transparent #fff; }
.rci-video-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; font-weight: 700; font-size: .95rem; }
.rci-video iframe, .rci-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rci-map { position: relative; min-height: 340px; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--cyan-wash) repeating-linear-gradient(45deg, transparent 0 22px, rgba(31,182,202,.10) 22px 24px); }
.rci-map-load { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; color: var(--navy); text-align: center; }
.rci-map-load strong { font-size: 1.15rem; }
.rci-map-load .btn { margin-top: 12px; }

/* Testimonials */
.rci-testimonials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rci-testimonial { display: flex; flex-direction: column; padding: 24px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); }
.rci-testimonial blockquote { margin: 0 0 14px; }
.rci-testimonial blockquote p { margin: 0; }
.rci-testimonial blockquote p::before { content: "“"; }
.rci-testimonial blockquote p::after { content: "”"; }
.rci-testimonial figcaption { margin-top: auto; font-weight: 800; color: var(--cyan-pale); }
.rci-testimonial figcaption::before { content: "— "; }

/* FAQ */
.rci-faq { border-bottom: 1px solid var(--line); }
.rci-faq summary { position: relative; display: block; padding: 18px 44px 18px 0; min-height: 44px; font-weight: 700; font-size: 1.08rem; color: var(--navy); cursor: pointer; list-style: none; }
.rci-faq summary::-webkit-details-marker { display: none; }
.rci-faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.6rem; font-weight: 400; color: var(--cyan-dark); }
.rci-faq[open] summary::after { content: "–"; }
.rci-faq p { margin: 0; padding: 0 44px 18px 0; }

/* CTA band and footer */
.rci-cta { background: var(--cyan-dark); color: #fff; padding: 36px 0; }
.rci-cta .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.rci-cta h2 { color: #fff; margin: 0 0 4px; }
.rci-cta p { margin: 0; }
.rci-cta .rci-actions { margin-top: 0; }
.rci-footer { padding: 48px 0 24px; background: var(--navy-dark); color: #dfe3f5; font-size: .97rem; }
.rci-footer a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.rci-footer a:hover { color: var(--cyan-pale); }
.rci-footer h2 { color: #fff; font-size: 1.05rem; letter-spacing: 0; margin-bottom: 12px; }
.rci-footer-grid { display: grid; grid-template-columns: 1.2fr 1.1fr 1fr 1fr; gap: 32px; }
.rci-footer-grid img { width: 176px; padding: 10px 14px; margin-bottom: 16px; background: #fff; border-radius: 10px; }
.rci-footer ul { list-style: none; padding: 0; margin: 0; }
.rci-footer li { padding: 4px 0; }
.rci-social { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.18); }
.footer-links a { padding: 6px 0; }
.fine-print { margin: 14px 0 0; font-size: .85rem; color: var(--muted); }
.rci-footer .fine-print { color: #b9c0e2; }

/* Articles, policies, sitemap */
.rci-post { border-bottom: 1px solid var(--line); padding: 24px 0; }
.reference-note { padding: 14px 18px; background: var(--surface-alt); border-radius: 8px; color: var(--muted); font-size: .95rem; }
.policy h2 { font-size: 1.3rem; }
.sitemap-list { columns: 2; column-gap: 40px; list-style: none; padding: 0; }
.sitemap-list li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--line); }
main > .container > h1, main.section h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.nav-links, .pagination { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Responsive */
@media (max-width: 1080px) {
  .rci-header > .container { flex-wrap: wrap; }
  .rci-brand { margin-right: auto; }
  #rci-navigation { order: 3; flex: 1 0 100%; }
  .rci-nav { justify-content: flex-start; }
  .rci-footer-grid { grid-template-columns: 1fr 1fr; }
  .rci-tiles, .equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rci-testimonials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  body { font-size: 1rem; }
  .rci-header { position: static; }
  .rci-utility .container { justify-content: space-between; }
  .rci-utility .container > a:first-child, .rci-utility a[href^="mailto"] { display: none; }
  .rci-brand img { width: 132px; }
  .rci-header-book { order: 4; flex: 1 0 100%; }
  .rci-nav { flex-direction: column; align-items: stretch; padding: 6px 0; }
  .rci-nav > a, .rci-nav summary { white-space: normal; justify-content: space-between; }
  .rci-nav-group { width: 100%; }
  .rci-nav-children { position: static; max-width: none; min-width: 0; margin: 0 0 6px 12px; padding: 0 0 0 8px; border: 0; border-left: 3px solid var(--cyan-pale); border-radius: 0; box-shadow: none; }
  .split, .rci-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .split-reverse > :first-child { order: 0; }
  .rci-hero-photo { max-width: 260px; margin-right: 18px; }
  .rci-quicklinks .container { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .rci-quicklinks a { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); }
  .rci-quicklinks a:nth-child(even) { border-left: 1px solid rgba(255,255,255,.16); }
  .visit-steps, .rci-testimonials { grid-template-columns: minmax(0, 1fr); }
  .rci-actions > .btn { flex: 1 1 100%; }
  p > .btn { display: flex; margin: 0 0 10px; }
  p > .btn + .btn { margin-left: 0; }
  .rci-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sitemap-list { columns: 1; }
  .rci-map { min-height: 280px; }
}
@media (max-width: 420px) {
  .rci-tiles, .equipment-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .rci-tile { min-height: 120px; font-size: .82rem; padding: 16px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .rci-utility, .rci-header, .rci-cta, .rci-footer-grid section:nth-child(n+3), .rci-video, .rci-map { display: none; }
}
