/* ==========================================================
   FAMILY DENTAL CENTRE - STYLESHEET
   ----------------------------------------------------------
   HOW TO EDIT:
   1. Colours, fonts and spacing are all in the "SETTINGS"
      block just below. Change a value there and it updates
      across the whole website.
   2. Every section after that has a heading comment, so use
      your editor's Find (Ctrl+F) to jump to it.
   ========================================================== */

/* ---------- SETTINGS (change these first) ---------- */
:root {
  /* Colours */
  --color-main:        #2ea3f2;  /* buttons, accents (brand blue) */
  --color-main-dark:   #3b9ad7;  /* second shade: button hover */
  --color-deep:        #123a55;  /* headings and footer (dark, for easy reading) */
  --color-link:        #1b79b8;  /* text links (darker so they are readable) */
  --color-text:        #1d2f35;  /* body text */
  --color-text-soft:   #4d6168;  /* secondary text */
  --color-bg:          #ffffff;  /* page background */
  --color-bg-tint:     #eaf5fd;  /* light blue sections */
  --color-line:        #d4e6f4;  /* thin borders */
  --color-highlight:   #f2b84b;  /* small warm accent (quote bar) */

  /* Fonts (loaded from Google Fonts in each page's <head>) */
  --font-heading: "Bricolage Grotesque", "Trebuchet MS", Arial, sans-serif;
  --font-body:    "Source Sans 3", "Segoe UI", Arial, sans-serif;

  /* Sizes and spacing */
  --text-size:     1.0625rem;   /* normal text */
  --max-width:     72rem;       /* widest the content gets */
  --reading-width: 44rem;       /* width of long text blocks */
  --radius:        10px;        /* rounded corner size */
  --section-space: clamp(3rem, 7vw, 5.5rem); /* gap between sections */
}

/* ---------- BASIC RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-size);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-link); }
a:hover { color: var(--color-deep); }
:focus-visible { outline: 3px solid var(--color-highlight); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--color-deep);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1.1em; }

/* ---------- LAYOUT HELPERS ---------- */
.wrap { width: min(100% - 2.5rem, var(--max-width)); margin-inline: auto; }
.section { padding-block: var(--section-space); }
.section--tint { background: var(--color-bg-tint); }
.reading { max-width: var(--reading-width); }

/* ---------- BUTTONS ---------- */
.button {
  display: inline-block;
  padding: .8em 1.5em;
  border-radius: 999px;
  background: var(--color-main);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--color-main);
  transition: background .2s, color .2s;
}
.button:hover { background: var(--color-main-dark); border-color: var(--color-main-dark); color: #fff; }
.button--outline { background: transparent; color: var(--color-link); border-color: var(--color-main); }
.button--outline:hover { background: var(--color-main); color: #fff; }
.button--light { background: #fff; color: var(--color-deep); border-color: #fff; }
.button--light:hover { background: var(--color-bg-tint); color: var(--color-deep); border-color: var(--color-bg-tint); }

/* ---------- TOP BAR (phone + email) ---------- */
.topbar { background: var(--color-deep); color: #fff; font-size: .95rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.5rem; padding-block: .5rem; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }
.topbar__links { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; }

/* ---------- HEADER + NAVIGATION ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--color-line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.logo img { height: 130px; width: auto; }

.nav-toggle {
  display: none;
  background: none; border: 2px solid var(--color-main); color: var(--color-main);
  border-radius: 8px; padding: .45rem .9rem; font: inherit; font-weight: 600; cursor: pointer;
}
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: .3rem; }
.nav a { display: block; padding: .55rem .85rem; text-decoration: none; color: var(--color-text); font-weight: 600; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--color-bg-tint); color: var(--color-deep); }
.nav a.button, .nav a.button:hover { color: #fff; }
.nav a.button:hover { background: var(--color-main-dark); }

/* dropdown under "Treatments" */
.has-sub { position: relative; }
.sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 14rem;
  background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius);
  padding: .4rem; box-shadow: 0 10px 30px rgba(15, 71, 80, .12);
}
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.sub a { font-weight: 500; }

/* ---------- HERO (top of home page) ---------- */
.hero { background: var(--color-bg-tint); }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; padding-block: var(--section-space); }
.hero p { font-size: 1.2rem; color: var(--color-text-soft); max-width: 36rem; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero__image { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---------- PAGE TITLE (top of inner pages) ---------- */
.page-title { background: var(--color-bg-tint); padding-block: clamp(2.5rem, 6vw, 4rem); border-bottom: 1px solid var(--color-line); }
.page-title h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3rem); }
.page-title p { margin: .8rem 0 0; color: var(--color-text-soft); font-size: 1.15rem; max-width: 40rem; }

/* ---------- PROMISE LIST (home page) ---------- */
.promise-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.promise-list li { padding-left: 2rem; position: relative; }
.promise-list li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 1.1rem; height: .6rem;
  border-left: 3px solid var(--color-main); border-bottom: 3px solid var(--color-main);
  transform: rotate(-45deg);
}
.two-col { display: grid; gap: 2.5rem; }

/* ---------- TREATMENT CARDS (home page) ---------- */
.cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); margin-top: 2rem; }
.card {
  display: block; text-decoration: none; color: var(--color-text);
  background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius);
  padding: 1.5rem; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--color-main); color: var(--color-text); transform: translateY(-2px); }
.card img { height: 64px; width: auto; margin-bottom: 1rem; }
.card h3 { margin-bottom: .4rem; }
.card p { margin: 0; color: var(--color-text-soft); font-size: 1rem; }
.card__link { display: inline-block; margin-top: .8rem; font-weight: 600; color: var(--color-link); }

/* ---------- PULL QUOTE ---------- */
.quote { border-left: 6px solid var(--color-highlight); padding: .5rem 0 .5rem 1.5rem; max-width: 46rem; margin: 0 auto; }
.quote p { font-family: var(--font-heading); font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1.35; color: var(--color-deep); margin: 0; }

/* ---------- ARTICLE PAGES (treatment pages) ---------- */
.article { padding-block: var(--section-space); }
.article .reading > * + h2 { margin-top: 2.2rem; }
.article h3 { margin-top: 1.8rem; color: var(--color-link); }
.article ul, .article ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
.article li { margin-bottom: .45em; }
.article-image { border-radius: var(--radius); margin: 1.5rem 0; width: 100%; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 1.8rem 0; border-radius: var(--radius); overflow: hidden; background: var(--color-bg-tint); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* highlighted box for notes, warnings and prices */
.note { background: var(--color-bg-tint); border-left: 5px solid var(--color-main); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.1rem 1.4rem; margin: 1.5rem 0; }
.note p:last-child { margin-bottom: 0; }
.note--warning { border-left-color: var(--color-highlight); }
.sources { font-size: .9rem; color: var(--color-text-soft); margin-top: 2.5rem; }

/* side-by-side comparison (silver vs white fillings, etc.) */
.compare { display: grid; gap: 1.2rem; margin: 1.5rem 0; }
.compare > div { border: 1px solid var(--color-line); border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.compare h3 { margin-top: 0; }

/* ---------- TEAM (The Practice page) ---------- */
.person { display: grid; gap: 1.8rem; align-items: start; padding-block: 2.5rem; border-bottom: 1px solid var(--color-line); }
.person:last-of-type { border-bottom: 0; }
.person img { border-radius: var(--radius); width: 100%; max-width: 22rem; aspect-ratio: 4 / 5; object-fit: cover; }
.person h2 { margin-bottom: .2rem; }
.person__role { color: var(--color-link); font-weight: 600; margin-bottom: 1rem; }

/* ---------- GALLERY ---------- */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.gallery figcaption { padding-top: .4rem; font-size: .95rem; color: var(--color-text-soft); }

/* ---------- VISIT US + MAP (bottom of home page) ---------- */
.visit { display: grid; gap: 2rem; align-items: start; }
.visit address { font-style: normal; margin-bottom: 1.2rem; }
.hours { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours td { padding: .45rem 0; border-bottom: 1px solid var(--color-line); }
.hours td:last-child { text-align: right; font-weight: 600; }
.map { border: 0; width: 100%; height: 22rem; border-radius: var(--radius); background: var(--color-bg-tint); }

/* ---------- CALL-TO-ACTION STRIP (above footer) ---------- */
.cta { background: var(--color-deep); color: #fff; text-align: center; padding-block: clamp(2.5rem, 6vw, 4rem); }
.cta h2 { color: #fff; }
.cta p { max-width: 36rem; margin-inline: auto; }
.cta__buttons { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.4rem; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--color-deep); color: #d5e6f2; padding-block: 2.5rem; font-size: .98rem; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: grid; gap: 1.5rem; }
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: .5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .3rem; }
.site-footer__small { border-top: 1px solid rgba(255,255,255,.2); padding-top: 1.2rem; font-size: .9rem; }

/* ---------- LARGER SCREENS ---------- */
@media (min-width: 52rem) {
  .hero .wrap { grid-template-columns: 1.1fr .9fr; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr 1fr; }
  .person { grid-template-columns: 22rem 1fr; gap: 3rem; }
  .visit { grid-template-columns: 1fr 1.4fr; }
  .site-footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ---------- PHONES AND TABLETS: collapsed menu ---------- */
@media (max-width: 62rem) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--color-line); padding: .5rem 1.25rem 1rem; }
  .nav.is-open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; }
  .sub { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 1rem; }
}

/* Respect people who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
