/* Phase C additions (post-parity). Every rule here supports an authorised compliance or
 * accessibility addition and reuses the site's existing typography and colours. */

/* ---- Footer: disclaimer, qualified copyright, credit, policy links (existing footer bar) ---- */
.kbs-copy-text .et_pb_text_inner > .kbs-legal-disclaimer,
.kbs-copy-text .et_pb_text_inner > .kbs-legal-copyright,
.kbs-copy-text .et_pb_text_inner > .kbs-legal-credit,
.kbs-copy-text .et_pb_text_inner > .kbs-legal-links {
  flex-basis: 100%;
  text-align: center;
  padding-bottom: 0;
}
.kbs-legal-disclaimer p {
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 0.6em;
  font-size: 0.9em;
  line-height: 1.6em;
}
.kbs-legal-copyright span + span::before { content: " "; }
.kbs-legal-links { line-height: 2em; }
.kbs-legal-links span[aria-hidden="true"] { padding: 0 0.35em; opacity: 0.7; }
.kbs-privacy-settings {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.kbs-privacy-settings:hover { color: #cf1f18; }

/* ---- Blog: doctor profile + disclaimer ---- */
.kbs-author-profile {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 30px 0 20px;
  padding: 20px 0;
  border-top: 1px solid #e3e3e3;
  border-bottom: 1px solid #e3e3e3;
}
.kbs-author-profile img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  flex: 0 0 96px;
}
.kbs-author-profile p { padding-bottom: 0.2em; }
.kbs-blog-disclaimer p { font-size: 0.9em; font-style: italic; }

/* ---- Draft notice on new/changed policies (rendered only on review builds) ---- */
.kbs-draft-notice {
  background: #fff8e1;
  border-left: 4px solid #e0a100;
  color: #333;
  padding: 10px 14px !important;
  margin-bottom: 20px;
  font-size: 0.9em;
}

/* ---- Cookie consent ---- */
.sis-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100000;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  background: #1e2427;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  line-height: 1.5;
}
.sis-consent[hidden] { display: none; }
.sis-consent a { color: #fff; text-decoration: underline; }
.sis-consent-text { margin: 0; padding: 0; flex: 1 1 320px; }
.sis-consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sis-consent button,
.sis-consent-dialog button {
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border-radius: 5px;
  padding: 6px 14px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
}
.sis-consent button[data-consent="allow"] { background: #c4231c; border-color: #c4231c; }
.sis-consent-dialog {
  max-width: 560px;
  width: calc(100% - 32px);
  border: 0;
  border-radius: 10px;
  padding: 24px;
  color: #333;
  font-size: 15px;
}
.sis-consent-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
.sis-consent-dialog h2 { font-size: 1.4em; padding-bottom: 10px; }
.sis-consent-dialog button { color: #333; border-color: #333; }
.sis-consent-dialog button[value="save"] { background: #c4231c; border-color: #c4231c; color: #fff; }
.sis-consent-row { display: flex; gap: 10px; align-items: flex-start; }
.sis-consent-row input { margin-top: 5px; }

/* ---- Keyboard focus visibility (WCAG 2.4.7 / 2.4.11) — keyboard users only ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.et_pb_toggle_title:focus-visible {
  outline: 3px solid #1a73e8 !important;
  outline-offset: 2px;
}

/* ---- Keyboard-opened dropdowns ---- */
.et-menu li.et-show-dropdown > .sub-menu { visibility: visible; opacity: 1; }

/* ---- Reduced motion: system setting or toolbar "Reduce Motion" ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body.pojo-a11y-reduced-motion *,
body.pojo-a11y-reduced-motion *::before,
body.pojo-a11y-reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* ---- Toolbar "Text Spacing" (WCAG 1.4.12 values) ---- */
body.pojo-a11y-text-spacing #page-container * {
  line-height: 1.5 !important;
  letter-spacing: 0.12em !important;
  word-spacing: 0.16em !important;
}
body.pojo-a11y-text-spacing #page-container p { margin-bottom: 2em !important; }

/* ---- Links inside new (Phase C) content: same hue as the site red (#cf1f18, 4.21:1 on white),
 *      darkened just enough to meet WCAG 1.4.3 (#d42d27 = 5.0:1). Existing content unchanged. ---- */
.kbs-phase-c-content a,
.kbs-author-profile a { color: #d42d27; }
.kbs-phase-c-content a:hover,
.kbs-author-profile a:hover { text-decoration: underline; }

/* ---- Icon-font glyphs drawn with ::after were read aloud as part of link names
 *      (e.g. "Services 3"). CSS alternative text "" keeps the glyph and silences it
 *      for assistive technology (WCAG 1.1.1 / 2.5.3). Same specificity + later in the
 *      cascade; browsers without support ignore this declaration and keep Divi's. ---- */
.et-menu .menu-item-has-children > a:first-child:after { content: "3" / ""; }
.et_pb_custom_button_icon.et_pb_button:after { content: attr(data-icon) / ""; }

/* ---- Footer credit badge (owner request): white background, rounded corners, bold ---- */
.kbs-legal-credit > span {
  display: inline-block;
  background: #ffffff;
  color: #1e2427;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 16px;
  line-height: 1.6;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.et-db #et-boc .et-l .et_pb_text_0_tb_footer.et_pb_text .kbs-legal-credit a,
.et-db #et-boc .et-l .kbs-legal-credit a,
.kbs-legal-credit a { color: #1e2427 !important; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.et-db #et-boc .et-l .et_pb_text_0_tb_footer.et_pb_text .kbs-legal-credit a:hover,
.et-db #et-boc .et-l .kbs-legal-credit a:hover,
.kbs-legal-credit a:hover { color: #c4231c !important; }

/* ---- Homepage hero 30% shorter on desktop (owner request 2026-12-01). CSS only: the H1, text,
 *      button, images and markup are unchanged (no SEO impact). Divi sizes the hero by the padding
 *      around the slide text (percent of the 1,140px text area). Top padding stays at the original
 *      20% so the text clears the menu; the space below the button shrinks (40% -> 17.8%).
 *      Tablet/phone keep the original stacked layout (photo above text). ---- */
@media only screen and (min-width: 981px) {
  /* Homepage only: the header is a solid bar (same colour as the tablet/phone header) instead of
     floating over the photo, so the photo fits entirely inside the hero below it. */
  body.home .et_pb_section_0_tb_header.kbs-header-section:not(.et_pb_sticky) {
    position: relative !important;
    background-color: rgb(26, 35, 35) !important;
  }
  body.home .et_pb_section .et_pb_fullwidth_slider_0 .et_pb_slide_description { padding-top: 9% !important; padding-bottom: 23% !important; }
  body.home .et_pb_fullwidth_slider_0 .et_pb_slide_0 { background-position: 50% 25% !important; }
}
/* Wide screens (1600px+): the photo grows with the screen but the hero did not, so heads were
   cropped. Spacing in vw lets the hero grow with width, and the photo is anchored near its top. */
@media only screen and (min-width: 1600px) {
  body.home .et_pb_section .et_pb_fullwidth_slider_0 .et_pb_slide_description { padding-top: 7.1vw !important; padding-bottom: 16vw !important; }
}
/* Faces fully visible at every desktop width (owner feedback 2026-12-01, "faces are cut"): the
   photo (1920x950) shows the people between y=50 and y=680; the photo is anchored at y=50 and the
   hero is at least tall enough for y=680 to clear the 100px wave at the bottom. */
@media only screen and (min-width: 981px) {
  body.home .et_pb_fullwidth_slider_0 .et_pb_slide_0 {
    background-position: 50% -2.6vw !important;
    min-height: calc(32.8vw + 100px);
  }
}

/* ---- Hero text contrast (owner request "100% all", 2026-12-01): the hero's base colour under the photo
 *      was white, so automated checkers judged the white text against white/grey. The base colour is
 *      now the dark grey Divi already uses on phones; the photo covers it completely (no visual change). ---- */
@media only screen and (min-width: 981px) {
  .et_pb_fullwidth_slider_0 .et_pb_slide_0 { background-color: #4a4a4a !important; }
  /* Same 20% dark tint over the photo, drawn as an image layer so checkers know the text sits on
     the photo (visually identical to Divi's rgba(0,0,0,0.2) background colour). */
  .et_pb_fullwidth_slider_0 .et_pb_slide_0 .et_pb_slide_overlay_container {
    background-color: transparent !important;
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
  }
}
/* Divi's faint blurred text shadow (30% black) is measured by contrast checkers as a light grey layer
   behind the white hero text; it is removed (barely visible on the photo). */
.et_pb_fullwidth_slider_0 .et_pb_slide_description .et_pb_slide_title,
.et_pb_fullwidth_slider_0 .et_pb_slide_description .et_pb_slide_content { text-shadow: none !important; }

/* The special-offers carousel heading sits on a dark background, where the original light red
 * (#de8080) already reads well (6.0:1); keep it there instead of the darker red used on white. */
#kbs-offers-carousel .et_pb_slide_content h4 { color: #de8080 !important; }

/* Visually hidden text (WordPress .screen-reader-text), guaranteed on every page: used by the
 * hidden <h1> on archive pages. */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }

/* Current-page / hover links in the dark header bar and black footer menu: a lighter tint of the
 * brand red (#eb5650, 4.6:1 on the dark header) so they stay readable on dark backgrounds
 * (WCAG 1.4.3). Dropdowns and the mobile menu (white backgrounds) keep the darker red. */
.et-db #et-boc .et-l .et_pb_menu_0_tb_header.et_pb_menu .et-menu-nav > ul > li.current-menu-item > a,
.et-db #et-boc .et-l .et_pb_menu_0_tb_header.et_pb_menu .et-menu-nav > ul > li.current-menu-ancestor > a,
.et_pb_menu_0_tb_header.et_pb_menu .et-menu-nav > ul > li.current-menu-item > a,
.et_pb_menu_0_tb_header.et_pb_menu .et-menu-nav > ul > li.current-menu-ancestor > a,
.et-db #et-boc .et-l .et_pb_menu_0_tb_footer.et_pb_menu ul li.current-menu-item a,
.et-db #et-boc .et-l .et_pb_menu_0_tb_footer.et_pb_menu ul li:hover > a,
.et_pb_menu_0_tb_footer.et_pb_menu .et-menu-nav ul li.current-menu-item a,
.et_pb_menu_0_tb_footer.et_pb_menu .et-menu-nav ul li:hover > a { color: #eb5650 !important; }

/* Blog archive post titles: at least 24px tall tap targets (WCAG 2.5.8). Padding on an inline link
 * enlarges only the clickable area; text and layout are unchanged. */
.et_pb_post .entry-title a { padding: 3px 0; }

/* Homepage hero text on the left (owner request 2026-12-01): heading, text and button are left-aligned
 * and kept over the empty wooden wall (left ~65% of the photo, above the heads), so they no longer
 * cross any face. The hero height follows the photo (min-height rule above). Desktop only;
 * tablet/phone keep the stacked layout. Same text, H1 and button (no SEO change). */
@media only screen and (min-width: 981px) {
  body.home .et_pb_section .et_pb_fullwidth_slider_0 .et_pb_slide_0 .et_pb_slide_description {
    text-align: left !important;
    width: 56vw;
    max-width: 56vw;
    margin-left: 0 !important;
    margin-right: auto !important;
    padding-top: 3.2vw !important;
    padding-bottom: 4vw !important;
  }
  body.home .et_pb_fullwidth_slider_0 .et_pb_slide_0 .et_pb_slide_description .et_pb_button_wrapper { text-align: left; }
}
@media only screen and (min-width: 981px) and (max-width: 1279px) {
  body.home .et_pb_section .et_pb_fullwidth_slider_0 .et_pb_slide_0 .et_pb_slide_description { padding-top: 2vw !important; }
  body.home .et_pb_fullwidth_slider_0 .et_pb_slide_0 .et_pb_slide_description .et_pb_slide_title { font-size: 28px !important; }
  body.home .et_pb_fullwidth_slider_0 .et_pb_slide_0 .et_pb_slide_description .et_pb_slide_content { font-size: 13px !important; line-height: 1.6em !important; }
  body.home .et_pb_fullwidth_slider_0 .et_pb_slide_0 { min-height: calc(32.8vw + 160px); }
}
