/**
 * Dark theme (default). Architecture: light stays the untouched base theme
 * (every existing module-css file is unchanged), and dark is an additive
 * override layer loaded last, scoped entirely under [data-theme="dark"].
 * That keeps this retrofit low-risk against a large legacy template (40+
 * page types) instead of rewriting each component's colors in place.
 *
 * <html data-theme="dark|light"> is set by an inline blocking script at the
 * very top of partials/head.php (before any CSS loads, to avoid a flash of
 * the wrong theme) and by assets/js/theme-toggle.js on click, persisted to
 * localStorage. Dark is the default whenever nothing is stored yet.
 *
 * Palette: a near-black base with a deliberate, very subtle green undertone
 * (not a neutral/boring gray-black) tying it to the brand's --theme-color,
 * plus two lighter "surface" steps for card/panel elevation -- a flat single
 * background isn't how real dark UIs read as intentional.
 */

:root[data-theme="dark"]{
  --title-color: #EFF3EC;
  --text-color: #A7AFA3;
  --dt-bg: #0c0e0c;
  --dt-bg-alt: #10130f;
  --dt-surface: #151815;
  --dt-surface-2: #1c211c;
  --dt-border: rgba(255, 255, 255, 0.08);
  --dt-border-strong: rgba(255, 255, 255, 0.16);
}

/** base **/

[data-theme="dark"] body{
  background: var(--dt-bg);
}

/**
 * Very subtle section-to-section banding so a long page of stacked sections
 * (most of them otherwise flat --dt-bg, with no image/pattern of their own)
 * doesn't read as one undifferentiated black slab while scrolling. Every
 * other section alternates to --dt-bg-alt -- a couple of RGB points lighter,
 * deliberately barely perceptible. No !important: any section that already
 * has a more specific background rule below (all of which DO use !important)
 * or its own background-image continues to win over this.
 */
[data-theme="dark"] .boxed_wrapper section:nth-of-type(even){
  background-color: var(--dt-bg-alt);
}

[data-theme="dark"] hr{
  border-color: var(--dt-border);
}

/** logo: header, footer and search popup carry both lockups --
    .logo-light (logo.png, dark line-art) and .logo-dark
    (geek-staffing-logo-transparent-dark.png, light wordmark) -- and show
    whichever matches the theme. Any other logo image still gets inverted. **/

.logo-dark{
  display: none !important;
}

[data-theme="dark"] .logo-light{
  display: none !important;
}

[data-theme="dark"] .logo-dark{
  display: inline-block !important;
  height: 46px;
  width: auto;
  max-width: none;
}

[data-theme="dark"] img[src*="logo"]:not(.logo-dark):not([src*="logo-transparent-dark"]){
  filter: invert(1) brightness(1.2);
}

/** service-details tabs (cert pages): the caption panel under the tab image
    is a light #E8EBE0 card, but the dark theme turns headings light -- giving
    near-white text on near-white. Give it a dark surface with light text. **/

[data-theme="dark"] .service-details-content .tabs-box .inner-box .content-box{
  background: var(--dt-surface-2) !important;
  border-top: 1px solid var(--dt-border-strong);
}

[data-theme="dark"] .service-details-content .tabs-box .inner-box .content-box h6{
  color: #fff !important;
}

[data-theme="dark"] .service-details-content .tabs-box .inner-box .content-box p{
  color: rgba(255, 255, 255, 0.78) !important;
}

/** theme-btn: color is `var(--title-color) !important` sitewide, which this
    file just made light -- fine for dark surfaces, but wrong for btn-one
    (bright green background) and btn-two (already-dark background), both of
    which need to stay dark-on-light / light-on-dark regardless of theme. **/

[data-theme="dark"] .theme-btn{
  color: #10140f !important;
}

[data-theme="dark"] .theme-btn:hover{
  color: #fff !important;
}

[data-theme="dark"] .theme-btn.btn-two{
  color: #fff !important;
}

/**
 * Generic "surface" catch-all. The template reuses a small set of suffix
 * class names for card/box/panel components across dozens of otherwise
 * unrelated files (chooseus, category, testimonial, pricing, service,
 * job, blog-sidebar, contact, subscribe, role-picker, etc.) -- targeting
 * those suffixes directly gets broad coverage without hand-editing every
 * module-css file individually.
 */
[data-theme="dark"] .inner-box,
[data-theme="dark"] .pricing-table,
[data-theme="dark"] .single-item,
[data-theme="dark"] .form-inner,
[data-theme="dark"] .inner-container,
[data-theme="dark"] .download-widget,
[data-theme="dark"] .category-widget,
[data-theme="dark"] .sidebar-widget,
[data-theme="dark"] .accordion,
[data-theme="dark"] .support-box,
[data-theme="dark"] .chat-content .single-item,
[data-theme="dark"] .verified-content .lower-content,
[data-theme="dark"] .role-picker-chip,
[data-theme="dark"] .role-picker-result,
[data-theme="dark"] .blog-block-one .inner-box,
[data-theme="dark"] .sortable-masonry .filter-tabs{
  background-color: var(--dt-surface) !important;
  border-color: var(--dt-border) !important;
}

/** a second, slightly lighter elevation step for the light theme's named
    "alt section" background (#eff2e6), used across many otherwise-unrelated
    files as a section-level accent panel. **/
[data-theme="dark"] .testimonial-style-three .inner-container,
[data-theme="dark"] .chooseus-section.alternat-2,
[data-theme="dark"] .chooseus-style-three,
[data-theme="dark"] .category-section.home-3,
[data-theme="dark"] .download-section .inner-container,
[data-theme="dark"] .download-section.alternat-2,
[data-theme="dark"] .subscribe-style-two .bg-color,
[data-theme="dark"] .training-section,
[data-theme="dark"] .featured-section,
[data-theme="dark"] .process-style-two .outer-container,
[data-theme="dark"] .header-style-two,
[data-theme="dark"] .main-footer.home-2,
[data-theme="dark"] .profile-section,
[data-theme="dark"] .dueal-section,
[data-theme="dark"] .dueal-section .outer-container,
[data-theme="dark"] .about-style-five .video_block_two .video-box .video-content,
[data-theme="dark"] .role-picker-box{
  background-color: var(--dt-surface-2) !important;
}

[data-theme="dark"] .support-box,
[data-theme="dark"] .image_block_two .image-inner .support-box,
[data-theme="dark"] .image_block_one .image-box .single-item .support-box,
[data-theme="dark"] .welcome-section .content-box .inner-box .single-item .icon-box{
  background-color: var(--dt-surface-2) !important;
}

/** category-widget list links set their own explicit white background
    (service-details.css), which sits on top of and hides the dark surface
    applied to the parent .category-widget above -- override the links
    themselves so non-current/non-hover items stay readable. **/
[data-theme="dark"] .service-sidebar .category-widget .category-list li a{
  background: var(--dt-surface);
  color: var(--title-color);
  border-bottom-color: var(--dt-border);
}

/** service-block-one cert cards (find-a-job hub) are a white card by design
    regardless of theme -- only the title needs to stay dark-on-white here,
    since it otherwise inherits the sitewide light --title-color. **/
[data-theme="dark"] .service-block-one .inner-box .lower-content h3 a{
  color: #111111;
}

/** header **/

[data-theme="dark"] .header-style-one .outer-box{
  background: var(--dt-surface);
}

[data-theme="dark"] .header-style-one .header-lower .outer-box:before{
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .sticky-header{
  background: var(--dt-surface) !important;
}

[data-theme="dark"] .search-popup .popup-inner{
  background: var(--dt-surface) !important;
}

[data-theme="dark"] .search-popup .search-form fieldset input[type="search"]{
  background: var(--dt-surface) !important;
  color: var(--title-color);
  border-color: var(--dt-border-strong);
}

[data-theme="dark"] .language-picker__dropdown{
  background: var(--dt-surface) !important;
  border-color: var(--dt-border);
}

[data-theme="dark"] .language-picker__list li a{
  color: var(--text-color);
}

/** footer **/

[data-theme="dark"] .main-footer{
  background: var(--dt-surface) !important;
}

[data-theme="dark"] .main-footer .widget-section{
  border-color: var(--dt-border);
}

[data-theme="dark"] .main-footer .social-links li a{
  background: var(--dt-surface-2) !important;
  color: var(--title-color);
}

/** forms/inputs: background is transparent by default sitewide (so the
    surface rules above already carry through), just fix borders + caret. **/

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select{
  color: var(--title-color);
  border-color: var(--dt-border-strong) !important;
  caret-color: var(--theme-color);
}

[data-theme="dark"] ::placeholder{
  color: var(--text-color);
  opacity: 0.7;
}

/** mobile-menu, sidebar search-toggler popup, and the shared mega-nav panel
    are already near-black by design/independent of this theme -- no change
    needed there. Preloader and page-direction overlays are transient/brief
    enough to leave as-is. **/

[data-theme="dark"] .boxed_wrapper{
  background: var(--dt-bg);
}

/** subtle scrollbar + selection polish, optional but cheap **/

[data-theme="dark"] ::selection{
  background: var(--theme-color);
  color: #10140f;
}

/**
 * Theme toggle switch (footer). Unlike the rest of this file, this component
 * needs base styling too -- it has to look right in light mode as well as
 * dark, since it's the control that switches between them. Visual state
 * (thumb position, which icon is emphasized) is keyed purely off the
 * [data-theme] attribute on <html>; assets/js/theme-toggle.js only ever
 * flips that attribute and mirrors it into aria-checked, it doesn't touch
 * any styling directly.
 */
.theme-toggle{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0px;
  cursor: pointer;
  font-family: var(--text-font);
}

.theme-toggle__icon{
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: color 300ms ease;
}

.theme-toggle__track{
  position: relative;
  display: block;
  width: 38px;
  height: 21px;
  background: rgba(120, 235, 84, 0.15);
  border: 1px solid var(--theme-color);
  border-radius: 30px;
  transition: background-color 300ms ease;
}

.theme-toggle__thumb{
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--theme-color);
  transition: transform 300ms ease;
}

[data-theme="dark"] .theme-toggle__thumb{
  transform: translateX(17px);
}

[data-theme="dark"] .theme-toggle__icon--sun{
  color: var(--text-color);
}

[data-theme="dark"] .theme-toggle__icon--moon{
  color: var(--theme-color);
}

[data-theme="light"] .theme-toggle__icon--sun{
  color: var(--theme-color-2);
}

[data-theme="light"] .theme-toggle__icon--moon{
  color: var(--text-color);
}

/**
 * Direction (LTR/RTL) toggle -- footer, next to the theme toggle. Reuses
 * .theme-toggle's track/thumb/icon structure and styling wholesale (same
 * classes) so it matches it automatically; only the few rules below are
 * specific to this toggle. Unlike the theme toggle, state is read directly
 * off the button's own aria-checked (set by assets/js/direction-toggle.js)
 * rather than a shared [data-theme] attribute, since direction has no
 * existing sitewide attribute to key off.
 */
.direction-toggle[aria-checked="true"] .theme-toggle__thumb{
  transform: translateX(17px);
}

.direction-toggle__icon--ltr,
.direction-toggle__icon--rtl{
  color: var(--text-color);
}

.direction-toggle:not([aria-checked="true"]) .direction-toggle__icon--ltr{
  color: var(--theme-color);
}

.direction-toggle[aria-checked="true"] .direction-toggle__icon--rtl{
  color: var(--theme-color);
}

.footer-toggles{
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.footer-bottom .bottom-inner{
  gap: 20px;
  flex-wrap: wrap;
}

@media only screen and (max-width: 767px){
  .footer-bottom .bottom-inner{
    justify-content: center;
  }
}
