/* ==========================================================================
   Dental Horizons — Design Enhancement Layer
   Loaded after Flatsome main styles via child theme functions.php.
   Palette: blue #2f5e88 · copper #99440e · cream #f6f2ea · ink #26313c
   ========================================================================== */

:root {
  --dh-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dh-shadow-card: 0 8px 28px rgba(28, 45, 62, 0.09);
  --dh-shadow-card-hover: 0 18px 44px rgba(28, 45, 62, 0.16);
  --dh-copper-soft: #b5713a;
}

/* --------------------------------------------------------------------------
   1. CONTRAST FIXES
   -------------------------------------------------------------------------- */

/* Footer widgets sit on deep green but inherit dark body text. */
.footer-widgets,
.footer-widgets p,
.footer-widgets li,
.footer-widgets .widget {
  color: rgba(255, 255, 255, 0.85);
}
.footer-widgets .widget-title {
  color: #fff;
  letter-spacing: 0.08em;
}
.absolute-footer,
.absolute-footer .copyright-footer {
  color: rgba(255, 255, 255, 0.55);
}

/* --------------------------------------------------------------------------
   2. TYPOGRAPHY & ACCENT DETAILS
   -------------------------------------------------------------------------- */

/* Kicker: small copper rule before the label. */
.dh-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
}
.dh-kicker::before {
  content: "";
  flex: none;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.65;
}

/* Slightly tighter, calmer headings. */
h1, h2 {
  letter-spacing: -0.015em;
}

/* --------------------------------------------------------------------------
   3. HERO — GRADIENT SCRIM TREATMENT
   Light text directly on the photo over a deep-blue directional scrim;
   no card. Text boxes carry Flatsome's `.dark` class for light text.
   -------------------------------------------------------------------------- */

.dh-hero .banner-bg::after,
.dh-page-hero .banner-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(24, 47, 66, 0.92) 0%,
    rgba(24, 47, 66, 0.70) 42%,
    rgba(24, 47, 66, 0.34) 70%,
    rgba(24, 47, 66, 0.12) 100%
  );
}

.dh-hero .text-box-content,
.dh-page-hero .text-box-content {
  background: transparent !important;
  box-shadow: none !important;
}
.dh-hero .text-box-content.dark h1,
.dh-page-hero .text-box-content.dark h1 {
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.22);
}
.dh-hero .text-box-content.dark p,
.dh-page-hero .text-box-content.dark p {
  color: rgba(255, 255, 255, 0.92);
}
.dh-hero .text-box-content.dark .dh-kicker,
.dh-page-hero .text-box-content.dark .dh-kicker {
  color: #ffe94d;
}

/* Service-page hero text: narrower, left-aligned (overrides the builder's
   92%-wide centered layout). */
.dh-page-hero .text-box {
  width: 58% !important;
}
.dh-page-hero .text-inner {
  text-align: left;
}
@media (max-width: 849px) {
  /* Vertical scrim on small screens — text spans the full width, so the
     side-fade would leave words on unshaded photo. */
  .dh-hero .banner-bg::after,
  .dh-page-hero .banner-bg::after {
    background: linear-gradient(
      180deg,
      rgba(24, 47, 66, 0.48) 0%,
      rgba(24, 47, 66, 0.72) 50%,
      rgba(24, 47, 66, 0.88) 100%
    );
  }
  .dh-page-hero .text-box {
    width: 86% !important;
  }
}

/* On the dark scrim, the primary button reads better in white. */
.dh-hero .button.primary:not(.is-outline),
.dh-page-hero .button.primary:not(.is-outline) {
  background-color: #fff !important;
  border-color: #fff !important;
  color: #24435c !important;
}

/* Gentle settle-in zoom on the hero image (runs once on load). */
@media (prefers-reduced-motion: no-preference) {
  .dh-anim .dh-hero .bg,
  .dh-anim .dh-page-hero .bg {
    animation: dh-hero-settle 12s var(--dh-ease) both;
  }
  @keyframes dh-hero-settle {
    from { transform: scale(1.06); }
    to   { transform: scale(1); }
  }
}

/* --------------------------------------------------------------------------
   4. CARDS, BUTTONS & INTERACTIVE RICHNESS
   -------------------------------------------------------------------------- */

.dh-card {
  transition: transform 0.35s var(--dh-ease), box-shadow 0.35s var(--dh-ease);
  border-top: 3px solid transparent;
}
.dh-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--dh-shadow-card-hover);
  border-top-color: var(--dh-copper-soft);
}

.button,
input[type="submit"].button {
  transition: transform 0.25s var(--dh-ease), box-shadow 0.25s var(--dh-ease),
              background-color 0.25s var(--dh-ease), color 0.25s var(--dh-ease);
}
.button:hover,
input[type="submit"].button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(28, 45, 62, 0.2);
}
.button:active,
input[type="submit"].button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(28, 45, 62, 0.15);
}

/* Signature split section: soften with a card-like shadow. */
.dh-signature {
  box-shadow: 0 20px 55px rgba(28, 45, 62, 0.14);
}

/* Stretch both halves to equal height so the color panel always matches the
   photo, with the text vertically centered inside it. */
.row.dh-signature,
.row.dh-signature.align-middle {
  align-items: stretch !important;
}
.dh-signature > .col {
  display: flex;
  margin-bottom: 0;
  padding-bottom: 0;
}
.dh-signature > .col > .col-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  width: 100%;
}
@media (min-width: 850px) {
  .dh-signature .img {
    height: 100%;
    margin-bottom: 0;
  }
  .dh-signature .img-inner {
    height: 100% !important;
  }
  .dh-signature .img-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
.dh-signature .img-inner {
  overflow: hidden;
}
.dh-signature .img-inner img {
  transition: transform 6s var(--dh-ease);
}
.dh-signature:hover .img-inner img {
  transform: scale(1.04);
}

/* Header nav: sliding underline on top-level links. */
.header-nav .nav > li > a {
  position: relative;
}
.header-nav .nav > li > a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: #99440e;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s var(--dh-ease);
}
.header-nav .nav > li > a:hover::after,
.header-nav .nav > li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* Header: breathing room + top-bar legibility. Heights stay adjustable in
   the Customizer; these only refine what Flatsome generates. */
.header-top {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
.header-top .html a,
.header-top .html span {
  color: rgba(255, 255, 255, 0.92);
}
.header-top .html a:hover {
  color: #ffe94d;
}
.header-wrapper .header-main #logo img {
  max-height: 74px !important;
  width: auto;
}
.stuck .header-main #logo img {
  max-height: 54px !important;
}
.header-nav li .button {
  margin-left: 6px;
  padding-left: 18px;
  padding-right: 18px;
  font-size: 0.78rem;
}
.header-nav .nav > li > a {
  padding-left: 8px;
  padding-right: 8px;
}
@media (max-width: 549px) {
  /* The sticky bottom action bar already carries both CTAs on phones. */
  .header-main .header-button-1 {
    display: none;
  }
  .header-wrapper .header-main #logo img {
    max-height: 56px !important;
  }
}

/* Sticky header: soft shadow once stuck. */
.header-wrapper {
  transition: box-shadow 0.3s var(--dh-ease);
}
.stuck .header-wrapper,
.header.stuck {
  box-shadow: 0 4px 20px rgba(28, 45, 62, 0.1);
}

/* Footer links: gentle slide on hover. */
.footer-widgets a {
  transition: color 0.2s var(--dh-ease), padding-left 0.25s var(--dh-ease);
}
.footer-widgets a:hover {
  color: #ffe94d;
}

/* --------------------------------------------------------------------------
   4b. IN-PAGE ANCHORS & JUMP NAV
   -------------------------------------------------------------------------- */

/* Anchor targets land below the sticky header. */
[id] {
  scroll-margin-top: 110px;
}
.dh-anchor {
  position: absolute;
  display: block;
  height: 0;
  visibility: hidden;
}

/* "On this page" pill links. */
.dh-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.dh-jump a {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 99px;
  background: #fff;
  border: 1px solid rgba(77, 139, 190, 0.35);
  color: #2f5e88;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background-color 0.25s var(--dh-ease), color 0.25s var(--dh-ease),
              transform 0.25s var(--dh-ease), box-shadow 0.25s var(--dh-ease);
}
.dh-jump a:hover {
  background: #2f5e88;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(28, 45, 62, 0.15);
}

/* --------------------------------------------------------------------------
   4c. CONTENT COMPONENTS (logo strip, step cards, videos, tiers)
   -------------------------------------------------------------------------- */

/* Recognition / affiliation logo strip (About page). */
.dh-logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}
.dh-logo-strip img {
  height: 52px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 0.3s var(--dh-ease), opacity 0.3s var(--dh-ease);
}
.dh-logo-strip img:hover {
  filter: none;
  opacity: 1;
}
@media (max-width: 549px) {
  .dh-logo-strip { gap: 22px; }
  .dh-logo-strip img { height: 36px; }
}

/* First-visit step cards: small circular photo above each step. */
.dh-step-img {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(28, 45, 62, 0.16);
}
.dh-step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4em;
}
.dh-step p:last-child {
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* Small topic photos (membership / financing / insurance). */
.dh-topic-img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 8px 22px rgba(28, 45, 62, 0.12);
}

/* Topic columns (Membership / Financing / Insurance): equal height with the
   final button pinned to the bottom so all three stay aligned. */
.dh-topics .col {
  display: flex;
}
.dh-topics .col .col-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.dh-topics .col .col-inner > .button:last-of-type {
  margin-top: auto;
  align-self: flex-start;
}

/* Responsive video embeds. */
.dh-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(28, 45, 62, 0.16);
  background: #182f42;
}
.dh-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.dh-video-title {
  margin: 12px 0 0;
  font-weight: 700;
}

/* Membership tier cards. */
.dh-tier ul {
  margin: 0.8em 0 0 1.1em;
  font-size: 0.92rem;
}
.dh-tier ul li {
  margin-bottom: 0.35em;
}
.dh-tier-price {
  font-size: 2.1rem;
  font-weight: 700;
  color: #2f5e88;
  margin-bottom: 0.15em;
}
.dh-tier-price span {
  font-size: 1rem;
  font-weight: 600;
  color: #71808c;
}
.dh-tier-save {
  color: #99440e;
  font-weight: 600;
  font-size: 0.9rem;
}
.dh-fineprint {
  font-size: 0.8rem;
  color: #71808c;
  line-height: 1.65;
}

/* ADA guidance note (sleep page). */
.dh-ada-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}
.dh-ada-note img {
  height: 34px;
  width: auto;
  flex: none;
}
.dh-ada-note span {
  font-size: 0.95rem;
  color: #5b6b7a;
}

/* --------------------------------------------------------------------------
   5. STATS STRIP (dark trust band)
   -------------------------------------------------------------------------- */

.dh-stats {
  margin-top: 18px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.dh-stats .dh-stat {
  text-align: center;
}
.dh-stat-num {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffe94d;
  font-variant-numeric: tabular-nums;
}
.dh-stat-label {
  display: block;
  margin-top: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
@media (max-width: 549px) {
  .dh-stat-num { font-size: 2rem; }
}

/* --------------------------------------------------------------------------
   6. SCROLL-REVEAL SYSTEM (activated by dh-enhance.js)
   Elements only get hidden once JS adds .dh-anim to <html>, so content is
   always visible without JavaScript.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .dh-anim .dh-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--dh-ease), transform 0.7s var(--dh-ease);
    transition-delay: var(--dh-delay, 0s);
  }
  .dh-anim .dh-reveal.dh-in {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   7. BUILDER-NATIVE CARD COLUMNS (editable in UX Builder)
   The card chrome lives on the column wrapper so photos/text inside stay
   ordinary builder elements the client can edit.
   -------------------------------------------------------------------------- */

.dh-value-col .col-inner,
.dh-step-col .col-inner {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--dh-shadow-card);
  height: 100%;
  transition: transform 0.35s var(--dh-ease), box-shadow 0.35s var(--dh-ease);
}
.dh-value-col .col-inner {
  padding: 24px;
}
.dh-step-col .col-inner {
  padding: 20px;
}
.dh-value-col .col-inner:hover,
.dh-step-col .col-inner:hover {
  transform: translateY(-4px);
  box-shadow: var(--dh-shadow-card-hover);
}
.dh-step-col .img {
  margin-bottom: 4px;
}
.dh-step-col h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4em;
}
.dh-step-col p:last-child {
  font-size: 0.92rem;
  margin-bottom: 0;
}
