/* ===== Button groups: flex row; the default gap imitates the space between inline buttons ===== */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 0.25em; }

/* Farrugia Dental: lake blue, sunshine yellow, mist. Bricolage Grotesque display, Atkinson Hyperlegible text. */
:root {
  --brand: #1f4f66; --brand-dark: #163a4b; --sun: #f2b83b; --sun-dark: #d99d1f;
  --ink: #1c2b3a; --muted: #4a5a68; --line: #d7e0e5; --surface: #ffffff; --bg: #ffffff; --mist: #eef3f5;
  --error-bg: #fbe9e7; --error-text: #9b2c1d; --ok-bg: #e5f1ec; --ok-text: #1f5a43;
  --display: "Bricolage Grotesque", "Trebuchet MS", Arial, sans-serif;
  --text: "Atkinson Hyperlegible", Verdana, Arial, sans-serif;
  --r-lg: 28px; --r-md: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 100px; }
body { margin: 0; font: 400 1.125rem/1.65 var(--text); color: var(--ink); background: var(--bg); }
h1, h2, h3, h4, p, ul, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; color: var(--ink); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.4rem; line-height: 1.2; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.mockup-note { background: #fff4d6; text-align: center; font-size: .85rem; padding: 6px 12px; }

/* top bar + header */
.topbar { background: var(--brand); color: #fff; font-size: .95rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #fff; font-weight: 700; text-decoration: none; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-bar { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 24px; }
.brand img { height: 50px; width: auto; display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; gap: 32px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.site-nav .menu-cta > a { background: var(--sun); color: var(--ink); padding: 12px 22px; border-radius: 12px; text-decoration: none; }
.site-nav .menu-cta > a:hover { background: var(--sun-dark); }
.nav-toggle { display: none; font: 700 1rem var(--text); background: var(--mist); color: var(--ink); border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; }

/* buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 15px 26px; border-radius: 12px; font: 700 1.05rem/1.2 var(--text); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--sun); color: var(--ink); }
.btn-text { padding: 2px 0; border-radius: 0; color: var(--brand); border-bottom: 3px solid var(--sun); }

/* images */
.wp-block-image img { max-width: 100%; height: auto; display: block; }
.wp-block-image figcaption { font-size: .95rem; color: var(--muted); margin-top: 10px; }

/* sections */
.section { padding: clamp(60px, 8vw, 104px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }

/* hero */
.hero { background: var(--mist); padding: clamp(40px, 6vw, 80px) 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-flag { display: inline-block; background: var(--sun); color: var(--ink); font-weight: 700; padding: 8px 16px; border-radius: 999px; transform: rotate(-2deg); margin-bottom: 24px; }
.hero h1 { font-size: clamp(2.8rem, 6vw, 5.2rem); font-weight: 800; line-height: .98; letter-spacing: -.035em; margin-bottom: 24px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 44ch; margin-bottom: 32px; }
.hero-photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 120px; }

/* why */
.why h2 { margin-bottom: 40px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.why-item { border-top: 4px solid var(--sun); padding-top: 20px; }
.why-item h3 { margin-bottom: 10px; }
.why-item p { color: var(--muted); }

/* services teaser */
.services-teaser { background: var(--mist); }
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.svc-card { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; display: grid; grid-template-columns: 1fr 1.2fr; }
.svc-media { position: relative; min-height: 260px; }
.svc-media .wp-block-image { position: absolute; inset: 0; }
.svc-card .svc-media img { width: 100%; height: 100%; object-fit: cover; }
.svc-body { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.svc-body p { color: var(--muted); }
.svc-body .btn { align-self: flex-start; margin-top: auto; }

/* doctor */
.doctor-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.doctor-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 160px 160px var(--r-lg) var(--r-lg); }
.doctor h2 { margin-bottom: 20px; }
.doctor p { margin-bottom: 18px; max-width: 58ch; }
.doctor .btn { margin-top: 8px; }
.doctor--about { background: var(--mist); }

/* visit band */
.visit-band { background: var(--brand); color: #e3edf1; padding: clamp(56px, 7vw, 88px) 0; }
.visit-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
.visit-band h2, .visit-band h3 { color: #fff; margin-bottom: 14px; }
.visit-band p { margin-bottom: 20px; }
.visit-band p a:not(.btn) { color: #fff; }
.hours { list-style: none; padding: 0; }
.hours li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.big-phone { font-family: var(--display); font-size: 2rem; font-weight: 800; line-height: 1.1; }
.big-phone a { text-decoration: none; }
.visit-band .big-phone a { color: var(--sun); }

/* inner banner (theme's page banner markup) */
.site-banner { background: var(--mist); padding: clamp(48px, 7vw, 88px) clamp(20px, 4vw, 40px); }
.site-banner__inner { max-width: 1120px; margin: 0 auto; }
.site-banner__crumbs { font-size: .95rem; color: var(--muted); margin-bottom: 14px; }
.site-banner__crumbs a { color: var(--brand); }
.site-banner h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.035em; }
.site-banner__sub { margin-top: 16px; font-size: 1.2rem; color: var(--muted); max-width: 52ch; }

/* services page */
.service-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.service img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); }
.service h2 { margin-bottom: 18px; }
.service p { margin-bottom: 16px; max-width: 58ch; }
.service--alt { background: var(--mist); }
.service--alt .service-grid > .service-media { order: 2; }
.ticks { list-style: none; padding: 0; margin: 8px 0 24px; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%; background: var(--sun); box-shadow: inset 0 0 0 6px var(--sun), inset 0 0 0 20px var(--ink); }

/* about */
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-grid h2 { margin-bottom: 18px; }
.about-grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-lg); }
.wide-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--r-lg); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.form-wrap h2 { margin-bottom: 24px; }
.contact-card { background: var(--mist); border-radius: var(--r-lg); padding: 32px; }
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { margin-bottom: 20px; }
.contact-card .big-phone a { color: var(--brand); }
.contact-card .hours li { border-bottom-color: var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.full { grid-column: 1 / -1; }
label, .label { display: block; font-weight: 700; margin-bottom: 6px; }
input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), select, textarea { width: 100%; font: inherit; padding: 13px 15px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; }
textarea { min-height: 150px; }
.opt { font-weight: 400; color: var(--muted); }
.form-confirmation { background: var(--ok-bg); color: var(--ok-text); padding: 32px; border-radius: var(--r-md); }
.form-confirmation h3 { margin-bottom: 8px; color: var(--ok-text); }

/* blog cards (theme's markup) */
.post-cards-wrap { max-width: 1200px; margin: 0 auto; padding: 56px clamp(20px, 4vw, 40px); }
.post-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card { display: block; background: var(--mist); border-radius: var(--r-md); padding: 24px; color: inherit; text-decoration: none; }
.post-card__label { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.post-card__more { margin-top: 12px; font-weight: 700; color: var(--brand); }
.post-content { max-width: 68ch; }
.post-content > * + * { margin-top: 1em; }

/* footer */
.site-footer { background: var(--ink); color: #c4d0d8; padding: 64px 0 24px; }
.site-footer a { color: #fff; overflow-wrap: anywhere; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand { font-family: var(--display); font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: -.02em; margin-bottom: 8px; }
.site-footer h4 { color: #fff; font-family: var(--display); font-size: 1.1rem; margin-bottom: 10px; }
.copyright { font-size: .9rem; margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .15); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px clamp(20px, 4vw, 40px) 24px; }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav > ul > li > a { display: block; padding: 12px 0; font-size: 1.15rem; }
  .site-nav .menu-cta > a { text-align: center; margin-top: 10px; }
  .hero-grid, .doctor-grid, .service-grid, .about-grid, .contact-grid, .svc-grid { grid-template-columns: 1fr; }
  .service--alt .service-grid > .service-media { order: 0; }
  .visit-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .doctor-media { max-width: 420px; }
}
@media (max-width: 600px) {
  .topbar-inner p:first-child { display: none; }
  .topbar-inner { justify-content: center; }
  .header-bar { height: 72px; }
  .brand img { height: 42px; }
  .svc-card { grid-template-columns: 1fr; }
  .svc-media { min-height: 0; }
  .svc-media .wp-block-image { position: static; }
  .svc-card .svc-media img { aspect-ratio: 16 / 10; height: auto; }
  .visit-grid, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .wide-photo img { aspect-ratio: 4 / 3; }
}

/* Layout grids are Columns blocks in WordPress: keep them as grids. */
.wp-block-columns.hero-grid, .wp-block-columns.why-grid, .wp-block-columns.svc-grid, .wp-block-columns.doctor-grid,
.wp-block-columns.visit-grid, .wp-block-columns.service-grid, .wp-block-columns.about-grid, .wp-block-columns.contact-grid,
.wp-block-columns.footer-grid { display: grid; flex-wrap: nowrap !important; margin-bottom: 0; }
.wp-block-columns.hero-grid, .wp-block-columns.doctor-grid, .wp-block-columns.service-grid, .wp-block-columns.about-grid { align-items: center !important; }
.wp-block-columns.contact-grid { align-items: start !important; }
.wp-block-columns.why-grid, .wp-block-columns.svc-grid, .wp-block-columns.visit-grid, .wp-block-columns.footer-grid { align-items: stretch !important; }
.wp-block-column.svc-card { display: grid; }

/* ===== Button links start from the design's plain link, not WordPress's button look ===== */
.wp-block-button > .wp-block-button__link { background: transparent; color: revert; padding: 0; border: 0; border-radius: 0; font: inherit; line-height: inherit; text-align: inherit; text-decoration: revert; box-shadow: none; word-break: normal; }
.wp-block-button > .wp-block-button__link { color: var(--brand); }

/* ===== Button blocks wear the design's button styles (rules rewritten from .btn*) ===== */
/* The design's .btn-* classes also sit on the block's outer wrapper: neutralise them there. */
.wp-block-buttons > .wp-block-button.wp-block-button, .wp-block-buttons > .wp-block-button.wp-block-button:hover { display: flex; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
/* A button that stood alone in the design: wrappers step aside so the link lays out like the original link. */
.wp-block-buttons.is-solo, .wp-block-buttons.is-solo > .wp-block-button.wp-block-button { display: contents; }
/* Core gives button links height: 100%, which stretches them inside flex columns. */
.wp-block-button > .wp-block-button__link.wp-block-button__link { height: auto; }
.wp-block-button.btn-row > .wp-block-button__link { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button > .wp-block-button__link { display: inline-block; padding: 15px 26px; border-radius: 12px; font: 700 1.05rem/1.2 var(--text); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.wp-block-button.btn-primary > .wp-block-button__link { background: var(--brand); color: #fff; }
.wp-block-button.btn-primary > .wp-block-button__link:hover { background: var(--brand-dark); }
.wp-block-button.btn-outline > .wp-block-button__link { border-color: var(--brand); color: var(--brand); background: transparent; }
.wp-block-button.btn-outline > .wp-block-button__link:hover { background: var(--brand); color: #fff; }
.wp-block-button.btn-light > .wp-block-button__link { background: #fff; color: var(--brand); }
.wp-block-button.btn-light > .wp-block-button__link:hover { background: var(--sun); color: var(--ink); }
.wp-block-button.btn-text > .wp-block-button__link { padding: 2px 0; border-radius: 0; color: var(--brand); border-bottom: 3px solid var(--sun); }
.svc-body .wp-block-button > .wp-block-button__link { align-self: flex-start; margin-top: auto; }
.svc-body .wp-block-button { align-self: flex-start }
.doctor .wp-block-button > .wp-block-button__link { margin-top: 8px; }
.visit-band p .wp-block-button > .wp-block-button__link:not() { color: #fff; }

/* ===== Button groups that were paragraphs keep paragraph spacing ===== */
.wp-block-buttons.is-p { margin: 1em 0; }
.wp-block-buttons.is-p { margin: 0 }
.doctor .wp-block-buttons.is-p { margin-bottom: 18px }
.visit-band .wp-block-buttons.is-p { margin-bottom: 20px }
.service .wp-block-buttons.is-p { margin-bottom: 16px }
.contact-card .wp-block-buttons.is-p { margin-bottom: 20px }

/* ===== Neutral block wrappers ===== */
.wp-site-blocks { padding: 0; }
.wp-block-post-content, .wp-block-template-part { margin: 0; }
.wp-block-image img { max-width: 100%; height: auto; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* ===== Defaults for the page banner and post cards (adapt template-parts/*.php and these rules) ===== */
.fdn-hero { padding: 64px 24px 48px; }
.fdn-hero__inner, .post-cards-wrap { max-width: 1180px; margin: 0 auto; }
.fdn-hero__crumbs { font-size: .85rem; margin: 0 0 12px; }
.fdn-hero__sub { max-width: 640px; margin: 12px 0 0; }
.post-cards-wrap { padding: 48px 24px; }
.post-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.fdn-card { display: block; padding: 24px; border: 1px solid rgba(0,0,0,.12); border-radius: 10px; text-decoration: none; color: inherit; }
.fdn-card__label { font-size: .8rem; margin: 0 0 6px; opacity: .75; }
.fdn-card__more { margin: 12px 0 0; font-weight: 600; }
.pagination-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
