/* Loaded after main.min.css. Keep literal white for text over photographs. */
:root,
[data-bs-theme="light"] {
  color-scheme: light;
  --surface: #ffffff;
  --light: #f1f1f1;
  --bg-color: #f4f6f9;
  --body-color: #1d2a3d;
  --secondary: #181818;
  --grey: #60656d;
  --link-color: #914900;
  --control-border: #767676;
  --focus-color: #914900;
  --bs-body-color: var(--body-color);
  --bs-body-bg: var(--surface);
  --bs-link-color: var(--link-color);
  --bs-link-hover-color: var(--secondary);
}
[data-bs-theme="dark"] {
  color-scheme: dark;
  --surface: #171b22;
  --light: #222832;
  --bg-color: #222832;
  --body-color: #e1e6ed;
  --secondary: #f7f8fa;
  --grey: #b7c0cc;
  --link-color: #ffb65c;
  --control-border: #8996a8;
  --focus-color: #ffb65c;
  --bs-body-color: var(--body-color);
  --bs-body-bg: var(--surface);
  --bs-secondary-color: var(--grey);
  --bs-secondary-bg: var(--light);
  --bs-tertiary-bg: var(--light);
  --bs-emphasis-color: var(--secondary);
  --bs-border-color: var(--control-border);
  --bs-link-color: var(--link-color);
  --bs-link-hover-color: var(--secondary);
}
html, body { background-color: var(--surface); }
body { color: var(--body-color); }
a { color: var(--secondary); }
a:hover, :is(h1,h2,h3,h4,h5,h6) a:hover { color: var(--link-color); }
:is(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6) a { color: var(--secondary); }
.heading .subheading, .work-card-content h3, .works-carousel-btn { color: var(--secondary); }
.menu, .menu-btn-box, .contact-sidebar-box, .work-card, .work-card-content,
.technologies .technology-description,
.featured-content .feature-box, .cases-content-slider .case-single .case-single-desc,
.banner-modal .popup-banner--text-only { background-color: var(--surface); }
.menu .menu-main :is(.active > a, a:hover),
.blog-filter-btn:is(:hover,:focus,.active), .entry-content a,
.sidebar-area .single-sidebar-box :is(a:hover,.current_page_item > a,.current_page_ancestor > a,.current_page_parent > a),
.contact-page .contact-form-section .gform_wrapper.gravity-theme a,
.error-404-section .error-code { color: var(--link-color); }
.entry-content .entry-meta a { color: #fff; }
.entry-content .entry-meta a:hover { color: var(--primary); }
.menu .menu-footer .menu-copyright, .blog-empty { color: var(--grey); }
.featured-content .feature-box p, .intro p,
.contact-page .contact-form-section :is(h2,p,.gfield_label,.gform_description,.gfield_description),
.contact-info p { color: var(--body-color); }
.contact-info li, .contact-page .contact-form-section .gform_wrapper.gravity-theme .gform_description { color: var(--body-color); }
.technologies .technology-description a { color: var(--link-color); }
.intro .intro-heading p { color: var(--body-color); }
.about-content .btn:hover { color: #181818; }
.btn-white { background: #fff; color: #181818; }
.contact-page .contact-form-section :is(input,textarea)::placeholder { color: var(--grey) !important; opacity: 1; }
.contact-page .contact-form-section :is(.gform_wrapper,.gform-theme--framework) {
  --gf-ctrl-bg-color: var(--surface);
  --gf-ctrl-color: var(--body-color);
  --gf-ctrl-border-color: var(--control-border);
  --gf-ctrl-placeholder-color: var(--grey);
}
.contact-page .contact-form-section .gform_wrapper.gravity-theme :is(input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),textarea,select) {
  background-color: var(--surface) !important;
  border-color: var(--control-border) !important;
}
.search-results-section .search-form .form-control,
.form-control { background-color: var(--surface); color: var(--body-color); border-color: var(--control-border); }
.btn-main, .gform_button,
.contact-page .contact-form-section .gform_wrapper.gravity-theme .gform_button,
.blog .blog-item .blog-img .post-featured-badge,
.banner-modal .popup-banner--text-only .popup-banner__content .btn,
.btn-white.hover, .btn-white-top:hover, .btn-top:hover { color: #181818; }
.btn-main:hover, .gform_button:hover { color: var(--secondary); background: var(--surface); border-color: var(--control-border); }
.contact-page .contact-form-section .gform_wrapper.gravity-theme .gform_button:hover { color: var(--surface); }
.cta-content h3 { color: #181818; }
.video-icon span:hover { color: #181818; }
.top-btn img, .more-btn .more-btn-icon { filter: brightness(0); }
.header-menu-right .menu-btn-box:hover .nav-toggle .stick { background: #181818; }
.banner-modal .popup-banner--text-only .popup-banner__content :is(h2,h3) { color: var(--secondary); }
.works-carousel-btn { border-color: var(--control-border); }
.works-carousel-btn:is(:hover,:focus) { color: var(--link-color); border-color: var(--link-color); }

/* The icon shows the mode that the next click will activate. */
.site-navigation > .container { position: relative; display: flex; align-items: flex-start; gap: 10px; }
/* Bootstrap's clearfix pseudo-element must not become an extra flex item. */
.site-navigation > .container.clearfix::after { display: none; }
.header-menu-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.theme-toggle {
  min-height: 56px;
  min-width: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
}
.theme-toggle [data-theme-icon] { display: none; }
.theme-toggle[data-theme-next="dark"] [data-theme-icon="dark"],
.theme-toggle[data-theme-next="light"] [data-theme-icon="light"] { display: block; }
.theme-toggle:hover { color: var(--link-color); }
.theme-toggle [data-theme-icon="dark"] { color: #fff; }
.header-menu-right .nav-toggle-btn { min-width: 44px; min-height: 44px; }
.header-menu-right .menu-btn-box { padding-top: 6px; }
@media (min-width: 576px) { .header-menu-right .menu-btn-box { padding-top: 10px; } }
body :is(a,button,input,textarea,select,[tabindex]):focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
}
[data-bs-theme="dark"] .header-menu-right .nav-toggle-btn .nav-toggle .stick { background: var(--secondary); }
[data-bs-theme="dark"] .menu .sidebar-close img { filter: brightness(0) invert(1); }
[data-bs-theme="dark"] .about-block .about-item img {
  filter: brightness(0) invert(1);
}
[data-bs-theme="dark"] .theme-toggle,
[data-bs-theme="dark"] .theme-toggle:hover { color: #fff; }
/* Keep filled action buttons white, including component-specific hover states. */
[data-bs-theme="dark"] :is(.btn, .gform_button, .top-btn, .more-btn, input[type="submit"], button[type="submit"]) {
  background: #fff !important;
  border-color: #fff !important;
  color: #181818 !important;
}
[data-bs-theme="dark"] :is(.top-btn img, .more-btn .more-btn-icon) { filter: brightness(0); }
/* Keep the original white header logo and black footer logo legible. */
[data-bs-theme="dark"] .navbar-brand { background: var(--surface); border-radius: 5px; padding: 6px; }
[data-bs-theme="dark"] .footer-logo { background: #fff; border-radius: 5px; padding: 6px; width: fit-content; }
@media (min-width: 576px) {
  .theme-toggle { min-height: 64px; min-width: 64px; }
}
@media (max-width: 767.98px) {
  .header-menu-right { flex-direction: column; align-items: flex-end; gap: 8px; }
  .header-menu-right .menu-btn-box { order: 0; }
  .theme-toggle { order: 1; width: 64px; min-width: 64px; min-height: 44px; padding: 6px; }
}
@media (max-width: 575.98px) {
  .theme-toggle { width: 56px; min-width: 56px; }
  .site-navigation .navbar-brand { flex-shrink: 1; min-width: 0; margin-right: 0; }
  .site-navigation .navbar-brand .img-fluid { width: 100%; max-width: 150px; }
}
