/* ========================================================
   TREBA SOLUTIONS - COMPREHENSIVE HOMEPAGE ENHANCEMENTS CSS
   Modern, Ultra-responsive, Self-contained (CLS = 0, Fast)
   ======================================================== */

:root {
  --tb-blue-600: #2563eb;
  --tb-blue-700: #1d4ed8;
  --tb-indigo-600: #4f46e5;
  --tb-slate-900: #0f172a;
  --tb-slate-800: #1e293b;
  --tb-slate-700: #334155;
  --tb-slate-100: #f1f5f9;
}

/* 1. HERO SECTION */
.tb-hero-section {
  background: radial-gradient(circle at 20% 20%, #1e1b4b 0%, #0f172a 55%, #020617 100%);
  position: relative;
  overflow: hidden;
  padding: 44px 0 60px 0;
  color: #ffffff;
}

.tb-hero-mesh-1 {
  position: absolute;
  top: -120px;
  right: -100px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22) 0%, rgba(99, 102, 241, 0.08) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.tb-hero-mesh-2 {
  position: absolute;
  bottom: -150px;
  left: -80px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.18) 0%, rgba(59, 130, 246, 0.06) 60%, transparent 80%);
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.tb-container {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

.tb-hero-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

@media (min-width: 1024px) {
  .tb-hero-header {
    flex-direction: row;
    align-items: flex-end;
  }
}

.tb-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.tb-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

.tb-hero-title {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.5px;
}

@media (min-width: 640px) {
  .tb-hero-title {
    font-size: 36px;
  }
}

@media (min-width: 1024px) {
  .tb-hero-title {
    font-size: 40px;
  }
}

.tb-hero-subtitle {
  font-size: 14px;
  color: #cbd5e1;
  margin-top: 10px;
  max-width: 640px;
  line-height: 1.5;
}

/* SMART SEARCH BOX */
.tb-search-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  margin-bottom: 34px;
}

.tb-search-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.tb-search-tab-btn {
  background: transparent;
  color: #94a3b8;
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tb-search-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.tb-search-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.tb-search-inputs-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 640px) {
  .tb-search-inputs-row {
    flex-direction: row;
  }
}

.tb-search-field-wrap {
  position: relative;
  flex: 1;
}

.tb-search-field-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #94a3b8;
  pointer-events: none;
}

.tb-hero-section input[type="text"],
.tb-hero-section input.tb-search-field,
#tb-search-input,
.tb-search-field {
  width: 100% !important;
  background: rgba(15, 23, 42, 0.9) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  padding: 14px 18px 14px 48px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 12px !important;
  outline: none !important;
  box-sizing: border-box !important;
  caret-color: #38bdf8 !important;
  transition: all 0.2s ease !important;
}

.tb-hero-section input[type="text"]:focus,
#tb-search-input:focus,
.tb-search-field:focus {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3) !important;
}

.tb-hero-section input[type="text"]::placeholder,
#tb-search-input::placeholder,
.tb-search-field::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

.tb-search-input-box {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

.tb-search-input-box .tb-search-icon {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 16px !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.tb-search-input-box input[type="text"],
.tb-search-input-box .tb-search-input {
  width: 100% !important;
  height: 46px !important;
  padding: 0 16px 0 42px !important;
  font-size: 14px !important;
  border-radius: 10px !important;
  border: 1px solid var(--tb-input-border, #cbd5e1) !important;
  background-color: var(--tb-input-bg, #ffffff) !important;
  color: var(--tb-input-text, #0f172a) !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.dark .tb-search-input-box input[type="text"],
.dark .tb-search-input-box .tb-search-input {
  border-color: #334155 !important;
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

.tb-search-input-box input[type="text"]:focus,
.tb-search-input-box .tb-search-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.tb-search-input-box input[type="text"]::placeholder,
.tb-search-input-box .tb-search-input::placeholder {
  color: #94a3b8 !important;
}

.tb-search-submit-btn {
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.tb-search-submit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.tb-search-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: #94a3b8;
}

.tb-search-tags-row a {
  color: #93c5fd;
  text-decoration: underline;
  cursor: pointer;
}

.tb-search-tags-row a:hover {
  color: #ffffff;
}

/* TOP POSTS GRID IN HERO */
.tb-top-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 1024px) {
  .tb-top-posts-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.tb-glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  transition: border-color 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}

.tb-glass-panel:hover {
  border-color: rgba(96, 165, 250, 0.4);
}

.tb-main-top-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
}

.tb-main-top-thumb {
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 16 / 9;
  max-height: 260px;
}

.tb-main-top-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tb-glass-panel:hover .tb-main-top-thumb img {
  transform: scale(1.04);
}

.tb-sub-top-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  justify-content: space-between;
}

.tb-sub-top-card {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 14px;
}

.tb-sub-top-card:hover {
  transform: translateX(3px);
}

.tb-sub-top-thumb {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tb-sub-top-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 2. STATS TRUST BAR */
.tb-trust-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 24px;
  margin-top: -30px;
  margin-bottom: 34px;
  position: relative;
  z-index: 20;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
}

.dark .tb-trust-bar {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.tb-trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .tb-trust-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.tb-trust-item {
  text-align: center;
  padding: 4px 8px;
}

.tb-trust-num {
  font-size: 24px;
  font-weight: 800;
  color: #2563eb;
  line-height: 1.1;
}

.dark .tb-trust-num {
  color: #60a5fa;
}

.tb-trust-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dark .tb-trust-lbl {
  color: #94a3b8;
}

/* 3. SECTION WRAPPER & HEADERS */
.tb-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
  .tb-section-card {
    padding: 32px;
  }
}

.dark .tb-section-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.tb-section-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .tb-section-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.tb-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tb-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.tb-section-h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.dark .tb-section-h2 {
  color: #f8fafc;
}

.tb-section-sub {
  font-size: 13px;
  color: #64748b;
  margin-top: 3px;
}

.dark .tb-section-sub {
  color: #94a3b8;
}

.tb-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
  padding: 8px 14px;
  border-radius: 8px;
  background: #eff6ff;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.dark .tb-more-link {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
}

.tb-more-link:hover {
  background: #2563eb;
  color: #ffffff;
}

/* 4. CATEGORIES GRID (6 PER ROW ON DESKTOP, COMPACT WITHOUT COUNT) */
.tb-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 480px) {
  .tb-cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .tb-cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .tb-cat-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.tb-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 84px;
}

.dark .tb-cat-card {
  background: #0f172a;
  border-color: #334155;
}

.tb-cat-card:hover {
  background: #ffffff;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(37, 99, 235, 0.15);
}

.dark .tb-cat-card:hover {
  background: #1e293b;
  border-color: #60a5fa;
  box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.35);
}

.tb-cat-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 8px;
}

.tb-cat-name {
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
  line-height: 1.3;
  word-break: break-word;
}

.dark .tb-cat-name {
  color: #f1f5f9;
}

.tb-cat-card:hover .tb-cat-name {
  color: #2563eb;
}

.dark .tb-cat-card:hover .tb-cat-name {
  color: #60a5fa;
}

/* 5. THEMATIC CALCULATORS STYLES */
.tb-calc-box {
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  padding: 24px;
  color: #ffffff;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
  .tb-calc-box {
    padding: 32px;
  }
}

.tb-calc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tb-calc-tab-btn {
  background: transparent;
  color: #94a3b8;
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.tb-calc-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.tb-calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .tb-calc-grid {
    grid-template-columns: 1.25fr 1fr;
  }
}

.tb-calc-form-panel {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
}

.tb-calc-group {
  margin-bottom: 16px;
}

.tb-calc-lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.tb-calc-select, .tb-calc-input {
  width: 100%;
  background: #0f172a;
  color: #ffffff;
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  outline: none;
  box-sizing: border-box;
}

.tb-calc-select:focus, .tb-calc-input:focus {
  border-color: #3b82f6;
}

.tb-grade-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

@media (max-width: 640px) {
  .tb-grade-selector {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tb-grade-btn {
  background: #0f172a;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.tb-grade-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.tb-calc-dashboard {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tb-calc-big-num {
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -1px;
}

.tb-calc-uah-num {
  font-size: 17px;
  font-weight: 700;
  color: #34d399;
  margin-top: 4px;
}

.tb-calc-bar {
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
}

.tb-calc-bar-val {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 4px;
}

.tb-calc-mini-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.tb-calc-pill {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
}

.tb-calc-pill-title {
  font-size: 10px;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
}

.tb-calc-pill-amount {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

.tb-calc-skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tb-calc-skill-badge {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
}

/* 6. EXPANDED ARTICLES (12 POSTS GRID) */
.tb-posts-expanded-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .tb-posts-expanded-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tb-posts-expanded-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tb-post-card-modern {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  height: 100%;
}

.dark .tb-post-card-modern {
  background: #0f172a;
  border-color: #334155;
}

.tb-post-card-modern:hover {
  transform: translateY(-3px);
  border-color: #3b82f6;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.dark .tb-post-card-modern:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.tb-post-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
}

.tb-post-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tb-post-card-modern:hover .tb-post-card-thumb-wrap img {
  transform: scale(1.05);
}

.tb-post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.tb-post-card-cat-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #2563eb;
  letter-spacing: 0.5px;
}

.dark .tb-post-card-cat-badge {
  color: #60a5fa;
}

.tb-post-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 6px 0 12px 0;
  line-height: 1.35;
}

.dark .tb-post-card-title {
  color: #f1f5f9;
}

.tb-post-card-modern:hover .tb-post-card-title {
  color: #2563eb;
}

.dark .tb-post-card-modern:hover .tb-post-card-title {
  color: #60a5fa;
}

.tb-post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.dark .tb-post-card-footer {
  border-color: #1e293b;
  color: #94a3b8;
}

/* 7. DICTIONARY WEEK HIGHLIGHT GRID */
.tb-dict-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .tb-dict-quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .tb-dict-quick-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.tb-dict-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.dark .tb-dict-chip {
  background: #0f172a;
  border-color: #334155;
}

.tb-dict-chip:hover {
  border-color: #f59e0b;
  background: #ffffff;
  transform: translateY(-2px);
}

.dark .tb-dict-chip:hover {
  background: #1e293b;
}

.tb-dict-chip-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.dark .tb-dict-chip-title {
  color: #f8fafc;
}

.tb-dict-chip:hover .tb-dict-chip-title {
  color: #d97706;
}

.tb-dict-chip-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* 8. NEWSLETTER / TELEGRAM CTA */
.tb-cta-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
  border-radius: 18px;
  padding: 30px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .tb-cta-banner {
    flex-direction: row;
  }
}

.tb-cta-btn {
  background: #ffffff;
  color: #1e3a8a;
  font-weight: 800;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.tb-cta-btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

/* ==========================================================================
   SIDEBAR MODERN ENHANCEMENTS (tb-sb-*)
   ========================================================================== */
.tb-sb-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.dark .tb-sb-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.25);
}

.tb-sb-card:hover {
  border-color: #cbd5e1;
}

.dark .tb-sb-card:hover {
  border-color: #475569;
}

/* Gradient variation (for Quick Tools) */
.tb-sb-card-gradient {
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 100%) !important;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.15) !important;
}

.tb-sb-card-gradient .tb-sb-title,
.dark .tb-sb-card-gradient .tb-sb-title,
html.dark .tb-sb-card-gradient .tb-sb-title,
aside .tb-sb-card-gradient h3 {
  color: #ffffff !important;
}

.tb-sb-card-gradient .tb-sb-subtitle,
.dark .tb-sb-card-gradient .tb-sb-subtitle,
html.dark .tb-sb-card-gradient .tb-sb-subtitle {
  color: #a5b4fc !important;
}

.tb-sb-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.dark .tb-sb-header {
  border-bottom-color: #334155;
}

.tb-sb-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tb-sb-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.dark .tb-sb-title {
  color: #f1f5f9;
}

.tb-sb-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.dark .tb-sb-subtitle {
  color: #94a3b8;
}

/* --- 1. Popular Articles List --- */
.tb-sb-posts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tb-sb-post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.tb-sb-post-item:hover {
  background: #f8fafc;
  transform: translateX(3px);
}

.dark .tb-sb-post-item:hover {
  background: #0f172a;
}

.tb-sb-thumb-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  min-width: 68px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
}

.dark .tb-sb-thumb-wrap {
  background: #0f172a;
}

.tb-sb-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tb-sb-post-item:hover .tb-sb-thumb-wrap img {
  transform: scale(1.08);
}

.tb-sb-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.tb-sb-rank-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.tb-sb-rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.tb-sb-rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.tb-sb-rank-3 { background: linear-gradient(135deg, #d97706, #b45309); }
.tb-sb-rank-4, .tb-sb-rank-5 { background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(4px); }

.tb-sb-post-info {
  flex: 1;
  min-width: 0;
}

.tb-sb-post-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #1e293b;
  margin: 0 0 6px 0;
  transition: color 0.2s ease;
}

.dark .tb-sb-post-title {
  color: #e2e8f0;
}

.tb-sb-post-item:hover .tb-sb-post-title {
  color: #2563eb;
}

.dark .tb-sb-post-item:hover .tb-sb-post-title {
  color: #60a5fa;
}

.tb-sb-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #64748b;
}

.dark .tb-sb-post-meta {
  color: #94a3b8;
}

/* --- 2. Quick Tools Widget --- */
.tb-sb-tools-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tb-sb-tool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-decoration: none;
  color: #ffffff;
  transition: all 0.2s ease;
}

.tb-sb-tool-item:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(129, 140, 248, 0.4);
  transform: translateX(4px);
}

.tb-sb-tool-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.tb-sb-tool-content {
  flex: 1;
  min-width: 0;
}

.tb-sb-tool-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.tb-sb-tool-desc {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 2px;
}

.tb-sb-tool-arrow {
  color: #818cf8;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.tb-sb-tool-item:hover .tb-sb-tool-arrow {
  transform: translateX(3px);
  color: #a5b4fc;
}

/* --- 3. Dictionary Spotlight --- */
.tb-sb-dict-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  transition: all 0.2s ease;
}

.dark .tb-sb-dict-box {
  background: #0f172a;
  border-color: #334155;
}

.tb-sb-dict-tag {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.dark .tb-sb-dict-tag {
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
}

.tb-sb-dict-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.tb-sb-dict-title a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dark .tb-sb-dict-title a {
  color: #f1f5f9;
}

.tb-sb-dict-title a:hover {
  color: #2563eb;
}

.dark .tb-sb-dict-title a:hover {
  color: #60a5fa;
}

.tb-sb-dict-text {
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 10px 0;
}

.dark .tb-sb-dict-text {
  color: #94a3b8;
}

.tb-sb-dict-footer {
  display: flex;
  justify-content: flex-end;
}

.tb-sb-dict-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  transition: gap 0.2s ease;
}

.dark .tb-sb-dict-btn {
  color: #60a5fa;
}

.tb-sb-dict-btn:hover {
  gap: 7px;
}

.tb-sb-link-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  transition: all 0.2s ease;
}

.dark .tb-sb-link-all {
  color: #cbd5e1;
  background: #0f172a;
}

.tb-sb-link-all:hover {
  background: #e2e8f0;
  color: #2563eb;
}

.dark .tb-sb-link-all:hover {
  background: #334155;
  color: #60a5fa;
}

/* --- 4. Tags / Topics Cloud --- */
.tb-sb-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tb-sb-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dark .tb-sb-tag {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

.tb-sb-tag:hover {
  background: #ffffff;
  border-color: #3b82f6;
  color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
}

.dark .tb-sb-tag:hover {
  background: #1e293b;
  border-color: #60a5fa;
  color: #60a5fa;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* --- 5. Company List --- */
.tb-sb-comps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tb-sb-comp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.tb-sb-comp-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  transform: translateX(3px);
}

.dark .tb-sb-comp-item:hover {
  background: #0f172a;
  border-color: #334155;
}

.tb-sb-comp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dark .tb-sb-comp-avatar {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.tb-sb-comp-info {
  flex: 1;
  min-width: 0;
}

.tb-sb-comp-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.dark .tb-sb-comp-name {
  color: #f1f5f9;
}

.tb-sb-comp-item:hover .tb-sb-comp-name {
  color: #2563eb;
}

.dark .tb-sb-comp-item:hover .tb-sb-comp-name {
  color: #60a5fa;
}

.tb-sb-comp-city {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.dark .tb-sb-comp-city {
  color: #94a3b8;
}

.tb-sb-comp-arrow {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.tb-sb-comp-item:hover .tb-sb-comp-arrow {
  transform: translateX(3px);
  color: #2563eb;
}

.dark .tb-sb-comp-item:hover .tb-sb-comp-arrow {
  color: #60a5fa;
}

/* --- 6. Vote / Poll Block --- */
.tb-sb-vote-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tb-sb-vote-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  transition: all 0.2s ease;
}

.dark .tb-sb-vote-item {
  background: #0f172a;
  color: #e2e8f0;
}

.tb-sb-vote-item:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.dark .tb-sb-vote-item:hover {
  background: #334155;
  border-color: #475569;
}

.tb-sb-vote-item.border-green-500 {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

.tb-sb-vote-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  transition: width 0.4s ease;
  pointer-events: none;
}

.dark .tb-sb-vote-progress {
  background: rgba(16, 185, 129, 0.35);
}

.tb-sb-vote-label {
  position: relative;
  z-index: 2;
}

.tb-sb-vote-count {
  position: relative;
  z-index: 2;
  font-size: 12px;
  font-weight: 700;
  color: #059669;
}

.dark .tb-sb-vote-count {
  color: #34d399;
}

.tb-sb-vote-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.dark .tb-sb-vote-footer {
  border-top-color: #334155;
  color: #94a3b8;
}

/* --- 7. Menu Lists --- */
.tb-sb-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tb-sb-menu-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dark .tb-sb-menu-list li a {
  color: #cbd5e1;
}

.tb-sb-menu-list li a:hover {
  background: #f8fafc;
  color: #2563eb;
  transform: translateX(3px);
}

.dark .tb-sb-menu-list li a:hover {
  background: #0f172a;
  color: #60a5fa;
}

/* --- Countdown Block (Скільки днів до...) --- */
.tb-sb-countdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tb-sb-countdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.dark .tb-sb-countdown-item {
  background: #0f172a;
  border-color: #334155;
}

.tb-sb-countdown-item:hover {
  background: #ffffff;
  border-color: #ec4899;
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.12);
}

.dark .tb-sb-countdown-item:hover {
  background: #1e293b;
  border-color: #f472b6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tb-sb-countdown-emoji {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.tb-sb-countdown-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.dark .tb-sb-countdown-name {
  color: #e2e8f0;
}

.tb-sb-countdown-item:hover .tb-sb-countdown-name {
  color: #ec4899;
}

.dark .tb-sb-countdown-item:hover .tb-sb-countdown-name {
  color: #f472b6;
}

.tb-sb-countdown-arrow {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.tb-sb-countdown-item:hover .tb-sb-countdown-arrow {
  transform: translateX(3px);
  color: #ec4899;
}

.dark .tb-sb-countdown-item:hover .tb-sb-countdown-arrow {
  color: #f472b6;
}

/* ==========================================================================
   SINGLE ARTICLE ENHANCEMENTS (UX & RETENTION)
   ========================================================================== */

/* Reading Progress Bar (Fixed Top) */
#tb-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3.5px;
  background: linear-gradient(90deg, #2563eb, #8b5cf6, #ec4899);
  z-index: 99999;
  transition: width 0.08s linear;
}

/* Single Container Card */
.tb-single-article-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px 20px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
  .tb-single-article-card {
    padding: 36px 40px;
  }
}

.dark .tb-single-article-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.3);
}

/* Breadcrumbs Top */
.tb-single-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

.dark .tb-single-breadcrumbs {
  color: #94a3b8;
}

.tb-single-breadcrumbs a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dark .tb-single-breadcrumbs a {
  color: #94a3b8;
}

.tb-single-breadcrumbs a:hover {
  color: #2563eb;
}

.dark .tb-single-breadcrumbs a:hover {
  color: #60a5fa;
}

.tb-single-breadcrumbs-sep {
  opacity: 0.5;
}

/* Header & Meta */
.tb-single-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.dark .tb-single-cat-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.tb-single-cat-badge:hover {
  background: #2563eb;
  color: #ffffff;
  transform: translateY(-1px);
}

.tb-single-h1 {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.28;
  color: #0f172a;
  margin: 0 0 16px 0;
  letter-spacing: -0.015em;
}

@media (min-width: 768px) {
  .tb-single-h1 {
    font-size: 32px;
  }
}

.dark .tb-single-h1 {
  color: #f1f5f9;
}

.tb-single-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 20px;
  font-size: 13px;
  color: #64748b;
}

.dark .tb-single-meta-bar {
  border-bottom-color: #334155;
  color: #94a3b8;
}

.tb-single-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Author byline inside header */
.tb-single-author-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 24px;
}

.dark .tb-single-author-byline {
  background: #0f172a;
  border-color: #334155;
}

.tb-single-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tb-single-author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

/* Hero Image */
.tb-single-hero-img-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 28px;
  background: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.dark .tb-single-hero-img-wrap {
  border-color: #334155;
}

.tb-single-hero-img-wrap img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.tb-single-hero-caption {
  padding: 8px 14px;
  font-size: 12px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  font-style: italic;
}

/* Table of Contents (Зміст) */
.tb-single-toc {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #2563eb;
  border-radius: 14px;
  padding: 18px 22px;
  margin: 24px 0 32px 0;
}

.dark .tb-single-toc {
  background: #0f172a;
  border-color: #334155;
  border-left-color: #3b82f6;
}

.tb-single-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 16px;
  color: #0f172a;
}

.dark .tb-single-toc-header {
  color: #f1f5f9;
}

.single-subjects-inner {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-counter;
}

.single-subjects-inner li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.45;
  counter-increment: toc-counter;
}

.single-subjects-inner li::before {
  content: counter(toc-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: #2563eb;
  font-size: 13px;
}

.dark .single-subjects-inner li::before {
  color: #60a5fa;
}

.single-subjects-inner a {
  color: #334155;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dark .single-subjects-inner a {
  color: #cbd5e1;
}

.single-subjects-inner a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.dark .single-subjects-inner a:hover {
  color: #60a5fa;
}

/* Article Body Typography */
.tb-article-body {
  font-size: 16px;
  line-height: 1.75;
  color: #334155;
}

@media (min-width: 768px) {
  .tb-article-body {
    font-size: 17px;
  }
}

.dark .tb-article-body {
  color: #cbd5e1;
}

.tb-article-body p {
  margin-bottom: 22px;
}

.tb-article-body h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 36px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
  line-height: 1.35;
  scroll-margin-top: 50px;
}

@media (min-width: 768px) {
  .tb-article-body h2 {
    font-size: 25px;
  }
}

.dark .tb-article-body h2 {
  color: #f1f5f9;
  border-bottom-color: #334155;
}

.tb-article-body h3 {
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  margin: 28px 0 12px 0;
  line-height: 1.4;
  scroll-margin-top: 50px;
}

@media (min-width: 768px) {
  .tb-article-body h3 {
    font-size: 21px;
  }
}

.dark .tb-article-body h3 {
  color: #f1f5f9;
}

.tb-article-body ul,
.tb-article-body ol {
  margin: 0 0 22px 20px;
  padding-left: 10px;
}

.tb-article-body li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.tb-article-body blockquote {
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 26px 0;
  font-style: italic;
  color: #1e293b;
}

.dark .tb-article-body blockquote {
  background: #0f172a;
  color: #e2e8f0;
}

.tb-article-body img {
  border-radius: 14px;
  margin: 24px auto;
  max-width: 100%;
  height: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.tb-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0;
  border-radius: 12px;
  overflow-x: auto;
  display: block;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
}

.tb-article-body iframe,
.tb-article-body video {
  max-width: 100% !important;
  border-radius: 12px;
}

.tb-article-body pre,
.tb-article-body code {
  max-width: 100%;
  overflow-x: auto;
}

.dark .tb-article-body table {
  border-color: #334155;
}

.tb-article-body th {
  background: #f1f5f9;
  color: #0f172a;
  padding: 12px 16px;
  font-weight: 700;
  text-align: left;
}

.dark .tb-article-body th {
  background: #0f172a;
  color: #f1f5f9;
}

.tb-article-body td {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
}

.dark .tb-article-body td {
  border-top-color: #334155;
}

/* Micro-Engagement Feedback Widget */
.tb-article-feedback-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 20px;
  margin: 32px 0;
  text-align: center;
}

.dark .tb-article-feedback-box {
  background: #0f172a;
  border-color: #475569;
}

.tb-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 6px 4px;
}

.dark .tb-feedback-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.tb-feedback-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  transform: translateY(-2px);
}

.tb-feedback-btn.active {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
}

/* Retention Banner: Tools & Calculators */
.tb-article-tools-banner {
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 18px;
  padding: 24px;
  margin: 36px 0;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.15);
}

.tb-article-tools-banner a {
  text-decoration: none;
}

.tb-article-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.tb-article-tool-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #ffffff;
  transition: all 0.2s ease;
}

.tb-article-tool-pill:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(129, 140, 248, 0.4);
  transform: translateY(-2px);
}

/* Author Box Card */
.tb-author-box-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  margin: 32px 0;
}

.dark .tb-author-box-card {
  background: #0f172a;
  border-color: #334155;
}

/* Prev / Next Article Navigation */
.tb-post-nav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 32px 0;
}

@media (min-width: 640px) {
  .tb-post-nav-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tb-post-nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

.dark .tb-post-nav-card {
  background: #1e293b;
  border-color: #334155;
}

.tb-post-nav-card:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.12);
}

.dark .tb-post-nav-card:hover {
  border-color: #60a5fa;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.3);
}

.tb-post-nav-thumb {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
}

.dark .tb-post-nav-thumb {
  background: #0f172a;
}

.tb-post-nav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Related Posts Section */
.tb-related-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.04);
}

.dark .tb-related-card {
  background: #1e293b;
  border-color: #334155;
}

.tb-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .tb-related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.single-subjects.tb-single-toc[style*="inline-block"],
.single-subjects.tb-single-toc[style*="block"] {
  display: block !important;
}

/* ==========================================================================
   BLOG ARCHIVE & PAGINATION ENHANCEMENTS (page-blog.php)
   ========================================================================== */
.tb-blog-catalog-header {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
  .tb-blog-catalog-header {
    padding: 32px;
  }
}

.dark .tb-blog-catalog-header {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.25);
}

.tb-blog-title-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.tb-blog-h1 {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin: 0 0 6px 0;
}

@media (min-width: 768px) {
  .tb-blog-h1 {
    font-size: 32px;
  }
}

.dark .tb-blog-h1 {
  color: #f1f5f9;
}

.tb-blog-sub {
  font-size: 14px;
  color: #64748b;
  max-width: 650px;
  line-height: 1.5;
}

.dark .tb-blog-sub {
  color: #94a3b8;
}

.tb-blog-stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.dark .tb-blog-stats-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

/* Category Filter Chips Bar */
.tb-blog-cats-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  margin-top: 14px;
  border-top: 1px solid #f1f5f9;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tb-blog-cats-bar::-webkit-scrollbar {
  display: none;
}

.dark .tb-blog-cats-bar {
  border-top-color: #334155;
}

.tb-blog-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.dark .tb-blog-cat-chip {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

.tb-blog-cat-chip:hover {
  background: #ffffff;
  border-color: #3b82f6;
  color: #2563eb;
  transform: translateY(-1px);
}

.dark .tb-blog-cat-chip:hover {
  background: #1e293b;
  border-color: #60a5fa;
  color: #60a5fa;
}

.tb-blog-cat-chip.active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

/* 40 Posts Grid */
.tb-blog-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 36px;
}

@media (min-width: 640px) {
  .tb-blog-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tb-blog-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Pagination Wrap & Elements */
.tb-pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px 0 20px 0;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.04);
}

.dark .tb-pagination-wrap {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.25);
}

.tb-pagination-wrap .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dark .tb-pagination-wrap .page-numbers {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

.tb-pagination-wrap .page-numbers:hover {
  background: #ffffff;
  border-color: #2563eb;
  color: #2563eb;
  transform: translateY(-1px);
}

.dark .tb-pagination-wrap .page-numbers:hover {
  background: #1e293b;
  border-color: #60a5fa;
  color: #60a5fa;
}

.tb-pagination-wrap .page-numbers.current {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.tb-pagination-wrap .page-numbers.dots {
  border: none;
  background: transparent;
  color: #94a3b8;
}

.tb-pagination-wrap .page-numbers.prev,
.tb-pagination-wrap .page-numbers.next {
  padding: 0 16px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   IT HOLIDAYS WIDGET STYLES (COMPACT & BEAUTIFULLY PROPORTIONED)
   -------------------------------------------------------------------------- */
.tb-sb-holiday-card {
  position: relative;
  overflow: hidden;
}

.tb-sb-holiday-card-inner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  transition: all 0.2s ease;
}

.dark .tb-sb-holiday-card-inner {
  background: rgba(15, 23, 42, 0.6);
  border-color: #334155;
}

.tb-sb-holiday-card.is-holiday-today .tb-sb-holiday-card-inner {
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.05) 0%, rgba(99, 102, 241, 0.03) 100%), #ffffff;
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 4px 14px -2px rgba(236, 72, 153, 0.1);
}

.dark .tb-sb-holiday-card.is-holiday-today .tb-sb-holiday-card-inner {
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.12) 0%, rgba(30, 41, 59, 0.7) 100%), #0f172a;
  border-color: rgba(236, 72, 153, 0.35);
}

.tb-sb-holiday-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.tb-sb-holiday-emoji-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dark .tb-sb-holiday-emoji-wrap {
  background: #1e293b;
  border-color: #334155;
}

.tb-holiday-pulse-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: rgba(236, 72, 153, 0.12);
  color: #db2777;
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.dark .tb-holiday-pulse-pill {
  background: rgba(244, 114, 182, 0.2);
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.35);
}

.tb-pulse-dot-pink {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7);
  animation: tbPulsePink 1.8s infinite;
}

@keyframes tbPulsePink {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(236, 72, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

.tb-holiday-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.dark .tb-holiday-countdown-pill {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.tb-sb-holiday-name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--tb-text-head, #0f172a);
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.dark .tb-sb-holiday-name {
  color: #f8fafc;
}

.tb-sb-holiday-text {
  font-size: 12px;
  line-height: 1.48;
  color: var(--tb-text-body, #64748b);
  margin: 0 0 12px 0;
}

.dark .tb-sb-holiday-text {
  color: #94a3b8;
}

.tb-sb-holiday-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background: #ec4899;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.25);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.tb-sb-holiday-btn:hover {
  background: #db2777;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.35);
}

.tb-sb-holiday-mini-fact {
  font-size: 11px;
  line-height: 1.45;
  color: var(--tb-text-muted, #64748b);
  border-top: 1px dashed #e2e8f0;
  padding-top: 8px;
  margin-top: 4px;
}

.dark .tb-sb-holiday-mini-fact {
  border-top-color: #334155;
  color: #94a3b8;
}

/* --------------------------------------------------------------------------
   CITY & CITY-SERVICE STYLES
   -------------------------------------------------------------------------- */
.tb-city-service-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dark .tb-city-service-pill {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.tb-city-service-pill:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.dark .tb-city-service-pill:hover {
  background: #243247;
  border-color: #60a5fa;
  color: #93c5fd;
}

.tb-city-service-icon {
  font-size: 14px;
  color: #f59e0b;
  flex-shrink: 0;
}

.tb-city-service-title {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.tb-city-service-arrow {
  color: #94a3b8;
  font-size: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.tb-city-service-pill:hover .tb-city-service-arrow {
  transform: translateX(3px);
  color: #2563eb;
}

.tb-market-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

@media (min-width: 768px) {
  .tb-market-metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tb-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.dark .tb-metric-card {
  background: #1e293b;
  border-color: #334155;
}

.tb-metric-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.dark .tb-metric-lbl {
  color: #94a3b8;
}

.tb-metric-val {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.dark .tb-metric-val {
  color: #f8fafc;
}
