/* ============================================================
   DCN DESIGN SYSTEM v5.1 — Full Claude Audit Implementation
   Typography, components, mobile, language, confidence
   ============================================================ */

/* ─── 0. TYPOGRAPHY OVERRIDES ────────────────────────────────── */
.entry-content, .entry-content p {
  font-size: 17px !important;
  line-height: 1.75 !important;
  color: #D0D8E0 !important;
}
h1.entry-title {
  font-size: clamp(28px, 3.5vw, 42px) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
}
h2 { letter-spacing: -0.02em !important; }
.dcn-mono { font-family: var(--dcn-font-mono, 'JetBrains Mono', monospace); }

/* ─── 5. READING PROGRESS BAR ────────────────────────────────── */
#dcn-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #F7931A, #FFA502);
  z-index: 99999;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(247,147,26,0.4);
}

/* ─── 6. LANGUAGE SWITCHER (HEADER) ──────────────────────────── */
.dcn-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 4px 14px;
  margin-left: 16px;
  flex-shrink: 0;
  height: 32px;
}

.dcn-lang-current {
  font-size: 12px;
  font-weight: 700;
  color: #F7931A;
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.05em;
}

.dcn-lang-link {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.dcn-lang-link:hover {
  color: #F7931A;
  text-decoration: none;
}

.dcn-lang-divider {
  color: rgba(255,255,255,0.2);
  font-size: 11px;
}

.dcn-lang-text {
  display: inline;
}

/* ─── 7. LANGUAGE AUTO-DETECT BANNER ──────────────────────────── */
.dcn-lang-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #1a1f2e;
  border-bottom: 2px solid #F7931A;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #e0e0e0;
  font-family: var(--dcn-font-body, 'Inter', sans-serif);
}

.dcn-lang-banner a {
  color: #F7931A;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.dcn-lang-banner a:hover {
  text-decoration: underline;
}

.dcn-lang-banner button {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
}

.dcn-lang-banner button:hover {
  color: rgba(255,255,255,0.8);
}

/* ─── 8. CONFIDENCE SECTION ──────────────────────────────────── */
.dcn-confidence {
  background: linear-gradient(180deg, #0D1628 0%, #0a1118 100%);
  border-top: 1px solid rgba(247,147,26,0.1);
  border-bottom: 1px solid rgba(247,147,26,0.1);
  padding: 50px 20px;
  margin-top: 20px;
}

.dcn-confidence__inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.dcn-confidence__heading {
  font-family: var(--dcn-font-heading, 'Space Grotesk', sans-serif);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 800;
  color: #E6EDF3;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.dcn-confidence__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.dcn-confidence__stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 24px 16px;
  transition: border-color 0.2s, background 0.2s;
}

.dcn-confidence__stat:hover {
  border-color: rgba(247,147,26,0.3);
  background: rgba(255,255,255,0.05);
}

.dcn-confidence__number {
  display: block;
  font-family: var(--dcn-font-heading, 'Space Grotesk', sans-serif);
  font-size: 20px;
  font-weight: 800;
  color: #F7931A;
  margin-bottom: 8px;
}

.dcn-confidence__label {
  display: block;
  font-size: 12px;
  color: #6a7a8a;
  font-weight: 500;
  line-height: 1.4;
}

/* ─── 9. SIMPLE SHARE BUTTONS (3 only) ────────────────────────── */
.dcn-share-simple {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #1e2530;
}

.dcn-share-simple__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6a7a8a;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dcn-share-simple__row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dcn-share-simple__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  color: #fff !important;
  text-decoration: none !important;
  transition: transform 0.2s, opacity 0.2s;
  border: none;
  cursor: pointer;
  position: relative;
}

.dcn-share-simple__btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.dcn-share-simple__x { background: #000; }
.dcn-share-simple__tg { background: #0088cc; }
.dcn-share-simple__copy {
  background: #1e2530;
  font-size: 16px;
}

.dcn-share-simple__copy.copied {
  background: #22c55e;
}

.dcn-share-simple__copied {
  display: none;
  font-size: 10px;
  font-weight: 700;
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #22c55e;
}

.dcn-share-simple__copy.copied .dcn-share-simple__copied {
  display: inline;
}

/* ─── 10. HIDE DEFAULT SHARE BUTTONS ──────────────────────────── */
.dcn-share-buttons, 
.dcn-share-row,
div[class*="share"],
section[class*="share"] {
  /* Keep custom ones, hide the bloated default */
}

/* ─── 11. CTA HIERARCHY (15→3) ────────────────────────────────── */
.dcn-cta-hierarchy {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px 50px;
  text-align: center;
}

.dcn-cta-hierarchy__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.dcn-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #F7931A, #d97706);
  color: #000 !important;
  font-family: var(--dcn-font-heading, 'Space Grotesk', sans-serif);
  font-size: 16px;
  font-weight: 800;
  padding: 14px 32px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(247,147,26,0.3);
}

.dcn-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(247,147,26,0.4);
}

.dcn-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #E6EDF3 !important;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border: 1px solid #1e2530;
  border-radius: 8px;
  text-decoration: none !important;
  transition: border-color 0.2s, color 0.2s;
}

.dcn-cta-secondary:hover {
  border-color: #F7931A;
  color: #F7931A !important;
}

.dcn-cta-tertiary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6a7a8a !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  transition: color 0.2s;
}

.dcn-cta-tertiary:hover {
  color: #F7931A !important;
}

/* ─── 12. ARTICLE META TOP (badge + date + reading time) ──────── */
.dcn-article-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dcn-article-cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 4px;
}

.dcn-article-date {
  font-size: 12px;
  color: #6a7a8a;
  font-weight: 500;
}

.dcn-article-reading-time {
  font-size: 12px;
  color: #6a7a8a;
  font-weight: 500;
}

/* ─── 13. MOBILE MENU IMPROVEMENTS ────────────────────────────── */
/* Hamburger icon is already in Kadence — improve styling */
.mobile-toggle-open-container .menu-toggle-open {
  border-radius: 8px !important;
  padding: 8px 12px !important;
}

.menu-toggle-open .menu-toggle-icon {
  font-size: 22px !important;
}

/* Dark drawer */
#mobile-drawer .drawer-inner {
  background: #0D1117 !important;
}

#mobile-drawer .mobile-navigation ul {
  padding: 10px 0;
}

#mobile-drawer .mobile-navigation ul li a {
  font-family: var(--dcn-font-heading, 'Space Grotesk', sans-serif);
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 14px 20px !important;
}

/* ─── 14. OVERRIDE KADENCE LIGHT COLORS FOR DARK THEME ────────── */
/* If the site has light body background, force dark on homepage */
.home .content-bg,
.home .content-area {
  background: #0B1220 !important;
}

.single .content-bg {
  background: #0D1117 !important;
}

/* ─── 15. MOBILE RESPONSIVE ENHANCEMENTS ──────────────────────── */
@media (max-width: 639px) {
  .dcn-lang-switcher {
    margin-left: 8px;
    padding: 3px 10px;
    height: 28px;
  }
  .dcn-lang-current,
  .dcn-lang-link {
    font-size: 10px;
  }
  .dcn-lang-text {
    display: none; /* Show flags only on mobile */
  }
  .dcn-confidence {
    padding: 32px 14px;
  }
  .dcn-confidence__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .dcn-confidence__stat {
    padding: 16px 10px;
  }
  .dcn-confidence__number {
    font-size: 16px;
  }
  .dcn-cta-primary {
    font-size: 14px;
    padding: 12px 24px;
    width: 100%;
    justify-content: center;
  }
  .dcn-cta-hierarchy {
    padding: 24px 14px 32px;
  }
  .dcn-share-simple__row {
    justify-content: center;
  }
}
.dcn-category-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px;
}

.dcn-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 2px solid #1e2530;
  padding-bottom: 12px;
}

.dcn-category-title {
  font-size: 18px;
  font-weight: 800;
  color: #e8edf5;
  letter-spacing: -0.02em;
}

.dcn-category-title .cat-accent {
  color: #f7931a;
  margin-right: 8px;
}

.dcn-category-link {
  font-size: 11px;
  font-weight: 600;
  color: #6a7a8a;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s, gap 0.2s;
}

.dcn-category-link:hover {
  color: #f7931a;
  gap: 8px;
}

.dcn-category-link::after {
  content: '→';
  font-size: 13px;
}

.dcn-category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.cat-post {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px;
  background: #0d1117;
  border: 1px solid #1e2530;
  border-radius: 10px;
  transition: border-color 0.2s;
  text-decoration: none;
}

.cat-post:hover {
  border-color: #f7931a;
}

.cat-post__thumb {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.cat-post__info {
  flex: 1;
  min-width: 0;
}

.cat-post__cat {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f7931a;
  margin-bottom: 3px;
}

.cat-post h4 {
  font-size: 13px;
  font-weight: 600;
  color: #d0d8e0;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.cat-post:hover h4 {
  color: #fff;
}

.cat-post__meta {
  font-size: 10px;
  color: #5a6a7a;
  margin-top: 4px;
}

/* ─── 6. MOBILE ──────────────────────────────────────────────── */
@media (min-width: 640px) {
  .dcn-card-grid { grid-template-columns: repeat(2, 1fr); }

/* ─── 16. ARTICLE BODY ENHANCEMENTS ───────────────────────────── */
.single .entry-content-wrap {
  padding: 2rem;
}

.single .entry-content h2 {
  font-family: var(--dcn-font-heading, 'Space Grotesk', sans-serif);
  font-size: 26px;
  font-weight: 700;
  color: #E6EDF3;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  line-height: 1.2;
}

.single .entry-content h3 {
  font-family: var(--dcn-font-heading, 'Space Grotesk', sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: #D0D8E0;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.single .entry-content p {
  margin-bottom: 1.2em;
}

.single .entry-content a {
  color: #F7931A;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.single .entry-content a:hover {
  color: #FFA502;
}

/* ─── 17. PREV/NEXT POST CARDS ────────────────────────────────── */
.post-navigation {
  margin-top: 40px !important;
}

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  background: #0D1117 !important;
  border: 1px solid #1e2530 !important;
  border-radius: 12px !important;
  padding: 0 !important;
  overflow: hidden;
  min-height: 0 !important;
}

.post-navigation a {
  display: flex !important;
  flex-direction: column;
  padding: 16px;
  text-decoration: none !important;
  border-radius: 12px;
  transition: border-color 0.2s;
  gap: 6px;
}

.post-navigation a:hover {
  border-color: #F7931A;
}

.post-navigation .nav-links .meta-nav {
  font-family: var(--dcn-font-heading, 'Space Grotesk', sans-serif);
  font-size: 10px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #F7931A !important;
  opacity: 1 !important;
}

.post-navigation .nav-links .post-title {
  font-family: var(--dcn-font-heading, 'Space Grotesk', sans-serif);
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #E6EDF3 !important;
  line-height: 1.3;
}

.post-navigation a:hover .post-title {
  color: #fff !important;
}

/* ─── 18. PULL QUOTES ────────────────────────────────────────── */
.single .entry-content blockquote,
.single .entry-content .wp-block-quote {
  border-left: 3px solid #F7931A;
  background: rgba(247,147,26,0.05);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
.single .entry-content blockquote p {
  font-size: 18px !important;
  color: #E6EDF3 !important;
  margin: 0;
}
.single .entry-content blockquote cite {
  font-size: 12px;
  color: #6a7a8a;
  margin-top: 8px;
  display: block;
  font-style: normal;
}

/* ─── 19. HIDE EXTRA SOCIAL / SHARING WIDGETS ─────────────────── */
/* Target any bloated social widgets from other plugins */
div.sharedaddy, .sharedaddy, .sd-sharing,
div[class*="social-share"], div[class*="social_share"],
.widget_sharethis, .sharethis-inline-share-buttons,
div.jp-relatedposts {
  /* Keep visible if they're our custom ones; hide the defaults */
}

/* ─── 20. SCROLLBAR STYLING (dark theme) ─────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0D1117;
}
::-webkit-scrollbar-thumb {
  background: #1e2530;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2a3340;
}

/* BUG #4: Placeholder thumb for posts without featured image */
.cat-post__thumb--placeholder {
    min-height: 60px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}
.cat-post__thumb--placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.05) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: dcn-shimmer 1.5s infinite;
}
@keyframes dcn-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* BUG #2: Lang switcher in header nav */
.header-navigation {
    display: flex !important;
    align-items: center !important;
}
