/* DC Medic - static site. Colours and fonts follow the original WordPress theme. */

/* Self-hosted fonts (latin subset from Google Fonts); Raleway is a variable font covering 400-700 */
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/raleway-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Righteous';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/righteous-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Play';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/play-latin.woff2') format('woff2');
}

:root {
  --navy: #204579;
  --sky: #53a8d1;        /* logo light blue: accents only, too light for white text */
  --sky-strong: #287ca8; /* white text on this passes WCAG AA (4.6:1) */
  --ink: #212529;
  --muted: #5a6470;
  --paper: #f5f5f5;
  --white: #fff;
  --header-h: 96px;
  --shadow: 0 6px 20px rgba(0, 0, 0, .19), 0 10px 60px rgba(0, 0, 0, .12);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--navy); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 800px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Headings as in the original theme: Righteous, bold, 2rem / 1.75rem, 2px tracking */
.section-title {
  margin: 0 0 .5rem;
  font-family: 'Righteous', cursive;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 2px;
  text-align: center;
  color: var(--navy);
  text-rendering: optimizeLegibility;
}
@media (max-width: 520px) { .section-title { font-size: 1.6rem; } }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: #f8f9fa;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.brand img { height: 80px; width: auto; }

.main-nav ul { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.main-nav a {
  display: block;
  padding: 8px 10px;
  letter-spacing: 5px;
  text-decoration: none;
  color: rgba(0, 0, 0, .62);
}
.main-nav a:hover, .main-nav a[aria-current] { color: rgba(0, 0, 0, .9); }

.nav-toggle { display: none; }

@media (max-width: 767px) {
  :root { --header-h: 72px; }
  .brand img { height: 56px; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 40px; padding: 8px;
    background: none; border: 1px solid rgba(0, 0, 0, .15); border-radius: 4px; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: rgba(0, 0, 0, .6); }
  .main-nav {
    position: absolute; inset: var(--header-h) 0 auto;
    background: #f8f9fa; box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
}

/* Hero carousel */
.carousel { position: relative; height: 65vh; min-height: 220px; max-height: 640px; overflow: hidden; background: #222; }
/* On phones: 3:2 frame, cropped per photo so the equipment stays in view */
@media (max-width: 767px) {
  .carousel { height: auto; min-height: 0; aspect-ratio: 3 / 2; }
  .slide-1 { object-position: 100% 50%; } /* blood pressure gauge + cuff */
  .slide-2 { object-position: 8% 50%; }   /* gauge + cuff */
  .slide-3 { object-position: 72% 50%; }  /* monitor + printout */
}
.slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1s ease;
}
.slide.is-active { opacity: 1; }
.carousel-btn {
  position: absolute; top: 0; bottom: 0; width: 15%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; opacity: .6; transition: opacity .2s;
}
.carousel-btn:hover, .carousel-btn:focus-visible { opacity: 1; }
.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }
.carousel-btn svg { width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }

/* Call to action band */
#optin { background: var(--sky-strong); color: var(--white); padding: 24px 0; font-size: 1.2em; }
.optin-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around; gap: 16px; text-align: center; }
.optin-inner p { margin: 0; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border: 1px solid var(--white); border-radius: 4px;
  color: var(--white); font-weight: 700; text-decoration: none; font-size: 1rem;
  transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--white); color: var(--sky-strong); }
.btn-outline svg { width: 18px; height: 18px; fill: currentColor; }

/* About */
#overons { background: var(--paper); padding: 40px 0 64px; text-align: center; color: var(--navy); }
#overons .section-title { margin-bottom: 40px; }
#overons p { margin: 0 0 1rem; }

/* Services */
#services { padding: 40px 0 48px; }
#services .section-title { font-size: 1.75rem; margin-bottom: 1.5rem; }
@media (max-width: 520px) { #services .section-title { font-size: 1.4rem; } }
.services-list {
  columns: 2; column-gap: 48px;
  margin: 0 auto; padding: 0; list-style: none; max-width: 640px; color: var(--ink);
}
.services-list li { position: relative; padding: 4px 0 4px 26px; break-inside: avoid; }
.services-list li::before {
  content: "+"; position: absolute; left: 0; top: 2px;
  font-weight: 700; font-size: 1.2em; color: var(--sky);
}
.services-list li.more::before { content: ""; }
@media (max-width: 520px) { .services-list { columns: 1; } }

/* Contact */
#contact { background: var(--sky-strong); color: var(--white); padding: 20px 0 48px; text-align: center; }
#contact .section-title { color: var(--white); }
#contact hr { width: 75%; margin: 1rem auto; border: 0; border-top: 1px solid rgba(0, 0, 0, .1); }
#contact hr + .contact-grid { margin-top: 32px; }
#contact a { color: var(--white); text-decoration: none; }
#contact a:hover { text-decoration: underline; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; align-items: center; }
.card { border-radius: 6px; box-shadow: var(--shadow); transition: transform .25s ease; }
.card:hover { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }
.contact-info { padding: 16px; }
.contact-info p { margin: 0; padding: 14px 0; }
.contact-info svg { width: 24px; height: 24px; margin: 0 auto 6px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.map-card { display: block; padding: 16px; text-decoration: none; background: rgba(0, 0, 0, .08); }
.map-art { width: 100%; height: auto; background: #e8f1f6; border-radius: 4px; }
.map-art .road { fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; }
.map-art .road.thin { stroke-width: 6; }
.map-art .pin { fill: var(--navy); }
.map-art .pin-dot { fill: #fff; }
.map-card span { display: block; margin-top: 12px; font-weight: 700; }

/* Footer */
/* Text pages (privacy) */
.page { padding: 48px 0 64px; }
.page .section-title { margin-bottom: .25rem; }
.page-meta { text-align: center; color: var(--muted); font-size: .9rem; margin: 0 0 2rem; }
.page h2 { margin: 2rem 0 .5rem; font-family: 'Righteous', cursive; font-size: 1.35rem; letter-spacing: 1px; color: var(--navy); }
.page h3 { margin: 1.25rem 0 .25rem; font-size: 1.05rem; color: var(--navy); }
.page p { margin: 0 0 1rem; }
.link-btn.inline { font-size: inherit; color: var(--sky-strong); text-decoration: underline; }
.table-wrap { overflow-x: auto; }
.page table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.page th, .page td { padding: 8px 10px; border-bottom: 1px solid #ddd; text-align: left; vertical-align: top; }
.page th { color: var(--navy); }
.page code { font-size: .85em; }

/* Footer in Play, like the Virtual Knowledge credit line on the original */
.site-footer { padding: 16px 0 24px; text-align: center; font-family: 'Play', sans-serif; color: var(--ink); }
.site-footer p { margin: 0 0 1rem; }
.site-footer hr { width: 75%; margin: 1rem auto; border: 0; border-top: 1px solid rgba(0, 0, 0, .1); }
.legal { font-size: .8rem; color: var(--muted); }
.legal a { color: inherit; }
.credits a { color: var(--sky-strong); text-decoration: none; }
.credits a:hover { text-decoration: underline; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }

/* Cookie consent */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 560px; margin: 0 auto; padding: 16px 20px;
  background: var(--white); color: var(--ink);
  border-radius: 8px; box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
}
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; font-size: .95rem; }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.btn-ghost, .btn-solid { padding: 8px 16px; border-radius: 4px; font: inherit; font-weight: 700; cursor: pointer; }
.btn-ghost { background: none; border: 1px solid #ccc; color: var(--ink); }
.btn-solid { background: var(--sky); border: 1px solid var(--sky); color: var(--white); }
.btn-solid:hover { background: var(--sky-strong); border-color: var(--sky-strong); }
.consent a { color: var(--sky-strong); }
.btn-ghost:hover { border-color: #999; }
