/*
Theme Name: Rafah Health Modern
Theme URI: https://rafahhealth.com.au/
Author: Rafah Health
Description: A fast, accessible custom theme for Rafah Health Townsville.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: rafah-modern
*/

:root {
  --navy-950: #071d31;
  --navy-900: #0b2942;
  --navy-800: #103955;
  --teal-600: #0f9d9a;
  --teal-500: #18b7ae;
  --teal-100: #dff6f3;
  --sky-50: #f4fafb;
  --sand-50: #fbfaf6;
  --ink: #183143;
  --muted: #5d7080;
  --line: #dce8ec;
  --white: #ffffff;
  --shadow: 0 20px 55px rgba(7, 29, 49, 0.12);
  --radius: 22px;
  --container: min(1180px, calc(100% - 40px));
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0; color: var(--navy-950); line-height: 1.12; letter-spacing: -0.035em; }
h1 { font-size: clamp(2.7rem, 6vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.55rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

.container { width: var(--container); margin-inline: auto; }
.section { padding: clamp(70px, 9vw, 118px) 0; }
.section--soft { background: var(--sky-50); }
.section--sand { background: var(--sand-50); }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--teal-600);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.section-kicker::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.section-title { max-width: 760px; }
.section-intro { max-width: 720px; margin-top: 20px; color: var(--muted); font-size: 1.08rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 44px; }

.skip-link { position: fixed; z-index: 9999; left: 16px; top: -100px; padding: 12px 18px; background: var(--navy-950); color: white; border-radius: 8px; }
.skip-link:focus { top: 16px; }

.topbar { background: var(--navy-950); color: #d9e7ee; font-size: .84rem; }
.topbar__inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar__group { display: flex; align-items: center; gap: 24px; }
.topbar a:hover { color: var(--white); }

.site-header { position: sticky; z-index: 1000; top: 0; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(220,232,236,.9); backdrop-filter: blur(15px); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.brand img { width: 255px; max-height: 54px; object-fit: contain; object-position: left center; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav ul { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: 10px 12px; color: var(--navy-900); font-size: .94rem; font-weight: 700; border-radius: 9px; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--teal-600); background: var(--teal-100); }
.header-call { display: inline-flex; align-items: center; gap: 9px; padding: 13px 19px; color: var(--white)!important; background: var(--teal-600)!important; border-radius: 999px!important; box-shadow: 0 8px 22px rgba(15,157,154,.25); }
.nav-toggle { display: none; width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 13px; background: white; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--navy-900); transition: .2s ease; }

.hero { position: relative; min-height: 720px; display: grid; align-items: center; overflow: hidden; background: var(--navy-950); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,29,49,.98) 0%, rgba(7,29,49,.88) 42%, rgba(7,29,49,.25) 72%, rgba(7,29,49,.1) 100%), url('/wp-content/uploads/2025/07/RF4-scaled.webp') center/cover no-repeat; }
.hero::after { content: ""; position: absolute; width: 420px; height: 420px; left: -190px; bottom: -220px; border: 70px solid rgba(24,183,174,.15); border-radius: 50%; }
.hero__inner { position: relative; z-index: 1; padding: 90px 0; }
.hero__content { max-width: 760px; color: var(--white); }
.hero .section-kicker { color: #75ded7; }
.hero h1 { color: var(--white); max-width: 720px; }
.hero__lead { max-width: 650px; margin: 26px 0 34px; color: #d9e7ee; font-size: clamp(1.08rem, 2vw, 1.28rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 22px; border: 2px solid transparent; border-radius: 999px; font-size: .96rem; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button--primary { color: white; background: var(--teal-500); box-shadow: 0 12px 30px rgba(24,183,174,.3); }
.button--light { color: white; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.08); }
.button--navy { color: white; background: var(--navy-900); }
.button--outline { color: var(--navy-900); border-color: var(--line); background: white; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 38px; color: #e8f3f6; font-size: .9rem; font-weight: 700; }
.hero__trust span { display: inline-flex; align-items: center; gap: 9px; }
.check { display: inline-grid; width: 21px; height: 21px; place-items: center; flex: 0 0 auto; color: var(--navy-950); background: #75ded7; border-radius: 50%; font-size: .75rem; }

.quick-info { position: relative; z-index: 5; margin-top: -48px; }
.quick-info__grid { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.quick-card { display: flex; gap: 16px; padding: 29px; }
.quick-card + .quick-card { border-left: 1px solid var(--line); }
.quick-card__icon { display: grid; width: 46px; height: 46px; place-items: center; flex: 0 0 auto; color: white; background: var(--teal-600); border-radius: 13px; font-weight: 900; }
.quick-card small { display: block; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.quick-card strong { display: block; margin-top: 4px; color: var(--navy-900); font-size: 1.02rem; line-height: 1.35; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card { position: relative; min-height: 250px; padding: 30px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 18px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.service-card:hover { transform: translateY(-6px); border-color: #b7dedf; box-shadow: 0 18px 40px rgba(7,29,49,.09); }
.service-card__number { display: inline-grid; width: 42px; height: 42px; place-items: center; margin-bottom: 26px; color: var(--teal-600); background: var(--teal-100); border-radius: 12px; font-size: .82rem; font-weight: 900; }
.service-card h3 { margin-bottom: 13px; }
.service-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.service-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 110px; height: 110px; border: 18px solid var(--teal-100); border-radius: 50%; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(45px, 8vw, 100px); align-items: center; }
.photo-stack { position: relative; min-height: 585px; }
.photo-stack__main { width: 86%; height: 540px; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.photo-stack__accent { position: absolute; right: 0; bottom: 0; width: 48%; height: 250px; object-fit: cover; border: 10px solid white; border-radius: 22px; box-shadow: var(--shadow); }
.photo-badge { position: absolute; left: -22px; bottom: 45px; max-width: 220px; padding: 20px; color: white; background: var(--navy-900); border-radius: 16px; box-shadow: var(--shadow); }
.photo-badge strong { display: block; font-size: 1.15rem; }
.photo-badge span { color: #c9dae3; font-size: .82rem; }
.feature-list { display: grid; gap: 18px; margin: 30px 0 34px; }
.feature-item { display: flex; gap: 15px; }
.feature-item .check { margin-top: 3px; color: white; background: var(--teal-600); }
.feature-item strong { display: block; color: var(--navy-900); }
.feature-item p { margin: 2px 0 0; color: var(--muted); font-size: .94rem; }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.doctor-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 35px rgba(7,29,49,.06); }
.doctor-card__photo { position: relative; height: 390px; overflow: hidden; background: #e7f1f4; }
.doctor-card__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform .35s ease; }
.doctor-card:hover img { transform: scale(1.025); }
.doctor-card__body { padding: 24px 25px 26px; }
.doctor-card__body h3 { margin-bottom: 5px; }
.doctor-card__body p { margin: 0; color: var(--teal-600); font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }

.cta-band { position: relative; overflow: hidden; color: white; background: var(--navy-900); border-radius: 28px; }
.cta-band::after { content: ""; position: absolute; width: 360px; height: 360px; right: -130px; top: -190px; border: 55px solid rgba(24,183,174,.16); border-radius: 50%; }
.cta-band__inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 35px; padding: clamp(38px, 6vw, 68px); }
.cta-band h2 { max-width: 650px; color: white; }
.cta-band p { max-width: 620px; margin: 15px 0 0; color: #c9dae3; }

.page-hero { padding: clamp(70px, 9vw, 120px) 0; color: white; background: linear-gradient(115deg, var(--navy-950), var(--navy-800)); }
.page-hero h1 { max-width: 850px; color: white; font-size: clamp(2.7rem, 5vw, 4.8rem); }
.page-hero p { max-width: 690px; margin: 22px 0 0; color: #d9e7ee; font-size: 1.12rem; }
.breadcrumbs { margin-bottom: 24px; color: #75ded7; font-size: .83rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }

.details-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 25px; }
.contact-panel { padding: clamp(30px, 5vw, 50px); background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.contact-panel--dark { color: white; background: var(--navy-900); border-color: var(--navy-900); }
.contact-panel--dark h2, .contact-panel--dark h3 { color: white; }
.contact-panel--dark p { color: #d6e4eb; }
.contact-list { display: grid; gap: 0; margin: 28px 0 0; }
.contact-row { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.contact-panel--dark .contact-row { border-color: rgba(255,255,255,.14); }
.contact-row span { color: var(--muted); font-size: .78rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.contact-panel--dark .contact-row span { color: #8eabb9; }
.contact-row strong { color: var(--navy-900); }
.contact-panel--dark .contact-row strong { color: white; }
.steps { counter-reset: steps; display: grid; gap: 18px; margin-top: 32px; }
.step { counter-increment: steps; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.step::before { content: counter(steps); display: grid; width: 46px; height: 46px; place-items: center; color: white; background: var(--teal-600); border-radius: 50%; font-weight: 900; }
.step h3 { margin-top: 4px; }
.step p { margin: 5px 0 0; color: var(--muted); font-size: .92rem; }
.notice { padding: 20px 22px; color: #5b3b00; background: #fff7e3; border: 1px solid #f1d38a; border-radius: 14px; }

.site-footer { color: #bcd0da; background: #061827; }
.footer-main { display: grid; grid-template-columns: 1.2fr .7fr 1fr; gap: 60px; padding: 70px 0 55px; }
.footer-brand img { width: 275px; filter: brightness(0) invert(1); opacity: .95; }
.footer-brand p { max-width: 390px; margin: 22px 0 0; }
.site-footer h3 { margin-bottom: 20px; color: white; font-size: 1rem; letter-spacing: 0; }
.footer-links { display: grid; gap: 10px; }
.footer-links a:hover { color: white; }
.footer-contact { display: grid; gap: 13px; }
.footer-contact strong { color: white; }
.footer-bottom { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .78rem; }
.footer-bottom__inner { display: flex; justify-content: space-between; gap: 20px; }

.screen-reader-text { position: absolute!important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }

@media (max-width: 980px) {
  .topbar__inner { justify-content: center; }
  .topbar__group:first-child { display: none; }
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 18px 20px 24px; background: white; border-bottom: 1px solid var(--line); box-shadow: 0 18px 32px rgba(7,29,49,.1); }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: grid; gap: 4px; }
  .site-nav a { padding: 13px 14px; }
  .header-call { margin-top: 8px; }
  .hero { min-height: 660px; }
  .hero::before { background: linear-gradient(90deg, rgba(7,29,49,.98), rgba(7,29,49,.82)), url('/wp-content/uploads/2025/07/RF4-scaled.webp') center/cover no-repeat; }
  .quick-info__grid { grid-template-columns: 1fr; }
  .quick-card + .quick-card { border-left: 0; border-top: 1px solid var(--line); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .photo-stack { max-width: 700px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .details-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  :root { --container: min(100% - 28px, 1180px); }
  body { font-size: 16px; }
  .topbar { display: none; }
  .header-inner { min-height: 74px; }
  .brand img { width: 210px; }
  .hero { min-height: 650px; }
  .hero__inner { padding: 70px 0 90px; }
  .hero h1 { font-size: clamp(2.55rem, 13vw, 4.1rem); }
  .hero__trust { display: grid; gap: 12px; }
  .quick-info { margin-top: -35px; }
  .quick-card { padding: 22px; }
  .section-head { display: block; }
  .section-head .button { margin-top: 22px; }
  .service-grid, .team-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 225px; }
  .photo-stack { min-height: 450px; }
  .photo-stack__main { height: 420px; width: 92%; }
  .photo-stack__accent { height: 180px; }
  .photo-badge { left: 10px; bottom: 10px; }
  .doctor-card__photo { height: 430px; }
  .cta-band__inner { display: block; }
  .cta-band .button-row { margin-top: 25px; }
  .contact-row { grid-template-columns: 1fr; gap: 4px; }
  .footer-main { grid-template-columns: 1fr; gap: 40px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom__inner { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms!important; animation-duration: .01ms!important; animation-iteration-count: 1!important; }
}
