/* Dark Theme Styles - Simplified (Dark Only) */

/* Base dark theme styles */
body {
  background-color: #181d27 !important;
  color: #c5d5df !important;
}

/* Main content background */
.main_content_container {
  background-color: #181d27 !important;
}

.div-block-16 {
  background-color: #181d27 !important;
}

/* Sidebar links background */
.sidebar_links {
  background-color: #1e2532 !important;
}

/* All header text white - OVERRIDE body color inheritance */
h1,
h2,
h3,
h4,
h5,
h6,
.heading,
.heading-9,
.hero-title,
.hero-subtitle,
.header1_md,
.text-block-15,
.text-block-18,
.text-block-17 {
  color: #ffffff !important;
}

/* Certification text should be c5d5df */
.cert_text1 {
  color: #c5d5df !important;
}

/* Paragraph text */
p,
.txt,
.uui-text-size-large-3,
.div-block-16 p,
.div-block-16 li {
  color: #c5d5df !important;
}

/* Sidebar text links - specific elements only, NOT summary elements */
.sidebar_links,
#menu-container a,
#menu-container li {
  color: #9db2bf !important;
}

/* Main section headers (level 0 - mczen, windows, linux, web) should be white */
.sidebar_links #menu-container .sidebar-summary-root,
#menu-container .sidebar-summary-root {
  color: #ffffff !important;
  background-color: transparent !important;
}

/* Sub-section expandable headers (HackTheBox, Cheatsheet, Script, etc.) should be same as sidebar links */
.sidebar_links #menu-container summary:not(.sidebar-summary-root),
#menu-container summary:not(.sidebar-summary-root) {
  color: #9db2bf !important;
  background-color: transparent !important;
}

/* Nuclear option - force all summary text content to inherit correct colors */
#menu-container .sidebar-summary-root > *,
#menu-container .sidebar-summary-root span {
  color: #ffffff !important;
}

#menu-container summary:not(.sidebar-summary-root) > *,
#menu-container summary:not(.sidebar-summary-root) span {
  color: #9db2bf !important;
}

/* Keep active links in original red color */
#menu-container a.active {
  color: #b8202c !important;
}

/* Footer text */
.footer_txt,
.footer-text-color {
  color: #c5d5df !important;
}

.footer-email-color {
  color: #10b0ad !important;
}

/* Footer line/border with specified color */
.div-block-29,
.footer-margin {
  border-top: 1px solid #1e2532 !important;
}

/* Links */
a {
  color: #10b0ad !important;
}

.link-3 {
  color: #10b0ad !important;
}

/* Search inputs */
.search_input2.w-input,
.f-field-input-icon-r-2.w-input,
input[type="text"] {
  background-color: #293243 !important;
  border-color: #3a4553 !important;
  color: #c5d5df !important;
}

.search_input2.w-input::placeholder,
.f-field-input-icon-r-2.w-input::placeholder,
input[type="text"]::placeholder {
  color: #6b7280 !important;
}

/* Search icons */
.f-field-icon-r-2 svg,
.f-field-icon-r-2 svg path,
.search-icon-homepage,
.search-icon-sidebar {
  color: #c5d5df !important;
  fill: #c5d5df !important;
}

/* Search dropdown */
.sidebar_links .search-dropdown {
  background: #293243 !important;
  border-color: #3a4553 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

.sidebar_links .search-result-item {
  background: #ffffff !important;
  border-bottom-color: #3a4553 !important;
}

.sidebar_links .search-result-item:hover,
.sidebar_links .search-result-item.keyboard-active {
  background: #f8f9fa !important;
}

.sidebar_links .search-result-title {
  color: #10b0ad !important;
}

.sidebar_links .search-result-path,
.sidebar_links .search-result-snippet,
.sidebar_links .search-no-results {
  color: #c5d5df !important;
}

/* Tables */
table {
  border-color: #3a4553 !important;
}

th,
td {
  border-color: #3a4553 !important;
  background-color: transparent !important;
}

th {
  background: #293243 !important;
  color: #ffffff !important;
}

tr:nth-child(even) {
  background: #242938 !important;
}

/* Blockquotes */
blockquote {
  border-left-color: #b8202c !important;
  background: #242938 !important;
  color: #c5d5df !important;
}

/* Code blocks and inline code */
pre:not(.hljs),
code:not(.hljs):not([class*="hljs-"]) {
  background-color: #242938 !important;
  color: #c5d5df !important;
  border-color: #3a4553 !important;
}

/* Syntax highlighting enhancements for dark theme */
.hljs-attribute {
  color: #88c0d0 !important; /* Light blue for better visibility */
}

.hljs-string {
  color: #a3be8c !important; /* Keep green for strings */
}

.hljs-tag {
  color: #bf616a !important; /* Keep red for tags */
}

.hljs-name {
  color: #d08770 !important; /* Orange for tag names */
}

/* Expandable sections */
.expandable-section {
  background: #242938 !important;
  border-color: #3a4553 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.expandable-header {
  background: #293243 !important;
  border-bottom-color: #3a4553 !important;
  color: #ffffff !important;
}

.expandable-header:hover {
  background: #3a4553 !important;
}

.expandable-header::after {
  color: #c5d5df !important;
}

.expandable-content {
  background: #242938 !important;
}

/* Homepage hero section adjustments */
.homepage-hero-fullwidth {
  background-color: #181d27 !important;
}

/* mczen bottom text in sidebar */
.mczen-bottom-text {
  color: #9db2bf !important;
}

.mczen-bottom-text:hover {
  color: #b8202c !important;
}

/* Sidebar icon section remains the same dark blue */
.sidebar_menu_logos,
.sidebar_menu_logos_small {
  background: #293243 !important;
}

/* Mobile sidebar text */
.mczen_sidebar_text a {
  color: #9db2bf !important;
}

/* Form elements */
.form-block-2,
.form-block-3 {
  background: transparent !important;
}

/* YouTube embed and media elements */
.w-embed-youtubevideo,
.youtube,
.youtube-embed-container {
  background: #242938 !important;
}

/* Additional webflow elements */
.uui-text-size-large-3,
.uui-text-size-medium,
.text-size-regular {
  color: #c5d5df !important;
}

/* Button and interactive elements */
.w-button,
button {
  background-color: #293243 !important;
  border-color: #3a4553 !important;
  color: #c5d5df !important;
}

.w-button:hover,
button:hover {
  background-color: #3a4553 !important;
}

/* Certification blocks */
.cape_block,
.cpts_block,
.cbhh_block {
  background-color: transparent !important;
}

/* Grid and layout elements */
.grid-4,
.w-layout-grid {
  background-color: transparent !important;
}

/* Homepage content sections */
.div-block-23,
.div-block-24,
.div-block-25,
.div-block-28,
.div-block-29,
.div-block-30 {
  background-color: transparent !important;
}

/* Override any remaining light backgrounds */
.homepage-content,
.div-block-17 {
  background-color: transparent !important;
}

/* Ensure text readability */
.text-block-17,
.text-block-18 {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Hover effects for sidebar icons */
.side_windows:hover,
.side_linux:hover,
.side_web:hover,
.logo:hover {
  background: #3a4553 !important;
}

/* Ensure proper contrast for critical elements */
.hero-subtitle strong {
  color: #ffffff !important;
}

/* Border focus states */
input:focus,
textarea:focus,
select:focus {
  border-color: #10b0ad !important;
  box-shadow: 0 0 0 2px rgba(16, 176, 173, 0.2) !important;
}

/* Invert Group-11 icons for dark theme */
img[src*="Group-11.png"] {
  filter: invert(1) brightness(0.9) !important;
}

/* HR elements in markdown pages - same color as footer line */
hr,
.div-block-16 hr,
#content hr {
  border: none !important;
  border-top: 1px solid #1e2532 !important;
  background-color: #1e2532 !important;
  color: #1e2532 !important;
  height: 1px !important;
  margin: 1em 0 !important;
}

/* Strong text color in dark theme */
strong,
b,
.div-block-16 strong,
.div-block-16 b,
#content strong,
#content b {
  color: #dde6ed !important;
}

/* Certification logos visibility in dark theme */
.cape_block img,
.cpts_block img,
.cbhh_block img {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  padding: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  margin-top: 25px !important;
}

/* Homepage content spacing */
.div-block-28,
.w-embed-youtubevideo {
  margin-top: 100px !important;
  margin-bottom: 100px !important;
}

/* Certifications section - reduce space between description and certifications */
.div-block-18 {
  margin-top: 20px !important;
  margin-bottom: 100px !important;
}

/* Fix spacing between headings and their content */
.heading-9 {
  margin-bottom: 20px !important;
}

/* Specific adjustments for content that follows headings */
.heading-9 + .div-block-28 {
  margin-top: 20px !important;
}

/* More specific targeting for MonitorsThree walkthrough section */
.w-embed-youtubevideo,
.youtube,
.youtube-embed-container {
  margin-top: 20px !important;
  margin-bottom: 100px !important;
}
