/* ========================================================================= *
 *  Dashwall Dark Mode — CYBER STEM EDITION
 * ========================================================================= */

body:where(.dark),
body:where(.dark) .page-header,
body:where(.dark) .canvas-top,
body:where(.dark) .canvas-bottom {
  background: #070b14 !important;
}

body:where(.dark) .page-header {
  background: rgba(7, 11, 20, 0.92) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.16);
}

body:where(.dark) .site-title a { color: #f8fafc; }
body:where(.dark) .site-title a:hover { color: #22d3ee; }
body:where(.dark) .site-description { color: #94a3b8; }

body:where(.dark) a { color: #f1f5f9; }
body:where(.dark) a:hover { color: #22d3ee; }

body:where(.dark) .canvas-inner {
  background:
    radial-gradient(ellipse at top left, rgba(6, 182, 212, 0.12), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(168, 85, 247, 0.10), transparent 55%),
    #0a0f1c !important;
  border: 1px solid rgba(56, 189, 248, 0.18);
}

/* Картки, віджети та футер */
body:where(.dark) .page-card,
body:where(.dark) .widget,
body:where(.dark) .pagination ul li a,
body:where(.dark) #footer {
  background: linear-gradient(150deg, rgba(21, 31, 50, 0.94), rgba(13, 19, 34, 0.98)) !important;
  border: 1px solid rgba(56, 189, 248, 0.16);
  box-shadow: 0 14px 34px -8px rgba(0, 0, 0, 0.65), 0 0 22px rgba(6, 182, 212, 0.06);
  color: #cbd5e1;
}

body:where(.dark) .page-card-featured { border-top: 3px solid #06b6d4; }
body:where(.dark) .page-card-latest { border-top: 3px solid #06b6d4; }

body:where(.dark) .blog-card { border-top: 3px solid #06b6d4; }
body:where(.dark) .blog-card:nth-child(2n) { border-top-color: #a855f7; }
body:where(.dark) .blog-card:nth-child(3n) { border-top-color: #10b981; }
body:where(.dark) .blog-card:nth-child(4n) { border-top-color: #f59e0b; }
body:where(.dark) .blog-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 18px 40px -6px rgba(6, 182, 212, 0.22);
}

body:where(.dark) .widget { border-top: 3px solid #06b6d4; }
body:where(.dark) .widget:nth-of-type(2) { border-top-color: #a855f7; }
body:where(.dark) .widget:nth-of-type(3) { border-top-color: #10b981; }
body:where(.dark) .widget:nth-of-type(4) { border-top-color: #f59e0b; }
body:where(.dark) .widget:nth-of-type(5) { border-top-color: #ec4899; }

body:where(.dark) .page-card:after,
body:where(.dark) .widget:after {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.35), rgba(168, 85, 247, 0.35));
}

/* Виправлений блок "Виділення" (Highlights) + навігація поста */
body:where(.dark) .page-card-highlights,
body:where(.dark) .page-card-post-nav {
  background: linear-gradient(150deg, rgba(30, 27, 75, 0.55), rgba(13, 19, 34, 0.98)) !important;
  border-top: 3px solid #facc15;
}
body:where(.dark) .page-card-highlights .stickywrap-heading { color: #fde047; }
body:where(.dark) .highlights-card {
  background: rgba(7, 11, 20, 0.55);
  color: #94a3b8;
  border: 1px solid rgba(250, 204, 21, 0.18);
}
body:where(.dark) .highlights-card:hover {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.5);
  color: #fff;
}
body:where(.dark) .highlights-card-title { color: #f8fafc; }
body:where(.dark) .highlights-card-date { color: #facc15; }
body:where(.dark) .highlights-card-thumb { background: #0f172a; }

/* Блок "Останні коментарі" */
body:where(.dark) .page-card-comments {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.9), rgba(8, 145, 178, 0.9) 55%, rgba(99, 102, 241, 0.92)) !important;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

/* Лівий сайдбар і соцмережі */
body:where(.dark) .page-sidebar { box-shadow: inset -1px 0 0 rgba(56, 189, 248, 0.16); }
body:where(.dark) .page-sidebar .social-links .social-tooltip,
body:where(.dark) .sharrre-header .sharrre .box {
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}
body:where(.dark) .page-sidebar .social-links .social-tooltip:hover {
  color: #22d3ee;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
}
body:where(.dark) .page-sidebar .social-links .social-tooltip:hover:after { background: #0f172a; color: #fff; border: 1px solid rgba(56, 189, 248, 0.4); }
body:where(.dark) .page-sidebar .social-links .social-tooltip:hover:before { border-color: transparent #0f172a; }

/* Заголовки та мініатюри */
body:where(.dark) .stickywrap .stickywrap-heading,
body:where(.dark) .widget > h3,
body:where(.dark) .widget .wp-block-heading { color: #f8fafc; }

body:where(.dark) .blog-card-thumb,
body:where(.dark) .featured-card-thumb,
body:where(.dark) .header-single-thumb { background-color: #0f172a; }

body:where(.dark) .header-single:before { background: #0f172a; }

@media only screen and (max-width: 1340px) {
  body:where(.dark) .header-single-title { color: #f8fafc; text-shadow: none; }
  body:where(.dark) .header-single-category a,
  body:where(.dark) .header-single-content,
  body:where(.dark) .header-single-meta a { color: #cbd5e1; }
}

body:where(.dark) .blog-card-thumb i { color: #38bdf8; }

body:where(.dark) .comments-bubble i { color: #06b6d4; }
body:where(.dark) .comments-bubble span { color: #020617; }

/* Пошук та форми */
body:where(.dark) .themeform.searchform div input:not([type="submit"]):not([type="checkbox"]) {
  background: #070b14;
  color: #f1f5f9;
  outline: 1px solid rgba(56, 189, 248, 0.28);
}
body:where(.dark) .themeform.searchform div:after { color: #22d3ee; }
body:where(.dark) .themeform.searchform div textarea:focus,
body:where(.dark) .themeform.searchform div input:not([type="submit"]):focus {
  outline: 1px solid #22d3ee;
  color: #ffffff;
}

body:where(.dark) .themeform input[type="submit"],
body:where(.dark) .widget_search input[type="submit"],
body:where(.dark) .wp-block-search__button {
  background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%);
  color: #ffffff;
  border: 0;
}

body:where(.dark) .themeform input:not([type="submit"]):not([type="checkbox"]),
body:where(.dark) .themeform textarea,
body:where(.dark) .widget_search input[type="text"],
body:where(.dark) .wp-block-search__input,
body:where(.dark) .widget select {
  background: #070b14;
  color: #f1f5f9;
  box-shadow: none;
  border: 1px solid rgba(56, 189, 248, 0.28);
  outline: none;
}
body:where(.dark) .themeform textarea:focus,
body:where(.dark) .themeform input:not([type="submit"]):focus,
body:where(.dark) .widget_search input[type="text"]:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.22);
  color: #ffffff;
}

/* Навігація всередині статті */
body:where(.dark) .page-card-post-nav .stickywrap-heading { color: #f8fafc; }
body:where(.dark) .post-nav li a { background: rgba(7, 11, 20, 0.65); color: #f8fafc; border: 1px solid rgba(168, 85, 247, 0.3); }
body:where(.dark) .post-nav li a:hover { background: rgba(168, 85, 247, 0.2); }
body:where(.dark) .post-nav li a strong { color: #67e8f9; }

/* Контент запису */
body:where(.dark) .entry { color: #cbd5e1; }
body:where(.dark) .entry a { color: #38bdf8; }
body:where(.dark) .blog-card-excerpt { color: #94a3b8; }
body:where(.dark) .blog-card-category a {
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: #67e8f9;
}
body:where(.dark) .blog-card-date { color: #38bdf8; }

body:where(.dark) .author-bio { background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(56, 189, 248, 0.25); box-shadow: none; }
body:where(.dark) .author-bio .bio-avatar:after { background: linear-gradient(135deg, #06b6d4, #a855f7); color: #fff; }
body:where(.dark) .author-bio .bio-name { color: #fff; }

body:where(.dark) .post-tags a { background: rgba(6, 182, 212, 0.14); border: 1px solid rgba(34, 211, 238, 0.3); color: #67e8f9; box-shadow: none; }
body:where(.dark) .post-tags a:hover { background: #06b6d4; color: #020617; }

body:where(.dark) .wp-pagenavi a,
body:where(.dark) .wp-pagenavi span { color: #94a3b8; }
body:where(.dark) .wp-pagenavi a { background: #0f172a; border: 1px solid rgba(56, 189, 248, 0.25); color: #fff; }
body:where(.dark) .wp-pagenavi a:hover,
body:where(.dark) .wp-pagenavi a:active,
body:where(.dark) .wp-pagenavi span.current { background: linear-gradient(90deg, #06b6d4, #3b82f6); color: #fff; }

body:where(.dark) .entry .wp-caption { background: rgba(255,255,255,0.06); }
body:where(.dark) .entry hr { background: rgba(56, 189, 248, 0.25); }
body:where(.dark) .entry dt { color: #fff; }
body:where(.dark) .entry pre { border: 1px solid rgba(56, 189, 248, 0.25); background: #050811; }
body:where(.dark) .entry code { background: rgba(56, 189, 248, 0.14); color: #67e8f9; }
body:where(.dark) .entry ins { background: rgba(56, 189, 248, 0.18); }
body:where(.dark) .entry table td { border-color: rgba(255,255,255,0.1); }
body:where(.dark) .entry .wp-block-button a { background: linear-gradient(90deg, #06b6d4, #3b82f6); color: #fff; }
body:where(.dark) .entry .wp-block-calendar caption { background: rgba(6, 182, 212, 0.15); color: #fff; }
body:where(.dark) .entry .wp-block-calendar th { background: rgba(6, 182, 212, 0.22); color: #fff; }
body:where(.dark) .entry .wp-block-calendar td { color: rgba(255,255,255,0.6); }

body:where(.dark.invert-dark-logo) .site-title a img,
body:where(.dark.invert-dark-logo) .site-title a svg,
body:where(.dark.invert-dark-logo) #footer-logo { filter: invert(1); }

/* Коментарі */
body:where(.dark) .commentlist .fn { color: #fff; }
body:where(.dark) .commentlist .comment-metadata:before { color: #22d3ee; }
body:where(.dark) .commentlist .comment-metadata a { color: #94a3b8; }
body:where(.dark) .comment-awaiting-moderation { color: #fde047; }
body:where(.dark) .commentlist li.bypostauthor > .comment-body:after,
body:where(.dark) .commentlist li.comment-author-admin > .comment-body:after { background: #06b6d4; color: #020617; }

body:where(.dark) h1, body:where(.dark) h2, body:where(.dark) h3,
body:where(.dark) h4, body:where(.dark) h5, body:where(.dark) h6 { color: #f8fafc; }

body:where(.dark) .social-links li a:hover { color: #22d3ee; }
body:where(.dark) .social-links .social-tooltip:hover:after { background: #0f172a; color: #fff; }
body:where(.dark) .social-links .social-tooltip:hover:before { border-color: #0f172a transparent; }

/* Віджети */
body:where(.dark) .widget > h3,
body:where(.dark) .widget > h3 a,
body:where(.dark) .widget > h3 a:hover,
body:where(.dark) .widget .wp-block-heading,
body:where(.dark) .widget .wp-block-heading a,
body:where(.dark) .widget .wp-block-heading a:hover { color: #f8fafc; }

body:where(.dark) .widget > ul li:before,
body:where(.dark) .widget > ul li a:before,
body:where(.dark) .widget > div > ul li a:before,
body:where(.dark) .widget_calendar caption:before { background: rgba(6, 182, 212, 0.16); color: #22d3ee; }
body:where(.dark) .widget > ul li a:hover:before { background: #06b6d4; color: #020617; }

body:where(.dark) .widget_recent_entries > ul > li a:before { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
body:where(.dark) .widget_recent_comments > ul > li:before { background: rgba(16, 185, 129, 0.2); color: #34d399; }

body:where(.dark) .widget_archive ul li,
body:where(.dark) .widget_categories ul li,
body:where(.dark) .widget_links ul li { color: #64748b; }
body:where(.dark) .widget_recent_comments ul li,
body:where(.dark) .widget_recent_entries ul li { color: #94a3b8; }
body:where(.dark) .widget_rss ul li a { color: #f8fafc; }
body:where(.dark) .widget_rss ul li span.rss-date { color: #94a3b8; }
body:where(.dark) .widget_rss ul li cite { color: #64748b; }
body:where(.dark) .widget_calendar a { color: #22d3ee; }
body:where(.dark) .widget_calendar a:hover { color: #fff!important; }
body:where(.dark) .widget_calendar caption { background: rgba(6, 182, 212, 0.16); color: #fff; }
body:where(.dark) .widget_calendar caption:before { color: #22d3ee; }
body:where(.dark) .widget_calendar thead { background: rgba(255,255,255,0.06); }
body:where(.dark) .widget_calendar th,
body:where(.dark) .widget_calendar td { border: 1px solid rgba(56, 189, 248, 0.16); }

body:where(.dark) .alx-tabs-nav { background: #070b14; box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2); }
body:where(.dark) .alx-tabs-nav li a { color: #94a3b8; }
body:where(.dark) .alx-tabs-nav li a:hover { color: #fff; }

/* Меню в темній темі */
body:where(.dark) .menu-toggle-icon span { background: #fff; }
body:where(.dark) .nav-menu.mobile button:focus,
body:where(.dark) .menu-toggle:focus { background: rgba(255,255,255,0.06); }
body:where(.dark) .nav-menu a { color: #f8fafc; }
body:where(.dark) .nav-menu .svg-icon { fill: #f8fafc; }
body:where(.dark) .nav-menu:not(.mobile) .menu ul { background: #0f172a; color: #fff; border: 1px solid rgba(56, 189, 248, 0.3); }
body:where(.dark) .nav-menu:not(.mobile) .menu ul:after { border-bottom-color: #0f172a; }
body:where(.dark) .nav-menu:not(.mobile) .menu ul ul:after { border-right-color: #0f172a; }
body:where(.dark) .nav-menu-dropdown-left .nav-menu:not(.mobile) .menu ul ul:after { border-left-color: #0f172a; border-bottom-color: transparent; }

body:where(.dark) .nav-menu:not(.mobile) a { color: #94a3b8; }
body:where(.dark) .nav-menu:not(.mobile) a:hover { color: #22d3ee; }
body:where(.dark) .nav-menu:not(.mobile) ul ul a:hover { color: #22d3ee; }
body:where(.dark) .nav-menu:not(.mobile) ul ul > li:hover > span { background: rgba(6, 182, 212, 0.14); }
body:where(.dark) .nav-menu:not(.mobile) ul ul a { color: #e2e8f0; }
body:where(.dark) .nav-menu:not(.mobile) ul ul span { border-bottom: 1px solid rgba(255,255,255,0.08); }
body:where(.dark) .nav-menu:not(.mobile) button { color: #94a3b8; }
body:where(.dark) .nav-menu:not(.mobile) button.active { background: rgba(6, 182, 212, 0.18); color: #22d3ee; }
body:where(.dark) .nav-menu:not(.mobile) button .svg-icon { fill: rgba(255,255,255,0.4); }
body:where(.dark) .nav-menu:not(.mobile) ul ul button { color: #cbd5e1; }
body:where(.dark) .nav-menu:not(.mobile) ul ul button.active { background: #1e293b; color: #22d3ee; }
body:where(.dark) .nav-menu:not(.mobile) ul ul button .svg-icon { fill: rgba(255,255,255,0.6); }

body:where(.dark) .nav-menu:not(.mobile) li.current_page_item > span > a,
body:where(.dark) .nav-menu:not(.mobile) li.current-menu-item > span > a,
body:where(.dark) .nav-menu:not(.mobile) li.current-menu-ancestor > span > a,
body:where(.dark) .nav-menu:not(.mobile) li.current-post-parent > span > a { color: #22d3ee; }
body:where(.dark) .nav-menu:not(.mobile) ul ul li.current_page_item > span > a,
body:where(.dark) .nav-menu:not(.mobile) ul ul li.current-menu-item > span > a,
body:where(.dark) .nav-menu:not(.mobile) ul ul li.current-menu-ancestor > span > a,
body:where(.dark) .nav-menu:not(.mobile) ul ul li.current-post-parent > span > a { color: #38bdf8; }

body:where(.dark) .nav-menu.mobile { border-bottom-color: rgba(56, 189, 248, 0.16); }
body:where(.dark) .nav-menu.mobile button.active .svg-icon { fill: #22d3ee; }
body:where(.dark) .nav-menu.mobile ul ul { background: rgba(255,255,255,0.03); }
body:where(.dark) .nav-menu.mobile ul li .menu-item-wrapper,
body:where(.dark) .nav-menu.mobile ul ul li .menu-item-wrapper { border-bottom: 1px solid rgba(255,255,255,0.07); }
body:where(.dark) .nav-menu.mobile ul li a { color: #fff; }
body:where(.dark) .nav-menu.mobile ul button,
body:where(.dark) .nav-menu.mobile ul ul button { border-left: 1px solid rgba(255,255,255,0.07); }
body:where(.dark) .nav-menu.mobile > div > ul { border-top: 1px solid rgba(255,255,255,0.07); }
body:where(.dark) .nav-menu.mobile > .menu-toggle { box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25); }

@media only screen and (max-width: 719px) {
  body:where(.dark) .page-sidebar { border-bottom: 1px solid rgba(56, 189, 248, 0.16); }
}