/* Optional dark palette for the captured Avada design. Photo and video assets
   stay untouched; the shared color tokens switch the surrounding UI. */
html[data-theme="dark"] {
  color-scheme: dark;
  --wp--preset--color--black: #f4f0e9;
  --wp--preset--color--white: #171715;
  --wp--preset--color--awb-color-1: #171715;
  --wp--preset--color--awb-color-2: #201f1b;
  --wp--preset--color--awb-color-3: #45423d;
  --wp--preset--color--awb-color-4: #b9a579;
  --wp--preset--color--awb-color-5: #c9a65f;
  --wp--preset--color--awb-color-6: #aaa39a;
  --wp--preset--color--awb-color-7: #d1ccc3;
  --wp--preset--color--awb-color-8: #f4f0e9;
  --awb-color1: #171715;
  --awb-color1-h: 60;
  --awb-color1-s: 1%;
  --awb-color1-l: 9%;
  --awb-color2: #201f1b;
  --awb-color2-h: 45;
  --awb-color2-s: 9%;
  --awb-color2-l: 12%;
  --awb-color3: #45423d;
  --awb-color3-h: 36;
  --awb-color3-s: 4%;
  --awb-color3-l: 26%;
  --awb-color4: #b9a579;
  --awb-color4-h: 42;
  --awb-color4-s: 31%;
  --awb-color4-l: 60%;
  --awb-color5: #c9a65f;
  --awb-color5-h: 41;
  --awb-color5-s: 49%;
  --awb-color5-l: 58%;
  --awb-color6: #aaa39a;
  --awb-color6-h: 34;
  --awb-color6-s: 8%;
  --awb-color6-l: 64%;
  --awb-color7: #d1ccc3;
  --awb-color7-h: 39;
  --awb-color7-s: 13%;
  --awb-color7-l: 79%;
  --awb-color8: #f4f0e9;
  --awb-color8-h: 39;
  --awb-color8-s: 31%;
  --awb-color8-l: 94%;
  --body_typography-color: #f4f0e9;
  --content_bg_color: #171715;
  --footer_bg_color: #10100f;
  --form_bg_color: #25241f;
  --form_text_color: #f4f0e9;
  --form_border_color: #5b564b;
  --form_focus_border_color: #c9a65f;
  --awb-submenu-bg: #201f1b;
  --awb-submenu-color: #f4f0e9;
  --awb-submenu-active-bg: #302d26;
  --awb-submenu-active-color: #f4f0e9;
  --awb-mobile-bg: #201f1b;
  --awb-mobile-color: #f4f0e9;
  --awb-mobile-trigger-background-color: #201f1b;
  --awb-mobile-trigger-color: #f4f0e9;
  background: #171715;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .fusion-body {
  background-color: #171715;
  color: #f4f0e9;
}

html[data-theme="dark"] .fusion-body,
html[data-theme="dark"] .fusion-body h1,
html[data-theme="dark"] .fusion-body h2,
html[data-theme="dark"] .fusion-body h3,
html[data-theme="dark"] .fusion-body h4,
html[data-theme="dark"] .fusion-body h5,
html[data-theme="dark"] .fusion-body h6,
html[data-theme="dark"] .fusion-body .fusion-text,
html[data-theme="dark"] .fusion-body p,
html[data-theme="dark"] .fusion-body li,
html[data-theme="dark"] .fusion-body label,
  html[data-theme="dark"] .fusion-body .fusion-icon,
  html[data-theme="dark"] .fusion-body .awb-menu__main-a {
  color: #f4f0e9 !important;
}

html[data-theme="dark"] .fusion-body a:not(.fusion-button):not(.awb-button),
html[data-theme="dark"] .fusion-body .fusion-link a {
  color: #d3b46e !important;
}

/* Give the emphasized Team word in the Who We Are heading a brighter accent. */
html[data-theme="dark"] body[data-snap-page="who-we-are"] .fusion-title-6 h2 > span:first-of-type,
html[data-theme="dark"] body[data-snap-page="who-we-are"] .fusion-title-6 h2 > span:last-of-type {
  color: #ffca61 !important;
}

html[data-theme="dark"] .fusion-body .fusion-button,
html[data-theme="dark"] .fusion-body .awb-button,
html[data-theme="dark"] .fusion-body .fusion-button .fusion-button-text,
html[data-theme="dark"] .fusion-body .fusion-button i {
  color: #ffffff !important;
  border-color: #b9a579 !important;
}

html[data-theme="dark"] .fusion-body .fusion-button:not(.fusion-button-default),
html[data-theme="dark"] .fusion-body .fusion-button-default {
  background: #715727 !important;
  background-image: none !important;
}

html[data-theme="dark"] .fusion-body .fusion-button:hover,
html[data-theme="dark"] .fusion-body .fusion-button:focus-visible {
  background: #8a6c34 !important;
}

html[data-theme="dark"] .fusion-separator .icon-wrapper i,
html[data-theme="dark"] i.mancha-mancha-bold-house-icon,
html[data-theme="dark"] i.mancha-mancha-builders-icon,
html[data-theme="dark"] i.mancha-mancha-gallery-icon,
html[data-theme="dark"] i.mancha-mancha-about-icon,
html[data-theme="dark"] i.mancha-mancha-available-icon,
html[data-theme="dark"] i.mancha-mancha-subdivisions-icon {
  color: #d3b46e !important;
}

/* Map pins sit on gold hotspot discs in dark mode. Keep the house glyph dark
   against the gold, then switch it back to gold over Avada's dark hover state. */
html[data-theme="dark"] .awb-image-hotspots-hotspot,
html[data-theme="dark"] .awb-image-hotspots-hotspot > i.mancha-mancha-bold-house-icon {
  color: #201f1b !important;
}

html[data-theme="dark"] .awb-image-hotspots-hotspot:hover,
html[data-theme="dark"] .awb-image-hotspots-hotspot:focus,
html[data-theme="dark"] .awb-image-hotspots-hotspot:hover > i.mancha-mancha-bold-house-icon,
html[data-theme="dark"] .awb-image-hotspots-hotspot:focus > i.mancha-mancha-bold-house-icon {
  color: #d3b46e !important;
}

html[data-theme="dark"] body.home .fusion-builder-row-3 .fusion-column-inner-bg-wrapper .fb-icon-element,
html[data-theme="dark"] body.home .fusion-builder-row-3 .fusion-column-inner-bg-wrapper .fb-icon-element::before {
  color: #fff !important;
}

html[data-theme="dark"] .fusion-section-separator.horizon {
  background-color: transparent !important;
  background-image: none !important;
}

html[data-theme="dark"] .fusion-section-separator.horizon .fusion-horizon-candy path {
  fill: #171715 !important;
}

html[data-theme="dark"] .fusion-section-separator.horizon .fusion-horizon-candy path:first-child {
  opacity: 0.2;
}

html[data-theme="dark"] .fusion-section-separator.horizon .fusion-horizon-candy path:nth-child(2) {
  opacity: 0.3;
}

html[data-theme="dark"] .fusion-section-separator.horizon .fusion-horizon-candy path:nth-child(3) {
  opacity: 0.45;
}

html[data-theme="dark"] body.home .fusion-section-separator.horizon.fusion-section-separator-1 .fusion-horizon-candy path,
html[data-theme="dark"] body.home .fusion-section-separator.horizon.fusion-section-separator-3 .fusion-horizon-candy path {
  fill: #242320 !important;
}

html[data-theme="dark"] body.home .fusion-section-separator.horizon.fusion-section-separator-2 .fusion-horizon-candy path {
  fill: #201f1b !important;
}

html[data-theme="dark"] body.home .fusion-section-separator.horizon.fusion-section-separator-3 .fusion-horizon-candy path:first-child {
  opacity: 0.32;
}

html[data-theme="dark"] body.home .fusion-section-separator.horizon.fusion-section-separator-3 .fusion-horizon-candy path:nth-child(2) {
  opacity: 0.48;
}

html[data-theme="dark"] body.home .fusion-section-separator.horizon.fusion-section-separator-3 .fusion-horizon-candy path:nth-child(3) {
  opacity: 0.68;
}

html[data-theme="dark"] body.home .fusion-section-separator-3,
html[data-theme="dark"] body.home .fusion-section-separator-3 .fusion-section-separator-svg {
  z-index: 5 !important;
}

html[data-theme="dark"] body.home .fusion-builder-row-7 {
  position: relative;
  z-index: 2;
}

html[data-theme="dark"] body.home .fusion-builder-row-4 {
  --awb-background-color: #242320 !important;
  --awb-background-image: linear-gradient(180deg, #242320 0%, #201f1b 100%) !important;
}

html[data-theme="dark"] body.home .fusion-builder-row-6 {
  --awb-background-color: #201f1b !important;
  --awb-background-image: linear-gradient(180deg, #201f1b 0%, #171715 100%) !important;
}

html[data-theme="dark"] body.home .fusion-builder-row-7 {
  --awb-background-color: #171715 !important;
  --awb-background-image: none !important;
}

html[data-theme="dark"] body.home .fusion-builder-row-8 {
  position: relative;
  z-index: 1;
  --awb-background-color: #242320 !important;
  --awb-background-image: linear-gradient(180deg, #242320 0%, #171715 100%) !important;
}

html[data-theme="dark"] .fusion-body input:not([type="submit"]),
html[data-theme="dark"] .fusion-body textarea,
html[data-theme="dark"] .fusion-body select {
  background-color: #25241f;
  border-color: #5b564b;
  color: #f4f0e9;
}

html[data-theme="dark"] .awb-menu__sub-li,
html[data-theme="dark"] .awb-menu__sub-ul,
html[data-theme="dark"] .awb-menu__m-collapse,
html[data-theme="dark"] .fusion-header-wrapper,
html[data-theme="dark"] .fusion-mobile-menu-icons {
  background-color: #201f1b;
}

html[data-theme="dark"] .fusion-tb-header img[src*="Mancha-Builders-Site-Logo"] {
  filter: brightness(0) invert(1);
}

/* Ease the pale light-mode wash over photo cards so dark-mode photos keep
   their original color while the gold overlays remain visible. */
html[data-theme="dark"] .fusion-column-inner-bg-image {
  --awb-color7-a: 50%;
  --awb-color8-a: 30%;
}

html[data-theme="dark"] body.home .fusion-builder-row-3 .fusion-column-inner-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: rgba(23, 23, 23, 0.28);
  pointer-events: none;
}

.theme-toggle {
  position: fixed;
  z-index: 99999;
  left: max(20px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(190, 144, 53, .58);
  border-radius: 2px;
  background: #f8f4e9;
  color: #302d27;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .2);
  font: 600 12px/1.2 Arial, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.theme-toggle:hover { background: #e2d0b3; }
.theme-toggle:focus-visible { outline: 3px solid #be9035; outline-offset: 3px; }
.theme-toggle__icon { width: 17px; height: 17px; flex: none; }
.theme-toggle__icon--sun { display: none; }
html[data-theme="dark"] .theme-toggle {
  background: #25241f;
  border-color: #b9a579;
  color: #f4f0e9;
}
html[data-theme="dark"] .theme-toggle:hover { background: #37342c; }
html[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
html[data-theme="dark"] .theme-toggle__icon--sun { display: block; }

@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
}
