/*
Theme Name: S Dental Care
Theme URI: https://sdentalcare.com.au
Author: S Dental Care
Description: Custom theme for S Dental Care, Box Hill South — five-page dental practice site with an online booking wizard.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sdentalcare
*/


:root {
  --primary: #0F4992;
  --primary-deep: #03246B;
  --primary-light: #E7EDF4;
  --accent: #C98A3E;
  --bg-alt: #F3F6FA;
  --ink: #182534;
  --ink-soft: #5B6B7E;
  --white: #FFFFFF;
  --border: #D4DEEB;
  --radius: 18px;
  --shadow: 0 20px 45px -22px rgba(3,36,107,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--primary-deep);
  line-height: 1.15;
  margin: 0 0 .4em;
}
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--ink); }
a { color: inherit; text-decoration: none; }
ul { padding-left: 1.2em; }
img, svg { max-width: 100%; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 12px 24px -10px rgba(15,73,146,.55);
}
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--primary-deep);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); background: var(--primary-light); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; gap: 24px; }
.logo {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.1;
}
.logo img { height: 54px; width: auto; display: block; }
.logo small { font-family: 'Inter', sans-serif; font-weight: 500; font-size: .68rem; color: var(--ink-soft); letter-spacing: .04em; }
.nav-links { display: flex; gap: 28px; }
.nav-links > a, .nav-links .nav-parent { font-weight: 500; font-size: .92rem; color: var(--ink); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links > a:hover, .nav-links > a.active, .nav-parent:hover, .nav-parent.active { color: var(--primary-deep); border-color: var(--primary); }

/* Nav dropdowns (About Us, Services) */
.nav-item { position: relative; }
.nav-parent { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.nav-parent .caret { width: 13px; height: 13px; transition: transform .15s ease; }
.nav-item:hover .caret, .nav-item:focus-within .caret { transform: rotate(180deg); }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { display: flex; }
.dropdown a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: none;
  white-space: nowrap;
}
.dropdown a:hover { background: var(--primary-light); color: var(--primary-deep); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-phone { font-weight: 600; font-size: .9rem; color: var(--primary-deep); }
.menu-btn { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; }
.menu-btn span { display: block; height: 2px; width: 100%; background: var(--primary-deep); border-radius: 2px; }

/* Trust strip */
.trust-strip { background: var(--primary-light); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding: 18px 24px; }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 600; color: var(--primary-deep); }
.trust-item svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--primary); }

/* Why / About teaser */
.why { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: center; padding: 88px 0; }
.why-visual {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--primary-deep), var(--primary));
  min-height: 380px;
  overflow: hidden;
}
.why-visual img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  display: block;
}
.why-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 14px 18px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.why-badge span { font-size: .8rem; opacity: .85; }
.why-list { margin-top: 34px; display: flex; flex-direction: column; gap: 24px; }
.why-row { display: flex; gap: 18px; align-items: flex-start; }
.why-num { font-family: 'Fraunces', serif; font-size: 1.3rem; color: var(--accent); font-weight: 600; flex-shrink: 0; }
.why-row h3 { margin-bottom: 4px; }
.why-row p { margin: 0; color: var(--ink-soft); }

/* Section head */
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Services grid */
.services { background: var(--bg-alt); padding: 88px 0; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.service-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card p { color: var(--ink-soft); font-size: .92rem; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--primary); margin-top: 8px; }
.link svg { width: 16px; height: 16px; transition: transform .15s ease; }
.link:hover svg { transform: translateX(3px); }

/* Booking CTA banner */
.booking { padding: 88px 0; background: linear-gradient(160deg, var(--primary-deep), var(--primary)); color: var(--white); }
.booking h2, .booking .eyebrow { color: var(--white); }
.booking p { color: rgba(255,255,255,.85); }
.booking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.booking-perks { display: flex; flex-direction: column; gap: 20px; }
.perk { display: flex; gap: 14px; align-items: flex-start; }
.perk svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.perk h4 { color: var(--white); margin-bottom: 2px; font-family: 'Inter', sans-serif; font-size: .95rem; }
.perk p { margin: 0; font-size: .85rem; }

/* Booking card / wizard */
.booking-card { background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); color: var(--ink); text-align: left; }
.steps { display: flex; gap: 8px; margin-bottom: 24px; }
.step-dot { width: 32px; height: 6px; border-radius: 4px; background: var(--border); }
.step-dot.active { background: var(--primary); }
.step-panel { display: none; }
.step-panel.active { display: block; }
.field-group { margin-bottom: 20px; }
.field-group label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 8px; color: var(--primary-deep); }
.field-group input, .field-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  color: var(--ink);
  background: var(--white);
}
.field-group input:focus, .field-group textarea:focus { outline: none; border-color: var(--primary); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-error { display: none; color: #C0392B; font-size: .78rem; margin-top: 6px; }
.field-group.invalid .field-error { display: block; }
.field-group.invalid input { border-color: #C0392B; }
.service-pills, .time-slots { display: flex; flex-wrap: wrap; gap: 10px; }
.pill, .slot {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
}
.pill:hover, .slot:hover { border-color: var(--primary); }
.pill.selected, .slot.selected { background: var(--primary); color: var(--white); border-color: var(--primary); }
.booking-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.confirm { text-align: center; }
.confirm-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.confirm-icon svg { width: 28px; height: 28px; }
.confirm-summary {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0;
  text-align: left;
  font-size: .88rem;
  color: var(--ink-soft);
}
.confirm-summary div { display: flex; justify-content: space-between; padding: 4px 0; }
.confirm-summary strong { color: var(--primary-deep); }

/* Page hero (inner pages) */
.page-hero { position: relative; padding: 72px 0 56px; overflow: hidden; background: var(--primary-light); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); max-width: 680px; }
.page-hero p { max-width: 560px; font-size: 1.02rem; }
.page-hero .arc { position: absolute; bottom: -20px; left: 0; width: 100%; height: auto; }

/* Location / map */
.location { padding: 88px 0; }
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 18px 0 28px; display: flex; flex-direction: column; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.contact-list svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.contact-list a { color: var(--primary); font-weight: 600; }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.hours-table td:first-child { font-weight: 600; color: var(--primary-deep); }
.hours-table td:last-child { text-align: right; color: var(--ink-soft); }
.map-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); min-height: 340px; }
.map-card iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* Services accordion */
.svc-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 80px; }
.svc-item { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--white); }
.svc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.svc-head-left { display: flex; align-items: center; gap: 16px; }
.svc-head h3 { margin: 0; font-size: 1.05rem; }
.chevron { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; transition: transform .2s ease; }
.svc-item.open .chevron { transform: rotate(180deg); }
.svc-body { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.svc-item.open .svc-body { max-height: 900px; }
.svc-body-inner { padding: 0 24px 26px 78px; }
.svc-body-inner p { color: var(--ink-soft); }
.svc-body-inner h4 { font-family: 'Inter', sans-serif; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; color: var(--primary-deep); margin: 16px 0 8px; }
.svc-body-inner ul { color: var(--ink-soft); font-size: .92rem; margin-bottom: 18px; }

/* FAQ tabs */
.faq-tabs-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.tab-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.tab-btn.active, .tab-btn:hover { border-color: var(--primary); color: var(--primary-deep); background: var(--primary-light); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
#faq .tab-panel { max-width: 780px; margin: 0 auto; }

.tabs-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: 14px; background: var(--white); overflow: hidden; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .94rem;
  color: var(--primary-deep);
  cursor: pointer;
  text-align: left;
}
.faq-q svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; transition: transform .2s ease; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .22s ease; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a p { padding: 0 20px 18px; color: var(--ink-soft); margin: 0; font-size: .92rem; }

/* Team (about page) */
.team-grid { display: grid; grid-template-columns: .55fr 1.45fr; gap: 40px; align-items: start; }
.team-photo {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.team-photo svg { width: 40%; height: 40%; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.team-card { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.team-card .role { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); }
.team-card h4 { font-size: 1.3rem; margin: 4px 0 14px; }
.team-card p { color: var(--ink-soft); font-size: .94rem; }
.interest-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag { padding: 6px 14px; border-radius: 999px; background: var(--bg-alt); font-size: .8rem; font-weight: 600; color: var(--primary-deep); }

/* Gallery placeholder (About page) */
.gallery-placeholder {
  text-align: center;
  padding: 70px 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  color: var(--ink-soft);
}
.gallery-placeholder svg { width: 48px; height: 48px; color: var(--primary); margin-bottom: 16px; }
.gallery-placeholder h3 { color: var(--primary-deep); margin-bottom: 8px; }
.gallery-placeholder p { margin: 0; max-width: 420px; margin-left: auto; margin-right: auto; }

/* Payment cards */
.pay-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin: 56px 0; }
.pay-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.pay-card p { color: var(--ink-soft); font-size: .92rem; }
.pay-card ul { color: var(--ink-soft); font-size: .9rem; margin-top: 14px; }

/* Health fund logos */
.fund-logos { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.fund-logo {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.fund-logo img { max-height: 24px; max-width: 110px; object-fit: contain; display: block; }
.fund-logo.preferred { border-color: var(--accent); }
.preferred-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--white);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.cdbs-logo { height: 46px; width: fit-content; padding: 8px 14px; margin-bottom: 18px; }
.cdbs-logo img { max-height: 30px; }

/* Footer */
footer { background: var(--primary-deep); color: rgba(255,255,255,.82); padding: 64px 0 0; margin-top: 40px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.15); }
.footer-brand .logo { color: var(--white); }
.footer-brand .logo img { height: 64px; }
.footer-brand p { margin-top: 12px; font-size: .88rem; max-width: 260px; }
footer h4 { color: var(--white); font-family: 'Inter', sans-serif; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
footer ul a { font-size: .88rem; color: rgba(255,255,255,.75); }
footer ul a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 22px 0; font-size: .8rem; color: rgba(255,255,255,.6); }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .nav-phone { display: none; }
  .why, .booking-grid, .location-grid, .team-grid, .pay-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  main section[style*="grid-template-columns"] > div[style] { grid-template-columns: 1fr !important; }
}
@media (max-width: 600px) {
  .service-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .svc-body-inner { padding-left: 24px; }
}

/* Mobile nav panel */
body.menu-open .nav-links {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  background: var(--white);
  padding: 20px 24px;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
body.menu-open .nav-links > a { padding: 12px 0; border-bottom: 1px solid var(--border); }
body.menu-open .nav-item { border-bottom: 1px solid var(--border); }
body.menu-open .nav-parent { padding: 12px 0; border-bottom: none; width: 100%; justify-content: space-between; }
body.menu-open .dropdown {
  display: flex;
  position: static;
  box-shadow: none;
  border: none;
  min-width: 0;
  margin-top: 0;
  padding: 0 0 12px 14px;
}
body.menu-open .dropdown a { padding: 8px 0; font-size: .85rem; color: var(--ink-soft); }
