/* =========================================
   0. UNIVERSAL BOX SIZING & RESETS
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* =========================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================= */
:root {
  /* Light theme (default) */
  --bg-color: #f9f9f9;
  --header-bg: #ffffff;
  --text-color: #333333;
  --text-muted: #666666;
  --border-color: #eaeaea;
  --accent-red: #d32f2f;
  --input-bg: #f5f5f5;
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius-md: 8px;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s ease;
}

/* Dark theme overrides */
body.dark-mode {
  --bg-color: #121212;
  --header-bg: #1e1e1e;
  --text-color: #f0f0f0;
  --text-muted: #aaaaaa;
  --border-color: #333333;
  --input-bg: #2a2a2a;
}

/* =========================================
   2. GLOBAL BASE STYLES
   ========================================= */
body {
  font-family: system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

.datochai-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Branding ---------- */
.site-branding a {
  text-decoration: none;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.logo-dato {
  color: var(--text-color);
}

.logo-chai {
  color: var(--accent-red);
}

/* ---------- Generic interactive elements ---------- */
input,
select,
button {
  font-family: inherit;
  color: var(--text-color);
}

/* ---------- Professional Icon Containers ---------- */
/* Every button that displays an icon (SVG) gets these base styles */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);   /* icon inherits color via currentColor */
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: fill var(--transition-fast), transform var(--transition-fast);
}

.icon-btn:hover {
  color: var(--accent-red);
  transform: scale(1.08);
}

/* ---------- Contact / CTA Button ---------- */
.contact-btn {
  background: var(--accent-red);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-block;
  transition: background var(--transition-fast), transform var(--transition-fast),
              box-shadow var(--transition-fast);
  border: none;
}

.contact-btn:hover {
  background: #b71c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  /* already inherits .icon-btn if that class is used, otherwise we duplicate */
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.theme-toggle:hover {
  transform: scale(1.12);
  color: var(--accent-red);
}

/* =========================================
   3. DESKTOP HEADER (> 1024px)
   ========================================= */
@media (min-width: 1025px) {
  .site-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }

  /* Hide mobile‑only elements */
  .mobile-menu-toggle,
  .mobile-only-search {
    display: none;
  }

  /* ---------- Navigation ---------- */
  .desktop-navigation .primary-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
    align-items: center;
  }

  .desktop-navigation a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 15px;
    transition: color var(--transition-fast);
  }

  .desktop-navigation a:hover {
    color: var(--accent-red);
  }

  /* Dropdown (non‑mega) */
  .desktop-navigation li {
    position: relative;
  }

  .desktop-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--header-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    min-width: 250px;
    padding: 10px 0;
    border-radius: var(--radius-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth),
                transform var(--transition-smooth);
    z-index: 99;
    margin: 0;
    list-style: none;
  }

  .desktop-navigation li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .desktop-navigation .sub-menu a {
    display: block;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color var(--transition-fast), color var(--transition-fast);
  }

  .desktop-navigation .sub-menu a:hover {
    background-color: var(--input-bg);
    color: var(--accent-red);
  }

  /* ---------- Search ---------- */
  .search-form {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid transparent;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  }

  .search-form:focus-within {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
  }

  .search-field {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
    padding: 5px;
    color: var(--text-color);
  }

  .search-submit {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color var(--transition-fast);
  }

  .search-submit svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  .search-submit:hover {
    color: var(--accent-red);
  }

  /* ---------- Utilities (right side) ---------- */
  .header-utilities {
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .language-switcher select {
    background: transparent;
    border: none;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    color: var(--text-color);
    padding: 5px;
  }
}

/* =========================================
   4. TABLET VIEW (769px – 1024px)
   ========================================= */
@media (max-width: 1024px) {
  .desktop-navigation {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;           /* overridden by icon-btn if class used */
    order: 4;
  }

  /* Flex order: Logo | Search | Utilities | Menu */
  .site-branding {
    order: 1;
    margin-right: auto;
  }

  .header-search {
    order: 2;
    margin-right: 20px;
  }

  .header-utilities {
    order: 3;
  }

  .search-field {
    width: 150px;
  }
}

/* =========================================
   5. MOBILE VIEW (< 768px)
   ========================================= */
@media (max-width: 768px) {
  .desktop-tablet-only {
    display: none !important;
  }

  /* Flex order: Menu | Logo | Utilities */
  .mobile-menu-toggle {
    order: 1;
    margin-right: 15px;
  }

  .site-branding {
    order: 2;
    flex-grow: 1;
    text-align: left;
  }

  .header-utilities {
    order: 3;
  }

  .header-wrapper {
    justify-content: flex-start;
  }
}

/* =========================================
   6. OFF‑CANVAS MENU (All Devices)
   ========================================= */
.offcanvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.offcanvas-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* Panel uses transform for smooth animation */
.offcanvas-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  background: var(--header-bg);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  overflow-y: auto;
  padding-top: max(20px, env(safe-area-inset-top));   /* notch support */
}

.offcanvas-overlay.is-active .offcanvas-panel {
  transform: translateX(0);
}

/* -------- Off‑canvas header -------- */
.offcanvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 20px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

/* Close button – professional SVG icon */
.offcanvas-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: color var(--transition-fast), transform var(--transition-fast);
  z-index: 1000;
}

.offcanvas-close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.offcanvas-close:hover {
  color: var(--accent-red);
  transform: rotate(90deg);
}

/* -------- Off‑canvas body -------- */
.offcanvas-body {
  padding: 20px;
  flex-grow: 1;
}

.mobile-only-search .search-form {
  margin-bottom: 20px;
  background: var(--input-bg);
}

.offcanvas-navigation {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.offcanvas-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.offcanvas-navigation a {
  display: block;
  padding: 12px 0;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid var(--border-color);
  transition: color var(--transition-fast);
}

.offcanvas-navigation a:hover {
  color: var(--accent-red);
}

/* Sub‑menus collapsed by default in mobile */
.offcanvas-navigation .sub-menu {
  padding-left: 15px;
  display: none;
}

/* Divider */
.offcanvas-divider {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 20px 0;
}

/* -------- Off‑canvas subscribe -------- */
.offcanvas-subscribe h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.offcanvas-subscribe input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--text-color);
  box-sizing: border-box;
}

.offcanvas-subscribe button {
  width: 100%;
  padding: 10px;
  background: var(--text-color);
  color: var(--bg-color);
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.offcanvas-subscribe button:hover {
  opacity: 0.9;
}

/* -------- Off‑canvas utilities -------- */
.offcanvas-mobile-utilities {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.full-width-btn {
  text-align: center;
  display: block;
}

/* -------- Off‑canvas footer -------- */
.offcanvas-footer {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.offcanvas-footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 5px;
  transition: color var(--transition-fast);
}

.offcanvas-footer a:hover {
  color: var(--accent-red);
}

/* =========================================
   7. DROPDOWN ARROWS & GLOBAL FIXES
   ========================================= */

/* Remove any bullet points from all sub‑menus globally */
.sub-menu {
  list-style: none !important;
  padding: 0;
  margin: 0;
}

.sub-menu li {
  list-style: none !important;
}

/* Auto‑generated dropdown indicator (CSS arrow – not an emoji) */
.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  padding: 2px;
  transform: rotate(45deg);
  margin-left: 8px;
  vertical-align: middle;
  transition: transform var(--transition-smooth);
}

.menu-item-has-children:hover > a::after,
.menu-item-has-children.is-open > a::after {
  transform: rotate(-135deg);
}

/* Ensure mobile search and close buttons are always displayed inside off‑canvas */
.offcanvas-close {
  display: flex !important;      /* override any previous hiding */
}

.mobile-only-search {
  display: block !important;
}

/* =========================================
   7. PROMO BOX & LEGACY MEGA MENU CLASSES
   ========================================= */

/* Allow mega menu to escape relative parent */
.desktop-navigation li.datochai-has-mega-menu {
  position: static !important;
}

/* Promo item occupies the rightmost column */
.mega-menu-promo-item {
  grid-column: 4 / 5;
  grid-row: 1 / span 10;          /* adjust if menu depth differs */
  padding-left: 30px;
  border-left: 1px solid var(--border-color);
  list-style: none !important;
}

/* Promo card styling */
.mega-menu-promo-card {
  background: var(--input-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.mega-menu-promo-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.promo-content {
  padding: 20px;
  text-align: center;
}

.promo-content h4 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: var(--text-color);
}

/* =========================================
   8. POST GRID & CONTENT AREA
   ========================================= */
.site-main {
  padding: 40px 0;
}

.page-header {
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 15px;
}

.page-title {
  font-size: 28px;
  margin: 0;
  color: var(--text-color);
  font-weight: 800;
}

/* Responsive post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

/* Post card */
.datochai-post-card {
  background: var(--header-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.datochai-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-red);
}

.post-thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.post-content-wrap {
  padding: 25px;
}

.entry-title {
  font-size: 20px;
  margin: 0 0 12px 0;
  line-height: 1.4;
  font-weight: 700;
}

.entry-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.entry-title a:hover {
  color: var(--accent-red);
}

/* Meta line with SVG icons */
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 15px;
  font-weight: 500;
}

.entry-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Professional icon styling for meta icons */
.entry-meta svg,
.meta-read-time svg,
.meta-category svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

.entry-content {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 25px;
}

/* Read more button */
.read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.read-more-btn:hover {
  background: var(--accent-red);
  color: #ffffff;
  border-color: var(--accent-red);
  box-shadow: 0 4px 10px rgba(211, 47, 47, 0.2);
}

/* =========================================
   9. SINGLE POST VIEW (Typography & Grid)
   ========================================= */
.single-post-view {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-color);
}

.narrow-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Breadcrumbs & top meta */
.single-entry-header {
  padding: 40px 20px 20px;
  text-align: center;
}

.single-top-meta {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  margin-bottom: 25px;
}

.datochai-breadcrumbs {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.datochai-breadcrumbs a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.datochai-breadcrumbs a:hover {
  color: var(--accent-red);
}

.current-page {
  color: var(--accent-red);
}

/* Category + read time */
.meta-cat-read {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-category {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-red);
  text-transform: uppercase;
}

.meta-category a {
  color: inherit;
  text-decoration: none;
}

.meta-read-time {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

/* Single post titles */
.single-entry-header .entry-title {
  font-family: 'Degular Display', system-ui, sans-serif;
  font-size: 62px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 20px 0;
  color: var(--text-color);
}

.single-entry-header .entry-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0 0 40px 0;
}

/* Force grid titles to stay small */
.post-grid .entry-title {
  font-size: 20px !important;
}

/* Author row */
.author-date-social-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 15px;
}

.author-date-info {
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
}

.author-avatar {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.author-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

.author-name a {
  color: inherit;
  text-decoration: none;
}

.publish-dates {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
}

/* Social share icons – now SVG‑ready */
.social-share-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-share-icons a {
  color: var(--text-muted);
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-share-icons a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-share-icons a:hover {
  color: var(--accent-red);
  transform: translateY(-2px);
}

/* Featured image */
.single-featured-image {
  margin-bottom: 50px;
}

.single-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Post body */
.single-entry-content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-color);
}

.single-entry-content h2,
.single-entry-content h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--text-color);
}

.single-entry-content h2 { font-size: 34px; }
.single-entry-content h3 { font-size: 34px; } /* maintain intentional equality */

.single-entry-content a {
  color: var(--accent-red);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.single-entry-content a:hover {
  color: #b71c1c;
}

.single-entry-content p {
  margin-bottom: 25px;
}

/* Newsletter box */
.post-newsletter-box {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 35px;
  text-align: center;
  margin: 50px 0;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1 1 200px;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-color);
  color: var(--text-color);
}

.newsletter-form button {
  background: var(--accent-red);
  color: #ffffff;
  border: none;
  padding: 12px 25px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: #b71c1c;
  transform: translateY(-2px);
}

/* Author box */
.post-author-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--header-bg);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.post-author-box img {
  border-radius: 50%;
  width: 80px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
}

.author-bio h4 {
  margin: 0 0 10px 0;
  font-size: 20px;
  color: var(--text-color);
}

.author-bio p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Tags */
.post-tags {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 50px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.post-tags a {
  background: var(--input-bg);
  padding: 6px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

.post-tags a:hover {
  background: var(--accent-red);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Related posts grid (auto‑responsive) */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

/* Admin builder area */
.admin-bottom-builder {
  margin-top: 60px;
}

/* =========================================
   10. LAYOUT ARCHITECTURE (GRID ENGINE)
   ========================================= */
.layout-wrapper {
  margin-bottom: 60px;
  width: 100%;
}

/* Sticky sidebar */
.single-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

/* Table of contents */
.dynamic-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dynamic-toc-list li {
  margin-bottom: 12px;
  line-height: 1.4;
}

.dynamic-toc-list a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.3s ease;
  display: block;
}

.dynamic-toc-list a:hover {
  color: var(--accent-red);
}

/* Sub‑items */
.toc-sub-item {
  padding-left: 15px;
  border-left: 2px solid var(--border-color);
}

.toc-sub-item a {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Scroll offset for fixed header */
.single-entry-content h2,
.single-entry-content h3 {
  scroll-margin-top: 100px;
}

/* Layout 1: Full width */
.layout-full {
  display: block;
}

.layout-full .main-post-column {
  max-width: 100%;
}

/* Layout 2: Compact centered (15% | 70% | 15% via wrapper) */
.layout-compact {
  display: flex;
  justify-content: center;
}

.layout-compact .main-post-column {
  max-width: 800px;
  width: 100%;
}

/* Layout 3: Left TOC + Content */
.layout-left-toc {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  align-items: start;
  width: 100%;
}

.layout-left-toc .main-post-column {
  max-width: 100%;
  min-width: 0; /* prevents grid blowout */
}

/* Layout 4: Dual sidebars */
.layout-dual-sidebar {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 30px;
  align-items: start;
  width: 100%;
}

.layout-dual-sidebar .main-post-column {
  max-width: 100%;
  min-width: 0;
}

/* Category section headings */
.section-global-heading {
  font-size: 28px;
  font-weight: 800;
  margin: 60px 0 30px;
  text-transform: capitalize;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

/* 3‑column grid (no !important needed) */
.grid-3-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* =========================================
   RESPONSIVE OVERRIDES
   ========================================= */
@media (max-width: 1024px) {
  .single-entry-header .entry-title {
    font-size: 46px;            /* reduce on tablet */
  }
  .layout-left-toc,
  .layout-dual-sidebar {
    grid-template-columns: 1fr; /* stack on tablet */
  }
  .single-sidebar {
    position: static;           /* disable sticky on smaller screens */
  }
  .grid-3-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .single-entry-header .entry-title {
    font-size: 36px;
  }
  .single-entry-header .entry-subtitle {
    font-size: 20px;
  }
  .author-date-social-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .post-author-box {
    flex-direction: column;
    text-align: center;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .post-tags {
    justify-content: center;
  }
  .grid-3-col {
    grid-template-columns: 1fr;
  }
  .layout-compact .main-post-column {
    max-width: 100%;
    padding: 0 15px;
  }
}

/* =========================================
   11. MOBILE RESPONSIVENESS (Strict Font Scaling)
   ========================================= */
@media (max-width: 1024px) {
  .layout-left-toc,
  .layout-dual-sidebar {
    display: block;
  }

  .single-sidebar {
    display: none;
  }

  .grid-3-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .single-entry-header .entry-title {
    font-size: 32px !important;
    line-height: 1.2;
  }

  .single-entry-header .entry-subtitle {
    font-size: 18px !important;
    margin-bottom: 25px;
  }

  .single-entry-content {
    font-size: 16px;   /* accessibility standard */
    line-height: 1.6;
  }

  .single-entry-content h2 { font-size: 26px; }
  .single-entry-content h3 { font-size: 22px; }

  .author-date-social-row {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .post-author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .grid-3-col {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   12. ADVANCED DYNAMIC FOOTER
   ========================================= */
.site-footer {
  background-color: var(--header-bg);
  border-top: 1px solid var(--border-color);
  margin-top: 80px;
  padding-top: 70px;
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
}

/* 4‑column grid */
.site-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}

/* Footer widget headings */
.footer-widget-title {
  font-family: 'Degular Display', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 25px 0;
  color: var(--text-color);
  position: relative;
  padding-bottom: 12px;
}

.footer-widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 35px;
  height: 3px;
  background-color: var(--accent-red);
  border-radius: 2px;
}

/* ---------- Column 1: Brand & Experts ---------- */
.footer-logo-wrapper {
  margin-bottom: 20px;
}

.footer-site-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}

.value-proposition-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.experts-list-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-color);
}

.expert-roster {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 15px;
}

.expert-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.expert-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  background-color: var(--input-bg);
}

.expert-info {
  display: flex;
  flex-direction: column;
}

.expert-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-color);
}

.expert-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Columns 2–4: Quick Links ---------- */
.footer-links-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-column li {
  margin-bottom: 14px;
}

.footer-links-column a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links-column a:hover {
  color: var(--accent-red);
  transform: translateX(5px);
}

/* ---------- Utility Bar (Bottom) ---------- */
/* ========================================================
   BOTTOM SITE INFO BAR (Responsive Layout)
   ======================================================== */

.site-info-bar {
    border-top: 1px solid var(--border-color);
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-color);
    background: var(--bg-color); /* Ensure it respects dark/light mode */
}

/* Base Desktop Layout (All in one line) */
.info-bar-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.copyright-info {
    order: 1;
}

.footer-legal-links {
    order: 2;
    flex-grow: 1; /* Pushes toggles to the right */
    text-align: center;
}

.footer-legal-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-legal-links a:hover {
    color: var(--accent-red);
}

.legal-divider {
    margin: 0 5px;
    opacity: 0.5;
}

.global-site-toggles {
    order: 3;
}

.back-to-top {
    order: 4;
}

/* --- Tablet Layout (Max 1024px) --- */
@media (max-width: 1024px) {
    .info-bar-flex {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns */
        grid-template-rows: auto auto; /* Two rows */
        gap: 15px;
        align-items: center;
    }

    /* Top Row */
    .global-site-toggles {
        grid-column: 1;
        grid-row: 1;
        justify-self: start; /* Left side */
    }

    .back-to-top {
        grid-column: 2;
        grid-row: 1;
        justify-self: end; /* Right side */
    }

    /* Bottom Row */
    .copyright-info {
        grid-column: 1;
        grid-row: 2;
        justify-self: start; /* Left side */
    }

    .footer-legal-links {
        grid-column: 2;
        grid-row: 2;
        justify-self: end; /* Right side */
        text-align: right;
    }
}

/* --- Mobile Layout (Max 768px) --- */
@media (max-width: 768px) {
    .info-bar-flex {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns for top row */
        grid-template-rows: auto auto auto; /* Three rows */
        gap: 12px;
        align-items: center;
    }

    /* Row 1: Toggles */
    .global-site-toggles {
        grid-column: 1;
        grid-row: 1;
        justify-self: start; /* Left side */
    }

    .back-to-top {
        grid-column: 2;
        grid-row: 1;
        justify-self: end; /* Right side */
    }

    /* Row 2: Legal Links (All in one line) */
    .footer-legal-links {
        grid-column: 1 / -1; /* Span across both columns */
        grid-row: 2;
        justify-self: center;
        text-align: center;
        font-size: 10px; /* Reduced to 10px */
        font-weight: normal; /* Not bold */
        line-height: 1.2;
        white-space: nowrap; /* Forces text onto a single line */
        overflow-x: auto; /* Allows horizontal scrolling if screen is too narrow */
        -webkit-overflow-scrolling: touch;
        width: 100%; /* Ensure it takes full width */
    }
    
    /* Hide dividers on very small screens to save space if needed, though white-space: nowrap usually handles it */
    .footer-legal-links .legal-divider {
        margin: 0 3px; /* Slightly tighter margin on mobile */
    }

    /* Row 3: Copyright */
    .copyright-info {
        grid-column: 1 / -1; /* Span across both columns */
        grid-row: 3;
        justify-self: center; /* Center aligned */
        text-align: center;
        font-size: 12px; /* Slightly smaller copyright on mobile */
    }
}

/* =========================================
   13. PREMIUM PILL THEME TOGGLE
   ========================================= */
.theme-pill-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 64px;
  height: 32px;
  border-radius: 30px;
  border: 2px solid var(--accent-red);
  background: transparent;
  padding: 2px;
  position: relative;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

/* Sliding circle */
.theme-pill-toggle::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 24px;
  height: 24px;
  background-color: var(--accent-red);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon containers inside the pill */
.toggle-sun,
.toggle-moon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* SVG styling – crucial for proper rendering */
.toggle-sun svg,
.toggle-moon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2px;
  fill: none;
  transition: stroke 0.3s ease;
}

/* Light mode defaults */
.toggle-sun {
  color: #ffffff;
}
.toggle-moon {
  color: var(--accent-red);
}

/* Dark mode overrides */
body.dark-mode .theme-pill-toggle {
  border-color: var(--text-color);
}

body.dark-mode .theme-pill-toggle::before {
  background-color: var(--text-color);
  transform: translateX(32px);
}

body.dark-mode .toggle-sun {
  color: var(--text-color);
}
body.dark-mode .toggle-moon {
  color: var(--bg-color);
}

/* =========================================
   14. BACK TO TOP BUTTON
   ========================================= */
.back-to-top-button {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

/* SVG arrow inside */
.back-to-top-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5px;
  transition: stroke 0.3s ease;
}

.back-to-top-button:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(211, 47, 47, 0.2);
}

/* =========================================
   15. FOOTER FIXES (BRAND, DROPDOWN, LINKS)
   ========================================= */
.split-brand-logo a {
  text-decoration: none;
}

.split-brand-logo .brand-part-1 {
  color: var(--text-color);
}

.split-brand-logo .brand-part-2 {
  color: var(--accent-red);
}

/* Custom links area */
.footer-custom-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-custom-links li {
  margin-bottom: 14px;
}

.footer-custom-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-custom-links a:hover {
  color: var(--accent-red);
  transform: translateX(4px);
}

/* Copyright formatting */
.footer-brand-link {
  color: var(--accent-red);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-brand-link:hover {
  color: #b71c1c;
  text-decoration: underline;
}

/* ---------- Language Dropdown ---------- */
.language-dropdown-wrapper {
  position: relative;
}

.language-selector {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-color);
  font-weight: 600;
  font-size: 14px;
  background: none;
  border: none;
}

/* Arrow SVG */
.language-selector svg {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  transition: transform 0.3s ease;
}

.language-selector.is-open svg {
  transform: rotate(180deg);
}

/* Dropdown menu with smooth opacity transition */
.language-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  list-style: none;
  padding: 10px 0;
  border-radius: 8px;
  min-width: 150px;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.language-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-dropdown-menu li {
  margin: 0;
  padding: 0;
}

.language-dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.language-dropdown-menu a:hover {
  background: var(--accent-red);
  color: #fff;
}

/* =========================================
   16. SIDEBAR QUICK LINKS MENU
   ========================================= */
.sidebar-quick-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-quick-menu li {
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 12px;
}

.sidebar-quick-menu li:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-quick-menu li a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

/* Professional SVG arrow instead of text character */
.sidebar-quick-menu li a::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  background-color: var(--accent-red);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
  mask-size: contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
  transition: transform 0.3s ease;
}

.sidebar-quick-menu li a:hover::before {
  transform: translateX(3px);
}

.sidebar-quick-menu li a:hover {
  color: var(--accent-red);
  transform: translateX(6px);
}

/* =========================================
   17. UTILITY BAR LEGAL LINKS
   ========================================= */
.footer-legal-links {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-legal-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-legal-links a:hover {
  color: var(--accent-red);
}

.legal-divider {
  margin: 0 8px;
  opacity: 0.4;
}

/* Offcanvas legal links sync */
.offcanvas-footer {
  font-size: 13px;
  color: var(--text-muted);
}

.offcanvas-footer a {
  color: var(--text-color);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.offcanvas-footer a:hover {
  color: var(--accent-red);
}

/* =========================================
   18. FOOTER & LAYOUT RESPONSIVE BREAKPOINTS
   ========================================= */
@media (max-width: 1024px) {
  .site-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .expert-roster {
    grid-template-columns: 1fr 1fr;   /* stays two per row on tablet */
  }
}

@media (max-width: 768px) {
  .site-footer {
    padding-top: 50px;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .expert-roster {
    grid-template-columns: 1fr;
  }

  .info-bar-flex {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .global-site-toggles {
    justify-content: center;
  }
}

/* =========================================
   17. HEADER & GLASSMORPHISM MEGA MENU
   ========================================= */

@media (min-width: 1025px) {

  /* 1. Make parent static so mega menu spans full header width */
  .desktop-navigation li.mega-menu-parent {
    position: static !important;
  }

  /* 2. Replace “ ▼” emoji with a clean CSS arrow */
  .desktop-navigation li.mega-menu-parent > a::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    margin-left: 6px;
    transform: rotate(45deg);
    vertical-align: middle;
    opacity: 0.7;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .desktop-navigation li.mega-menu-parent:hover > a::after {
    transform: rotate(-135deg);
    opacity: 1;
  }

  /* 3. The hidden mega panel (overrides default sub‑menu) */
  .desktop-navigation li.mega-menu-parent > .sub-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;

    /* 5‑column grid layout */
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px !important;

    /* Glassmorphism styling */
    background: var(--bg-color) !important;
    padding: 40px !important;
    border-radius: 0 0 12px 12px !important;
    border-top: 4px solid var(--accent-red) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;

    /* Smooth entrance animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 1000;
  }

  /* 4. Show on hover */
  .desktop-navigation li.mega-menu-parent:hover > .sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }

  /* 5. Style individual lottery links */
  .desktop-navigation li.mega-menu-parent > .sub-menu li {
    display: block;
    margin: 0;
    padding: 0;
  }

  .desktop-navigation li.mega-menu-parent > .sub-menu a {
    background: var(--input-bg);
    border: 1px solid var(--border-color) !important;
    padding: 15px 20px !important;
    border-radius: 8px;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-align: center;
    color: var(--text-color) !important;
    text-decoration: none;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
  }

  /* Hover effect */
  .desktop-navigation li.mega-menu-parent > .sub-menu a:hover {
    background: var(--header-bg);
    border-color: var(--accent-red) !important;
    color: var(--accent-red) !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.1);
  }

  /* Remove any extraneous pseudo‑elements on the links */
  .desktop-navigation li.mega-menu-parent > .sub-menu a::after,
  .desktop-navigation li.mega-menu-parent > .sub-menu a::before {
    display: none !important;
  }
}

/* =========================================
   18. BUG FIXES: MOBILE HEADER & OFFCANVAS
   ========================================= */

/* --- Bulletproof header row & height --- */
.site-header {
  position: sticky !important;
  top: 0;
  z-index: 999;
  padding: 15px 0 !important;
  min-height: 75px !important;
}

.header-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 15px !important;
  width: 100%;
  height: 100%;
}

/* --- Tablet alignment (restored search bar) --- */
@media (max-width: 1024px) {
  /* Order: 1. Logo | 2. Search | 3. Utilities | 4. Hamburger */
  .site-branding {
    order: 1 !important;
    margin: 0 !important;
    flex-shrink: 0;
  }

  .header-search {
    order: 2 !important;
    display: block !important;             /* restored tablet search */
    margin: 0 auto !important;
    flex-grow: 1;
    max-width: 250px;
  }

  .header-utilities {
    order: 3 !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-shrink: 0;
  }

  .mobile-menu-toggle {
    order: 4 !important;
    margin: 0 0 0 10px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 40px;
  }
}

/* --- Mobile refinements --- */
@media (max-width: 768px) {
  .site-header {
    padding: 12px 0 !important;
    min-height: 65px !important;
  }

  /* Layout: 1. Hamburger | 2. Logo | 3. Utilities */
  .mobile-menu-toggle {
    order: 1 !important;
    margin: 0 15px 0 0 !important;
  }
  .site-branding {
    order: 2 !important;
    margin: 0 auto 0 0 !important;
  }
  .header-utilities {
    order: 3 !important;
  }

  .site-branding a {
    font-size: 22px !important;
  }

  .theme-pill-toggle {
    transform: scale(0.85);
    transform-origin: right center;
    margin: 0 !important;
  }

  .language-switcher {
    display: none !important;
  }

  /* Hide inline search on phones (moved to offcanvas) */
  .header-search {
    display: none !important;
  }

  
  
}

/* --- Offcanvas footer pinning & search restoration --- */
.offcanvas-panel {
  height: 100% !important;
  height: 100dvh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.offcanvas-body {
  flex-grow: 1 !important;
  overflow-y: auto !important;
  padding-bottom: 30px !important;
}

.mobile-only-search {
  display: block !important;
  margin-bottom: 20px;
}

.offcanvas-footer {
  flex-shrink: 0 !important;
  background: var(--header-bg) !important;
  position: relative !important;
  z-index: 10 !important;
  width: 100% !important;
  line-height: 1.8 !important;        /* slightly reduced from 2.2 */
  padding: 15px 20px !important;
  display: block !important;
  border-top: 1px solid var(--border-color);
}

/* =========================================
   19. GLOBAL PREMIUM SEARCH BAR STYLING
   ========================================= */

/* Universal pill‑shaped search form */
.search-form {
  display: flex !important;
  align-items: center !important;
  background: var(--input-bg) !important;
  border-radius: 20px !important;
  padding: 5px 15px !important;
  border: 1px solid transparent !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
  width: 100%;
  box-sizing: border-box;
}

.search-form:focus-within {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1) !important;
}

.search-field {
  border: none !important;
  background: transparent !important;
  outline: none !important;
  width: 100% !important;
  padding: 5px !important;
  color: var(--text-color) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
}

/* Search submit button – professional SVG icon styling */
.search-submit {
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  color: var(--text-muted) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.3s ease !important;
  padding: 5px !important;
}

.search-submit svg {
  width: 18px;
  height: 18px;
  fill: none;
}

.search-submit:hover {
  color: var(--accent-red) !important;
}

/* Keep header search bar compact on desktop / tablet */
@media (min-width: 769px) {
  .header-search .search-form {
    max-width: 250px;
    margin-left: auto;
  }
}
/* Override global button colour for hamburger icon */
button.mobile-menu-toggle {
  color: var(--text-color) !important;   /* icon lines match theme text colour */
  background: transparent !important;    /* prevent white square */
  border: none;
}

button.mobile-menu-toggle svg {
  fill: none;
  stroke: currentColor;                 /* ensures the SVG uses the button’s colour */
}

/* =========================================
   UNIVERSAL DOWNLOAD BUTTON (Pillar + CPT)
   ========================================= */
.datochai-download-btn,
.cpt-download-btn {
  width: 100%;
  margin-bottom: 30px;
  padding: 18px;
  background: var(--accent-red);
  color: #ffffff !important;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

/* Override global button color for download buttons */
button.datochai-download-btn,
button.cpt-download-btn {
  background: var(--accent-red) !important;
  color: #ffffff !important;
  border: none !important;
}

button.datochai-download-btn svg,
button.cpt-download-btn svg {
  stroke: currentColor;
}

.datochai-download-btn svg,
.cpt-download-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.datochai-download-btn:hover,
.cpt-download-btn:hover {
  background: var(--accent-red);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(211, 47, 47, 0.5);
}

.datochai-download-btn:active,
.cpt-download-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

/* ── Other lotteries widget (pillar pages) ── */
.lottery-grid-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.lottery-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 10px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-color);
  transition: all 0.3s ease;
  text-align: center;
}

.lottery-link-card:hover {
  background: var(--accent-red);
  color: #ffffff;
  border-color: var(--accent-red);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(211, 47, 47, 0.2);
}

.card-accent-bar {
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 10px;
  background: var(--card-accent);
}

/* ── Related posts (CPT) – show logos properly ── */
.related-strict-grid .datochai-post-card .post-card-thumbnail img,
.related-strict-grid .datochai-post-card .fallback-thumbnail {
  height: auto;
  max-height: 120px;
  object-fit: contain;
  padding: 10px;
  background: var(--bg-color);
}

/* ── Utility: Text center ── */
.text-center {
  text-align: center;
}

/* ── BREADCRUMBS – Professional Themed Separator ── */
.datochai-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

/* All clickable breadcrumb links → brand red */
.datochai-breadcrumbs a {
  color: var(--accent-red);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.datochai-breadcrumbs a:hover {
  opacity: 0.8;
}

/* The separator span – replace its SVG with a bold ">" */
.datochai-breadcrumbs .breadcrumb-separator {
  display: inline-flex;
  align-items: center;
  margin: 0 6px;
  color: var(--accent-red);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.datochai-breadcrumbs .breadcrumb-separator svg {
  display: none;               /* hide the old SVG icon */
}
.datochai-breadcrumbs .breadcrumb-separator::before {
  content: "›";                /* single right‑pointing angle quote */
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
}

/* Active (current) page – adapts to theme */
.datochai-breadcrumbs .current-page {
  color: var(--text-color);    /* black in light, white in dark */
  font-weight: 700;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .datochai-breadcrumbs {
    font-size: 12px;
  }
  .datochai-breadcrumbs .breadcrumb-separator::before {
    font-size: 16px;
  }
}
/* =========================================
   NATIVE CONTACT FORM (STANDARD TEMPLATE)
========================================= */
.datochai-contact-form-container {
    background-color: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #eaeaea);
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* 🔥 THE FIX: Explicitly force the background to turn dark in Dark Mode 🔥 */
.dark .datochai-contact-form-container,
[data-theme="dark"] .datochai-contact-form-container,
body.dark-mode .datochai-contact-form-container {
    background-color: #1a1a2e !important; /* Premium Dark Background */
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Professional Alerts (SVG + Text) */
.contact-alert-success,
.contact-alert-error {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-family: 'Inter', sans-serif;
}

.contact-alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4CAF50;
}
.contact-alert-success .alert-icon-svg { color: #4CAF50; }
.contact-alert-success .alert-text { color: #2e7d32; }

.contact-alert-error {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 4px solid #F44336;
}
.contact-alert-error .alert-icon-svg { color: #F44336; }
.contact-alert-error .alert-text { color: #c62828; }

.alert-icon-svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.alert-text span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Dark Mode Overrides for Alerts */
.dark .contact-alert-success .alert-text { color: #81c784; }
.dark .contact-alert-error .alert-text { color: #e57373; }

/* Form Grid */
.datochai-native-form .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.datochai-native-form .input-group {
    margin-bottom: 20px;
}

.datochai-native-form label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

/* Explicit Input Styling to fix Dark Mode visibility */
.datochai-native-form input,
.datochai-native-form select,
.datochai-native-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg) !important; /* Force background */
    color: var(--text-color) !important; /* Force readable text */
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.datochai-native-form input::placeholder,
.datochai-native-form textarea::placeholder {
    color: #9ca3af !important; /* Professional muted grey placeholder */
    opacity: 1;
}

.datochai-native-form input:focus,
.datochai-native-form select:focus,
.datochai-native-form textarea:focus {
    outline: none;
    border-color: #C8102E; /* Brand Red Focus */
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

/* Brand Red Button */
.submit-btn-brand {
    background-color: #C8102E; /* Brand Red */
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
    margin-top: 10px;
}

.submit-btn-brand:hover { 
    background-color: #a00d25; /* Darker Brand Red on hover */
    transform: translateY(-2px);
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    .datochai-native-form .form-grid-2 { grid-template-columns: 1fr; gap: 0; }
    .datochai-contact-form-container { padding: 20px; }
}


/* =========================================
   EXPERT & AI PAGE (ENTERPRISE UI - THE "RULE OF 8")
   ========================================= */
.datochai-pakar-master-wrapper { width: 100%; overflow-x: hidden; }

/* Section Headings – max-width for elegant line breaks */
.datochai-pakar-master-wrapper .section-heading {
  font-family: 'Poppins', sans-serif;
  color: var(--accent-red);
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 auto 20px auto;
  text-align: center;
  max-width: 800px;
  word-wrap: break-word;
  line-height: 1.3;
}
.datochai-pakar-master-wrapper .section-intro {
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
  line-height: 1.8;
}

/* 1. HERO SECTION (theme‑adaptive) */
.datochai-pakar-master-wrapper .pakar-hero-section {
  background-color: var(--header-bg);
  padding: 80px 0;
  border-bottom: 1px solid var(--border-color);
}
.datochai-pakar-master-wrapper .pakar-hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.datochai-pakar-master-wrapper .pakar-hero-title {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 25px;
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.datochai-pakar-master-wrapper .pakar-hero-desc {
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.datochai-pakar-master-wrapper .pakar-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}
.datochai-pakar-master-wrapper .hero-badge {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 20px;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
}
.datochai-pakar-master-wrapper .pakar-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--accent-red);
  color: #fff;
  padding: 18px 40px;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}
.datochai-pakar-master-wrapper .pakar-cta-btn:hover {
  background-color: #b71c1c;
  transform: translateY(-2px);
}
.datochai-pakar-master-wrapper .cta-arrow { width: 20px; height: 20px; }

/* 2. CAROUSEL – exactly like homepage expert carousel */
.datochai-pakar-master-wrapper .pakar-carousel-section {
  padding: 80px 0;
  background-color: var(--bg-color);
}
.datochai-pakar-master-wrapper .alt-bg {
  background-color: var(--header-bg);
}

/* Swiper container with padding for shadows */
.datochai-pakar-master-wrapper .pakar-swiper-container {
  padding: 20px 5px 0 5px;
  margin-bottom: 15px;
  overflow: hidden;
}

/* Feature cards – identical to expert slides */
.datochai-pakar-master-wrapper .feature-card {
  padding: 35px 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--input-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}
.datochai-pakar-master-wrapper .feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}
.datochai-pakar-master-wrapper .card-icon-wrapper {
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.datochai-pakar-master-wrapper .card-icon-wrapper img,
.datochai-pakar-master-wrapper .card-icon-wrapper svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.datochai-pakar-master-wrapper .feature-card h3 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  font-size: 1.2rem;
  margin-bottom: 15px;
  max-width: 100%;
  word-wrap: break-word;
}
.datochai-pakar-master-wrapper .feature-card p {
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Pagination dots */
.datochai-pakar-master-wrapper .swiper-pagination-bullet-active {
  background-color: var(--accent-red) !important;
}

/* ---------- NAVIGATION ARROWS (BELOW CAROUSEL) ---------- */
.datochai-pakar-master-wrapper .carousel-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

/* Style arrows exactly like .c-btn circles */
.datochai-pakar-master-wrapper .swiper-button-next,
.datochai-pakar-master-wrapper .swiper-button-prev {
  position: static;               /* remove absolute positioning */
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  margin: 0;
}
.datochai-pakar-master-wrapper .swiper-button-next::after,
.datochai-pakar-master-wrapper .swiper-button-prev::after {
  font-size: 1.2rem;
  font-weight: bold;
  color: inherit;
}
.datochai-pakar-master-wrapper .swiper-button-next:hover,
.datochai-pakar-master-wrapper .swiper-button-prev:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}
/* Override Swiper default arrow size */
.datochai-pakar-master-wrapper .swiper-button-next:after,
.datochai-pakar-master-wrapper .swiper-button-prev:after {
  font-size: 18px;
}

/* ═══════════════════════════════════════════
   3. EXPERT CARDS – PREMIUM REDESIGN
   ═══════════════════════════════════════════ */
.datochai-pakar-master-wrapper .pakar-expert-section {
  padding: 100px 0;
  background-color: var(--bg-color);
}
.datochai-pakar-master-wrapper .experts-grid-layout {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 1100px;
  margin: 0 auto;
}
.datochai-pakar-master-wrapper .expert-master-card {
  position: relative;
  padding: 40px;
  border-radius: 20px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.02);
  overflow: hidden;
}
.datochai-pakar-master-wrapper .expert-master-card::before {
  content: "";
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at 70% 30%, currentColor 2%, transparent 3%) 0 0 / 20px 20px,
              linear-gradient(45deg, currentColor 1px, transparent 1px) 0 0 / 30px 30px;
  opacity: 0.04;
  color: var(--text-color);
  pointer-events: none;
}
.datochai-pakar-master-wrapper .expert-top-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  position: relative;
  z-index: 1;
}
.datochai-pakar-master-wrapper .expert-left-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 1px solid var(--border-color);
  padding-right: 30px;
}
.datochai-pakar-master-wrapper .expert-image {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 20px;
  border: 4px solid var(--accent-red);
  box-shadow: 0 0 0 4px var(--bg-color), 0 0 0 6px var(--accent-red);
  transition: transform 0.3s;
}
.datochai-pakar-master-wrapper .expert-image:hover {
  transform: scale(1.05);
}
.datochai-pakar-master-wrapper .expert-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.datochai-pakar-master-wrapper .expert-name {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}
.datochai-pakar-master-wrapper .expert-job {
  font-family: 'Inter', sans-serif;
  color: var(--accent-red);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 25px;
}
.datochai-pakar-master-wrapper .expert-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
  text-align: left;
  width: 100%;
}
.datochai-pakar-master-wrapper .expert-bullet-list li {
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}
.datochai-pakar-master-wrapper .expert-bullet-list li::before {
  content: "◆";
  color: var(--accent-red);
  position: absolute;
  left: 0;
  font-size: 0.6rem;
  top: 0.2rem;
}
.datochai-pakar-master-wrapper .expert-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  background: transparent;
  transition: all 0.3s ease;
}
.datochai-pakar-master-wrapper .expert-social-btn:hover {
  border-color: var(--accent-red);
  background: rgba(211, 47, 47, 0.05);
  color: var(--accent-red);
}
.datochai-pakar-master-wrapper .expert-social-btn svg {
  width: 18px;
  height: 18px;
}
.datochai-pakar-master-wrapper .expert-right-col {
  background: var(--bg-color);
  border-radius: 16px;
  padding: 30px;
  border: 1px dashed var(--border-color);
}
.datochai-pakar-master-wrapper .expert-right-col::before {
  content: "“";
  display: block;
  font-size: 4rem;
  line-height: 0.8;
  color: var(--accent-red);
  font-family: 'Poppins', serif;
  text-align: center;
  margin-bottom: 20px;
}
.datochai-pakar-master-wrapper .expert-detail-p:first-of-type {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 30px;
  text-align: center;
}
.datochai-pakar-master-wrapper .expert-subheading {
  display: inline-block;
  background: var(--accent-red);
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}
.datochai-pakar-master-wrapper .expert-detail-p:last-of-type {
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1rem;
}
.datochai-pakar-master-wrapper .expert-bottom-tags {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.datochai-pakar-master-wrapper .expert-tag {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s;
}
.datochai-pakar-master-wrapper .expert-tag:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: rgba(211, 47, 47, 0.05);
}

/* ═══════════════════════════════════════════
   4. FAQ SECTION
   ═══════════════════════════════════════════ */
.datochai-pakar-master-wrapper .pakar-faq-section { padding: 100px 0; }
.datochai-pakar-master-wrapper .datochai-accordion-wrapper {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.datochai-pakar-master-wrapper .faq-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}
.datochai-pakar-master-wrapper .faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  outline: none;
}
.datochai-pakar-master-wrapper .faq-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-color);
  flex: 1;
}
.datochai-pakar-master-wrapper .faq-question.active .faq-title { color: var(--accent-red); }
.datochai-pakar-master-wrapper .faq-icon {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.datochai-pakar-master-wrapper .faq-question.active .faq-icon {
  transform: rotate(180deg);
  color: var(--accent-red);
}

/* Answer container – fully closed by default */
.datochai-pakar-master-wrapper .faq-answer {
  max-height: 0;
  overflow: hidden;
  margin: 0;                 /* ← kill any browser default margins */
  padding: 0;                /* ← kill any browser default padding */
  transition: max-height 0.4s ease;
}

/* Answer content – hidden until parent expands */
.datochai-pakar-master-wrapper .faq-answer-inner {
  padding: 0 24px 24px 24px;
  font-family: 'Inter', sans-serif;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Dark Mode Overrides */
body.dark-mode .datochai-pakar-master-wrapper .expert-master-card::before {
  opacity: 0.06;
  color: #ffffff;
}
body.dark-mode .datochai-pakar-master-wrapper .expert-master-card,
body.dark-mode .datochai-pakar-master-wrapper .feature-card,
body.dark-mode .datochai-pakar-master-wrapper .faq-item {
  background-color: #1a1a2e !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
body.dark-mode .datochai-pakar-master-wrapper .expert-right-col {
  background: #12121f;
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .datochai-pakar-master-wrapper .expert-top-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .datochai-pakar-master-wrapper .expert-left-col {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-right: 0;
    padding-bottom: 30px;
  }
  .datochai-pakar-master-wrapper .expert-right-col {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  .datochai-pakar-master-wrapper .pakar-hero-title { font-size: 2.2rem; }
  .datochai-pakar-master-wrapper .section-heading { font-size: 1.8rem; }
  .datochai-pakar-master-wrapper .expert-master-card { padding: 25px; }
  .datochai-pakar-master-wrapper .expert-bottom-tags { grid-template-columns: 1fr; }
  .datochai-pakar-master-wrapper .faq-question { padding: 16px 20px; }
  .datochai-pakar-master-wrapper .faq-title { font-size: 0.95rem; }
}


/* =========================================
   FAQ Page – Professional UI
   ========================================= */

.faq-page-view {
  padding: 60px 20px;
}
.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-header {
  text-align: center;
  margin-bottom: 50px;
}
.faq-page-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--text-color);
}
.faq-page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* Search bar */
.faq-search-wrapper {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}
.faq-search-input {
  width: 100%;
  padding: 18px 20px 18px 50px;
  font-size: 1rem;
  border-radius: 30px;
  border: 2px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-color);
  outline: none;
  transition: border-color 0.3s;
}
.faq-search-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(211,47,47,0.1);
}
.faq-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Category groups */
.faq-category-group {
  margin-bottom: 40px;
  text-align: center;
}
.faq-category-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-red);
  display: inline-block;
  color: var(--text-color);
}
.faq-category-desc {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}

/* Accordion */
.faq-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.faq-item {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-item:hover {
  border-color: var(--accent-red);
}
.faq-question {
  padding: 18px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-color);
  outline: none;
}
.faq-question::-webkit-details-marker {
  display: none;
}

/* SVG icon swap */
.faq-icon .icon-minus { display: none; }
details[open] .faq-icon .icon-plus { display: none; }
details[open] .faq-icon .icon-minus { display: inline; }
.faq-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-red);
  transition: transform 0.3s;
}
details[open] .faq-icon svg {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 20px 20px;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px dashed var(--border-color);
  margin-top: 5px;
  padding-top: 15px;
}

/* No results */
.faq-no-results {
  text-align: center;
  padding: 40px;
  background: var(--input-bg);
  border-radius: 8px;
  color: var(--text-muted);
}
.faq-no-results h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

/* Contact CTA */
.faq-contact-cta {
  margin-top: 60px;
  padding: 30px;
  background: var(--header-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
}
.faq-contact-cta h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}
.faq-contact-cta p {
  margin-bottom: 20px;
  color: var(--text-muted);
}
.faq-contact-btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--accent-red);
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.3s;
}
.faq-contact-btn:hover {
  opacity: 0.9;
}

/* ==========================================================================
   GLOBAL GUTENBERG DETAILS (ACCORDION) UI
   ========================================================================== */

/* 1. The Main Box Wrapper */
.wp-block-details {
    background: var(--input-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 0;
}

/* 2. Hover Effect */
.wp-block-details:hover {
    border-color: var(--accent-red, #C8102E);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* 3. The Active/Open State (Adds a subtle red left border for emphasis) */
.wp-block-details[open] {
    border-left: 4px solid var(--accent-red, #C8102E);
    border-color: var(--border-color, #e2e8f0);
}

/* 4. The Question (Summary) */
.wp-block-details summary {
    padding: 18px 50px 18px 20px; /* 50px right padding prevents text from hitting the icon */
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    list-style: none; /* Removes the ugly default black triangle */
    color: var(--text-color, #1e293b);
    position: relative;
    outline: none;
}

/* Hides default triangle specifically for Safari/Chrome */
.wp-block-details summary::-webkit-details-marker {
    display: none;
}

/* 5. The Plus Icon (+) */
.wp-block-details summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    font-weight: 400;
    color: var(--accent-red, #C8102E);
    transition: transform 0.3s ease;
    line-height: 1;
}

/* 6. The Minus Icon (-) When Expanded */
.wp-block-details[open] summary::after {
    content: '−'; /* Using a mathematical minus sign */
    transform: translateY(-50%) rotate(180deg);
}

/* 7. Separator Line between Question and Answer */
.wp-block-details[open] summary {
    border-bottom: 1px dashed var(--border-color, #e2e8f0);
    margin-bottom: 15px;
}

/* 8. The Answer (Content inside the Details block) */
.wp-block-details > *:not(summary) {
    padding: 0 20px 20px 20px;
    color: var(--text-muted, #64748b);
    line-height: 1.8;
    margin: 0;
}

/* ==========================================================================
   GLOBAL GUTENBERG TABLE UI (DatoChai Data Dashboard Style)
   ========================================================================== */

/* 1. The Table Wrapper (Glass-morphism, Red Accent, & Scrollable) */
figure.wp-block-table {
    background: var(--input-bg, #ffffff);
    border-radius: 12px;
    border-top: 4px solid var(--accent-red, #C8102E);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow-x: auto; /* Enables horizontal scroll for mobile */
    margin: 2.5rem 0;
    border-left: 1px solid var(--border-color, #e2e8f0);
    border-right: 1px solid var(--border-color, #e2e8f0);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

/* Custom Horizontal Scrollbar to match the mockup */
figure.wp-block-table::-webkit-scrollbar {
    height: 8px;
}
figure.wp-block-table::-webkit-scrollbar-track {
    background: var(--bg-color, #f1f5f9);
    border-radius: 0 0 12px 12px;
}
figure.wp-block-table::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
figure.wp-block-table::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 2. The Table Element */
figure.wp-block-table table {
    width: 100%;
    min-width: 700px; /* Forces scrollbar to appear on small screens */
    border-collapse: collapse;
    text-align: center;
    margin: 0;
}

/* 3. Table Header (Slate Gray) */
figure.wp-block-table thead th {
    background: #475569; /* Slate Gray */
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 18px 15px;
    border: none;
}

/* 4. Table Body & Alternating Rows */
figure.wp-block-table tbody td {
    padding: 16px 15px;
    font-size: 0.95rem;
    color: var(--text-color, #1e293b);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    vertical-align: middle;
}

/* Make the specific "Nombor" column bold automatically (assuming it's column 3) */
figure.wp-block-table tbody td:nth-child(3) {
    font-weight: 800;
    font-size: 1.1rem;
}

/* Zebra Striping (Alternating Row Colors) */
figure.wp-block-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02); /* Faint gray for even rows */
}
figure.wp-block-table tbody tr:nth-child(odd) {
    background: transparent;
}
figure.wp-block-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Remove bottom border from last row */
figure.wp-block-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   5. STATUS PILL HACKS (Menang vs Tersasar)
   ========================================================================== */

/* GREEN PILL (MENANG): Use Gutenberg "Inline Code" (<>) format */
figure.wp-block-table tbody td code {
    background: #DCFCE7 !important; /* Light Green */
    color: #166534 !important; /* Dark Green */
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.8rem;
    border: 1px solid #bbf7d0;
    letter-spacing: 0.5px;
}

/* GRAY PILL (TERSASAR): Use Gutenberg "Highlight" (Mark) format */
figure.wp-block-table tbody td mark {
    background: #e2e8f0 !important; /* Slate Gray Light */
    color: #475569 !important; /* Slate Gray Dark */
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.8rem;
    border: 1px solid #cbd5e1;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   GLOBAL GUTENBERG CORE BLOCKS (DatoChai Design System)
   ========================================================================== */

/* 1. EXPERT BLOCKQUOTES (Insights & Warnings) */
blockquote.wp-block-quote {
    background: var(--input-bg, #ffffff);
    border-left: 4px solid var(--accent-red, #C8102E);
    border-radius: 0 12px 12px 0;
    padding: 25px 30px;
    margin: 2.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    position: relative;
}
blockquote.wp-block-quote p {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-color, #1e293b);
    line-height: 1.7;
    margin: 0;
}
blockquote.wp-block-quote cite {
    display: block;
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 2. PREMIUM LISTS (Custom Bullets) */
ul.wp-block-list {
    list-style: none; /* Remove default black dots */
    padding-left: 0;
    margin-bottom: 2rem;
}
ul.wp-block-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    color: var(--text-color, #1e293b);
    line-height: 1.7;
}
/* Custom Red Geometric Bullet */
ul.wp-block-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    background: var(--accent-red, #C8102E);
    border-radius: 2px; /* Slightly rounded square */
    box-shadow: 0 2px 5px rgba(200, 16, 46, 0.3);
}

/* 3. INTERACTIVE BUTTONS */
.wp-block-buttons .wp-block-button__link {
    background-color: var(--accent-red, #C8102E) !important;
    color: #ffffff !important;
    border-radius: 8px !important; /* Matches your glass cards */
    padding: 14px 28px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.2) !important;
    border: none !important;
}
.wp-block-buttons .wp-block-button__link:hover {
    transform: translateY(-3px) !important; /* Lifts up */
    box-shadow: 0 8px 20px rgba(200, 16, 46, 0.4) !important; /* Glows red */
}

/* 4. GRADIENT SEPARATORS (Sleek Dividers) */
hr.wp-block-separator {
    border: none !important;
    height: 2px !important;
    /* Fades from transparent -> Red -> transparent */
    background: linear-gradient(90deg, transparent, var(--accent-red, #C8102E), transparent) !important;
    opacity: 0.3;
    margin: 4rem auto;
    width: 80% !important;
}

/* 5. IMAGES (Matches Glass Card Curves) */
figure.wp-block-image img {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

/* ==========================================================================
   GLOBAL GUTENBERG EXTENDED BLOCKS (DatoChai Premium UI)
   ========================================================================== */

/* 1. PULLQUOTE BLOCK (Bold, Magazine-Style Callouts) */
/* Replaces the ugly default top/bottom lines with a beautiful floating glass card */
figure.wp-block-pullquote {
    padding: 45px 30px 30px 30px;
    margin: 3.5rem 0;
    text-align: center;
    border-top: none !important;
    border-bottom: none !important;
    background: var(--input-bg, #ffffff);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
    position: relative;
    border: 1px solid var(--border-color, #e2e8f0);
}
/* Huge decorative quote mark in the background */
figure.wp-block-pullquote::before {
    content: '“';
    font-size: 90px;
    color: var(--accent-red, #C8102E);
    opacity: 0.15;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Georgia', serif;
    line-height: 1;
}
figure.wp-block-pullquote blockquote {
    margin: 0;
    border: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
}
figure.wp-block-pullquote p {
    font-size: 1.5rem !important;
    font-weight: 800;
    color: var(--accent-red, #C8102E);
    line-height: 1.4;
    margin-bottom: 15px;
}
figure.wp-block-pullquote cite {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 2. CODE BLOCK (Data Scientist "Terminal" Look) */
/* Turns plain code blocks into sleek, dark-mode terminal windows */
pre.wp-block-code {
    background: #0f172a !important; /* Deep Slate Dark */
    color: #f8fafc !important; /* Crisp White/Blue */
    border-radius: 8px;
    border: none;
    border-top: 3px solid var(--accent-red, #C8102E);
    padding: 20px 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    overflow-x: auto;
    margin: 2rem 0;
}
pre.wp-block-code code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    background: transparent !important;
    padding: 0;
    color: inherit;
}

/* Custom Scrollbar for Code Blocks */
pre.wp-block-code::-webkit-scrollbar { height: 8px; }
pre.wp-block-code::-webkit-scrollbar-track { background: #1e293b; border-radius: 0 0 8px 8px; }
pre.wp-block-code::-webkit-scrollbar-thumb { background: #475569; border-radius: 8px; }

/* 3. VERSE BLOCK (Poetic/Lyrical Text) */
/* Gives lyrics/verses a soft, indented glass-card look */
pre.wp-block-verse {
    background: var(--input-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 20px 25px;
    font-family: 'Georgia', serif;
    font-style: italic;
    color: var(--text-color);
    box-shadow: inset 4px 0 0 var(--accent-red, #C8102E);
    line-height: 1.8;
    margin: 2rem 0;
    white-space: pre-wrap; /* Ensures text wraps nicely on mobile */
}

/* 4. PREFORMATTED BLOCK (Standard raw text) */
/* Gives raw text a neat, dashed-border notepad look */
pre.wp-block-preformatted {
    background: var(--bg-color, #f1f5f9);
    border: 1px dashed var(--border-color, #cbd5e1);
    border-radius: 8px;
    padding: 20px;
    color: var(--text-muted);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    overflow-x: auto;
    margin: 2rem 0;
}

/* 5. MEDIA & TEXT BLOCK (Image left, text right) */
/* Upgrades the block to match your global glass-morphism cards */
.wp-block-media-text {
    background: var(--input-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.03);
    margin: 2.5rem 0;
}
/* Ensures the text area has proper breathing room */
.wp-block-media-text .wp-block-media-text__content {
    padding: 30px 40px !important;
}
@media (max-width: 600px) {
    .wp-block-media-text .wp-block-media-text__content {
        padding: 20px !important;
    }
}

/* ==========================================================================
   PREMIUM ACCORDION (Gutenberg Accordion Block)
   ========================================================================== */

.wp-block-accordion {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-accordion:hover {
  border-color: var(--accent-red);
  box-shadow: 0 4px 20px rgba(200, 16, 46, 0.15);
}

/* The clickable heading button */
.wp-block-accordion-heading__toggle {
  width: 100%;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  background: var(--input-bg);
  border: none;
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  outline: none;
  transition: background 0.3s ease, color 0.3s ease;
  text-align: left;
}

.wp-block-accordion-heading__toggle:hover {
  background: rgba(200, 16, 46, 0.03);
}

/* Replace the text "+" icon with our red SVG */
.wp-block-accordion-heading__toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 0;            /* hide the default "+" text */
  background-color: var(--accent-red);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") no-repeat center;
  mask-size: contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
  transition: transform 0.3s ease, background-color 0.3s ease;
  flex-shrink: 0;
}

/* When accordion item is open, switch to minus icon */
.wp-block-accordion-item[aria-expanded="true"] .wp-block-accordion-heading__toggle-icon,
.wp-block-accordion-item.is-open .wp-block-accordion-heading__toggle-icon {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") no-repeat center;
  mask-size: contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
  transform: rotate(180deg);
}

/* Content panel */
.wp-block-accordion-item__content {
  padding: 20px 25px 25px 25px;
  color: var(--text-muted);
  
  line-height: 1.7;
  border-top: 1px solid var(--border-color);
}

/* Inner paragraphs spacing */
.wp-block-accordion-item__content p {
  margin-bottom: 15px;
}

/* Mobile optimisation */
@media (max-width: 768px) {
  .wp-block-accordion-heading__toggle {
    padding: 15px 20px;
    font-size: 1rem;
  }
  .wp-block-accordion-item__content {
    padding: 15px 20px 20px 20px;
  }
}












/* ========================================================
   DATOCHAI - PILLAR RESULT PAGES 3-COLUMN LAYOUT
   ======================================================== */

.datochai-pillar-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr 280px; /* Left: 250px, Center: Fluid, Right: 280px */
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: start;
}

/* Proper Sticky Sidebar Logic */
.pillar-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    height: fit-content; 
}

/* Sidebars Base Styling – uses theme variables where available */
.pillar-widget {
    background: var(--header-bg, #ffffff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.widget-title {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-color, #111);
    border-bottom: 2px solid var(--accent-red, #cc0000);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Desktop TOC Area (Forced open, no toggle icon) */
.toc-toggle-btn {
    display: none; 
}
.toc-collapsible-area {
    display: block;
}

/* Right Sidebar: Other Lotteries Buttons */
.other-lotteries-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.lottery-sidebar-btn {
    display: block;
    background: var(--input-bg, #f8f9fa);
    color: var(--text-color, #333);
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-left: 4px solid var(--accent-red, #cc0000);
    transition: all 0.2s ease;
}
.lottery-sidebar-btn:hover {
    background: var(--accent-red, #cc0000);
    color: #fff;
    transform: translateX(3px);
}

/* ========== CENTRE COLUMN FIXES ========== */

/* Force the centre wrapper into the correct grid cell */
.pillar-main-content {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: 100%;
}

/* Centre the page title */
.datochai-title {
    text-align: center;
}

/* Ensure breadcrumbs are always visible and full width */
.datochai-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 24px;           /* prevents zero‑height collapse */
    width: 100%;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-muted, #666);
}

/* Keep the existing red link & separator styling */
.datochai-breadcrumbs a {
    color: var(--accent-red, #cc0000);
    text-decoration: none;
}
.datochai-breadcrumbs a:hover {
    opacity: 0.8;
}
.datochai-breadcrumbs .breadcrumb-separator {
    margin: 0 6px;
    color: var(--accent-red, #cc0000);
    font-size: 16px;
    font-weight: 700;
}
.datochai-breadcrumbs .breadcrumb-separator::before {
    content: "›";
    font-size: 20px;
    vertical-align: middle;
}
.datochai-breadcrumbs .current-page {
    color: var(--text-color, #333);
    font-weight: 700;
}

/* ========== TABLET RESPONSIVENESS (1024px) ========== */
@media (max-width: 1024px) {
    .datochai-pillar-wrapper {
        grid-template-columns: 1fr 250px; 
    }
    .left-sidebar {
        grid-column: 1;
        grid-row: 1;
        position: relative;
        top: 0;
        margin-bottom: -10px; 
    }
    .pillar-main-content {
        grid-column: 1;
        grid-row: 2;
    }
    .right-sidebar {
        grid-column: 2;
        grid-row: 1 / span 2;
        position: sticky;
        top: 100px;
    }
    .left-sidebar .pillar-widget {
        padding: 15px 20px;
    }
    .widget-title.toc-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        margin-bottom: 0; 
        border-bottom: none;
    }
    .toc-toggle-btn {
        display: block;
        font-size: 16px;
        color: var(--accent-red, #cc0000);
        transition: transform 0.3s ease;
    }
    .toc-collapsible-area {
        display: none;
        padding-top: 15px;
        margin-top: 10px;
        border-top: 1px solid var(--border-color, #eee);
    }
    .toc-collapsible-area.active { display: block; }
    .widget-title.toc-title.active .toc-toggle-btn { transform: rotate(180deg); }
}

/* ========== MOBILE RESPONSIVENESS (768px) ========== */
@media (max-width: 768px) {
    .datochai-pillar-wrapper {
        grid-template-columns: 1fr; 
        display: flex;
        flex-direction: column;
    }
    .left-sidebar { order: 1; margin-bottom: 20px; width: 100%; }
    .pillar-main-content { order: 2; width: 100%; }
    .right-sidebar { order: 3; margin-top: 30px; width: 100%; position: relative; top: 0; }
    .other-lotteries-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .lottery-sidebar-btn { 
        flex: 1 1 45%; 
        text-align: center; 
        padding: 12px 10px;
    }
}

/* ========================================================
   DATOCHAI - AUTOMATIC TABLE OF CONTENTS STYLING
   ======================================================== */
.datochai-auto-toc {
    list-style: none;
    padding: 0;
    margin: 0;
}
.datochai-auto-toc li {
    margin-bottom: 8px;
    line-height: 1.4;
}
.datochai-auto-toc a {
    text-decoration: none;
    color: var(--text-color, #444);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: block;
}
.datochai-auto-toc a:hover {
    color: var(--accent-red, #cc0000);
    padding-left: 5px; 
}
.toc-item-h2 { margin-left: 0; margin-top: 15px; }
.toc-item-h2 a { font-weight: 700; color: var(--text-color, #111); }
.toc-item-h3 { margin-left: 15px; }
.toc-item-h3 a { font-size: 13px; font-weight: 500; }
.toc-item-h4 { margin-left: 30px; }
.toc-item-h4 a { font-size: 12px; color: var(--text-muted, #666); font-weight: normal; }