/* ==========================================================================
   webmaker.gr — Dark mode
   Loaded after the theme CSS. Every rule is scoped to html.dark-mode,
   so light mode is not affected at all.
   Palette: soft green-tinted greys instead of pure black.
   ========================================================================== */

html.dark-mode {
  --dm-bg: #151b18;          /* page background                     */
  --dm-bg-alt: #1b2320;      /* header, footer, hero, breadcrumb     */
  --dm-surface: #212b26;     /* cards, inputs, boxes                 */
  --dm-surface-2: #2a3530;   /* hover / nested surfaces              */
  --dm-border: #3d4a44;
  --dm-text: #eef2ef;        /* headings                             */
  --dm-text-2: #c8d1cc;      /* body text                            */
  --dm-muted: #9aa6a0;       /* hints, placeholders                  */
  --dm-link: #45c9ae;        /* links on dark                        */
  --dm-accent: #0e7c6b;      /* brand green (buttons, active items)  */
  --dm-tag-bg: rgba(69, 201, 174, 0.14);
  --dm-tag-text: #8fe3d2;

  /* theme variables that stay "light" in the original dark mode */
  --heading-color: var(--dm-text);
  --heading-color2: var(--dm-text);
  --heading-color3: var(--dm-text);
  --heading-color4: var(--dm-text);
  --heading-color5: var(--dm-text);
  --heading-color6: var(--dm-text);
  --body-color: var(--dm-text-2);
  --light-bg1: var(--dm-bg);
  --light-bg2: var(--dm-bg);
  --light-bg3: var(--dm-bg);
  --light-bg4: var(--dm-bg);
  --light-bg5: var(--dm-bg);
  --light-bg6: var(--dm-bg);
  --light-bg7: var(--dm-bg);
  --light-bg8: var(--dm-bg);
  --white-bg: var(--dm-surface);
  --dark-bg: var(--dm-bg-alt);
  --dark-bg2: var(--dm-surface);

  color-scheme: dark;
  background-color: var(--dm-bg);
}

html.dark-mode body {
  background-color: var(--dm-bg) !important;
  color: var(--dm-text-2);
}

/* --------------------------------------------------------------------------
   Section backgrounds: no pure black, no leftover light sections
   -------------------------------------------------------------------------- */
html.dark-mode .dark-bg,
html.dark-mode .site-header,
html.dark-mode .site-header.sticky-menu,
html.dark-mode .aximo-breadcrumb,
html.dark-mode .aximo-footer-section,
html.dark-mode .aximo-hero-section,
html.dark-mode .aximo-counter-wrap,
html.dark-mode .aximo-auto-slider-section,
html.dark-mode .aximo-auto-text-slider-section {
  background-color: var(--dm-bg-alt) !important;
}

html.dark-mode .section,
html.dark-mode .aximo-project-one-column,
html.dark-mode .wm-related-guides {
  background-color: transparent;
}

/* --------------------------------------------------------------------------
   Text
   -------------------------------------------------------------------------- */
html.dark-mode body :is(h1, h2, h3, h4, h5, h6) {
  color: var(--dm-text);
}

html.dark-mode body :is(p, li, label, td, th, dd, dt, blockquote, figcaption, small) {
  color: var(--dm-text-2);
}

html.dark-mode body p a:not([class]),
html.dark-mode .breadcrumbs a {
  color: var(--dm-link);
}

/* headings that are links keep heading colour */
html.dark-mode body :is(h1, h2, h3, h4, h5, h6) a,
html.dark-mode .wm-project-text h3 a,
html.dark-mode .aximo-blog-content a h3 {
  color: var(--dm-text);
}
html.dark-mode .wm-project-text h3 a:hover {
  color: var(--dm-link);
}

/* footer: menu links stay neutral, titles bright */
html.dark-mode body .aximo-footer-menu ul li a {
  color: var(--dm-text-2);
}
html.dark-mode body .aximo-footer-menu ul li a:hover {
  color: var(--dm-link);
}
html.dark-mode .aximo-footer-title p,
html.dark-mode body .aximo-info ul li a {
  color: var(--dm-text);
}
html.dark-mode .aximo-footer-note,
html.dark-mode .aximo-info ul li:first-child {
  color: var(--dm-muted);
}

/* section intro text that was dark grey on dark */
html.dark-mode .aximo-section-title p,
html.dark-mode .aximo-default-content p {
  color: var(--dm-text-2);
}

/* --------------------------------------------------------------------------
   Logo (only a dark version exists): invert lightness, keep the brand green
   -------------------------------------------------------------------------- */
html.dark-mode .site-logo,
html.dark-mode .aximo-footer-logo img {
  filter: invert(1) hue-rotate(180deg) brightness(1.08);
}

/* --------------------------------------------------------------------------
   Cards, boxes and other surfaces
   -------------------------------------------------------------------------- */
html.dark-mode :is(
  .aximo-iconbox-wrap,
  .aximo-accordion-item:not(.open),
  .aximo-pricing-wrap2,
  .aximo-pricing-description,
  .aximo-main-form,
  .aximo-contact-info-box,
  .wm-spec-item,
  .wm-showcase-card,
  .wm-industry-showcase,
  .wm-hero-visual-card,
  .wm-service-visual-card,
  .service-box
) {
  background-color: var(--dm-surface) !important;
  border-color: var(--dm-border) !important;
}

html.dark-mode :is(
  .aximo-faq-wrap,
  .aximo-story-thumb,
  .aximo-service-details-thumb,
  .aximo-service-details-thumb2,
  .aximo-contact-thumb,
  .aximo-video-wrap,
  .aximo-counter-data,
  .aximo-pricing-border,
  .aximo-project-thumb3,
  .aximo-hero-thumb,
  .aximo-project-thumb,
  .wm-showcase-img
) {
  border-color: var(--dm-border) !important;
}

html.dark-mode .aximo-blog-thumb,
html.dark-mode .aximo-service-details-thumb {
  background-color: var(--dm-surface);
}

/* the open accordion item stays brand green, with white text */
html.dark-mode .aximo-accordion-item.open {
  border-color: var(--dm-border) !important;
}
html.dark-mode .aximo-accordion-item.open :is(h3, p, a, span) {
  color: #ffffff;
}

/* contact info boxes (contact page) */
html.dark-mode .aximo-contact-info-box :is(h3, h4, p, span, li) {
  color: var(--dm-text);
}
html.dark-mode .aximo-contact-info-box a {
  color: var(--dm-link) !important;
}

/* project cards on the portfolio page */
html.dark-mode .wm-spec-title { color: var(--dm-text); }
html.dark-mode .wm-spec-val { color: var(--dm-text-2); }
html.dark-mode .wm-spec-speed { background-color: var(--dm-tag-bg) !important; border-color: var(--dm-accent) !important; }
html.dark-mode .wm-spec-speed .wm-spec-title,
html.dark-mode .wm-spec-speed .wm-spec-val,
html.dark-mode .wm-spec-item i { color: var(--dm-tag-text); }
html.dark-mode .wm-project-text p { color: var(--dm-text-2); }

/* tags / badges */
html.dark-mode .wm-tag,
html.dark-mode .wm-showcase-badge,
html.dark-mode .wm-filter-count {
  background-color: var(--dm-tag-bg);
  color: var(--dm-tag-text);
}
html.dark-mode .wm-showcase-badge.wm-showcase-speed {
  border-color: var(--dm-accent);
}
html.dark-mode .wm-badge-niche {
  border-color: var(--dm-border);
}
html.dark-mode .wm-showcase-info h4 { color: var(--dm-text); }
html.dark-mode .wm-showcase-info p { color: var(--dm-text-2); }
html.dark-mode .wm-showcase-link { color: var(--dm-link); }
html.dark-mode .wm-industry-showcase-title p { color: var(--dm-text-2); }

/* blog cards */
html.dark-mode .aximo-blog-meta li { color: var(--dm-muted); }
html.dark-mode .aximo-blog-btn { color: var(--dm-link); }
html.dark-mode .aximo-blog-btn svg path { stroke: var(--dm-link); }

/* service icons are black line art: lighten them on dark cards */
html.dark-mode .aximo-iconbox-icon img,
html.dark-mode .aximo-iconbox-wrap img[src$=".svg"],
html.dark-mode .aximo-accordion-normal-icon img {
  filter: invert(1) brightness(0.92);
}
html.dark-mode .aximo-iconbox-wrap a img[src*="arrow"],
html.dark-mode .aximo-iconbox-data a img {
  filter: invert(1);
}

/* --------------------------------------------------------------------------
   Buttons: never dark text on the green buttons
   -------------------------------------------------------------------------- */
html.dark-mode .aximo-call-btn,
html.dark-mode #aximo-submit-btn,
html.dark-mode #aximo-main-btn,
html.dark-mode .aximo-default-btn,
html.dark-mode .wm-btn-visit,
html.dark-mode .aximo-pricing-btn2.active {
  color: #ffffff !important;
}
html.dark-mode .aximo-call-btn i {
  background-color: var(--dm-bg-alt);
  color: var(--dm-text);
}
html.dark-mode #aximo-submit-btn,
html.dark-mode .aximo-default-btn.pill,
html.dark-mode .wm-btn-visit {
  border-color: var(--dm-border) !important;
}
html.dark-mode #aximo-main-btn:hover {
  color: #ffffff !important;
  background-color: #0b6658 !important;
}
html.dark-mode .aximo-pricing-btn2:not(.active) {
  color: var(--dm-text) !important;
  border-color: var(--dm-border) !important;
}

/* social icons in the footer */
html.dark-mode .aximo-social-icon ul li a {
  background-color: transparent;
  border-color: var(--dm-border);
}
html.dark-mode .aximo-social-icon ul li a i {
  color: var(--dm-text);
}
html.dark-mode .aximo-social-icon ul li a:hover {
  background-color: var(--dm-accent);
  border-color: var(--dm-accent);
}
html.dark-mode .aximo-social-icon ul li a:hover i {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
html.dark-mode :is(.aximo-main-field, .aximo-form-field) :is(input, textarea, select) {
  background-color: var(--dm-surface) !important;
  border-color: var(--dm-border) !important;
  color: var(--dm-text) !important;
}
html.dark-mode :is(.aximo-main-field, .aximo-form-field) :is(input, textarea):focus,
html.dark-mode :is(.aximo-main-field, .aximo-form-field) select:focus {
  border-color: var(--dm-link) !important;
  outline: none;
}
html.dark-mode :is(.aximo-main-field, .aximo-form-field) :is(input, textarea)::placeholder {
  color: var(--dm-muted) !important;
}
html.dark-mode :is(.aximo-main-field, .aximo-form-field) select.wm-is-empty,
html.dark-mode :is(.aximo-main-field, .aximo-form-field) select:invalid {
  color: var(--dm-muted) !important;
}
html.dark-mode :is(.aximo-main-field, .aximo-form-field) select option {
  background-color: var(--dm-surface);
  color: var(--dm-text);
}
html.dark-mode .aximo-main-field label,
html.dark-mode .aximo-gdpr-field label {
  color: var(--dm-text);
}
html.dark-mode .wm-form-note,
html.dark-mode .wm-opt {
  color: var(--dm-muted);
}

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */
html.dark-mode hr,
html.dark-mode .aximo-footer-menu-row,
html.dark-mode .aximo-footer-bottom {
  border-color: var(--dm-border) !important;
}
html.dark-mode .wm-back-to-top {
  border-color: var(--dm-border);
}
/* desktop dropdown menus: the base theme hardcodes black link text (#000)
   on a white panel, so both the panel and its text need overriding here */
html.dark-mode .site-header .sub-menu,
html.dark-mode .site-header .sub-menu.megamenu,
html.dark-mode .site-header .sub-menu:before {
  background-color: var(--dm-surface) !important;
  border-color: var(--dm-border) !important;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.75);
}
html.dark-mode .site-header .sub-menu--item,
html.dark-mode .site-header .sub-menu--item > a,
html.dark-mode .site-header .sub-menu .mega-drop-menu-item {
  color: var(--dm-text-2) !important;
}
html.dark-mode .site-header .sub-menu--item > a:hover,
html.dark-mode .site-header .sub-menu .mega-drop-menu-item:hover {
  color: var(--dm-link) !important;
}
html.dark-mode .site-header .sub-menu--item > a .menu-item-text::after {
  background-color: var(--dm-link);
}
html.dark-mode .site-header .sub-menu--item {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* wrappers that must stay transparent (only their cards are surfaces) */
html.dark-mode .aximo-service-wrap {
  background-color: transparent !important;
  border-color: var(--dm-border) !important;
}

/* contact page icons (dark SVG line icons) */
html.dark-mode .aximo-contact-info-box img {
  filter: invert(1) brightness(0.95);
}

/* inline dark text colours written in the HTML (style="color:#555" etc.) */
html.dark-mode body [style*="color: #555"], html.dark-mode body [style*="color:#555"],
html.dark-mode body [style*="color: #333"], html.dark-mode body [style*="color:#333"],
html.dark-mode body [style*="color: #666"], html.dark-mode body [style*="color:#666"],
html.dark-mode body [style*="color: #000"], html.dark-mode body [style*="color:#000"],
html.dark-mode body [style*="color: #1B211E"], html.dark-mode body [style*="color:#1B211E"] {
  color: var(--dm-text-2) !important;
}

/* text links inside cards (Bootstrap default blue otherwise) */
html.dark-mode .aximo-iconbox-data a:not(.aximo-icon),
html.dark-mode .aximo-default-content a:not([class]),
html.dark-mode .wm-project-text p a {
  color: var(--dm-link);
}
html.dark-mode .aximo-blog-content > a,
html.dark-mode .aximo-blog-thumb a {
  color: var(--dm-text);
}

/* highlighted words in headings (brand green is too dark on dark) */
html.dark-mode .aximo-title-animation {
  color: var(--dm-link);
}
