/*
Theme Name: HealthDoyen 2026
Theme URI: https://www.healthdoyen.com/
Author: Health Doyen Editorial Team & Technical Architecture
Author URI: https://www.healthdoyen.com/
Description: Ultra-lightweight, dependency-free, high-performance health & nutrition theme built for Core Web Vitals (100 PageSpeed, 0.00 CLS), semantic technical SEO, and native zero-shift AdSense integration. Harmonized with official Health Doyen Medical Blue branding.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: healthdoyen-2026
*/

/* ==========================================================================
   1. CSS Custom Properties (:root) & System Design Tokens (Medical Blue Palette)
   ========================================================================== */
:root {
  /* Color Palette - Harmonized with LOGO.png */
  --hd-bg-main: #ffffff;
  --hd-bg-soft: #f8fafc;
  --hd-bg-subtle: #f1f5f9;
  --hd-text-heading: #0f172a; /* Slate 900 */
  --hd-text-body: #334155;    /* Slate 700 */
  --hd-text-muted: #64748b;   /* Slate 500 */
  --hd-text-light: #94a3b8;   /* Slate 400 */

  /* Official Brand Blue Spectrum (Matching LOGO.png) */
  --hd-brand-blue: #0284c7;        /* Medical Sky/Ocean Blue (Logo Center) */
  --hd-brand-blue-dark: #0369a1;   /* Deep Ocean Blue for links / hover */
  --hd-brand-blue-deep: #1d4ed8;   /* Royal Sapphire (Logo Bottom Right) */
  --hd-brand-blue-soft: #f0f9ff;   /* Soft Icy Blue for tags / active pill */
  --hd-brand-cyan: #38bdf8;        /* Vibrant Electric Cyan (Logo Leaf Tip) */
  --hd-brand-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 60%, #1d4ed8 100%);

  /* Functional Accents */
  --hd-accent-green: #16a34a;      /* Evidence-based verification */
  --hd-accent-amber: #d97706;      /* Warning / Recipe warm card */
  --hd-border: #e2e8f0;
  --hd-border-blue: #bae6fd;
  --hd-border-subtle: #f1f5f9;
  --hd-border-dark: #cbd5e1;

  /* Typography Stacks */
  --hd-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hd-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Fluid Typography */
  --hd-font-size-base: clamp(1.0625rem, 1vw + 0.85rem, 1.125rem); /* ~17px mobile -> 18px desktop */
  --hd-line-height-body: 1.75;
  --hd-font-size-h1: clamp(1.85rem, 3.5vw, 2.65rem);
  --hd-font-size-h2: clamp(1.45rem, 2.5vw, 1.95rem);
  --hd-font-size-h3: clamp(1.2rem, 1.8vw, 1.45rem);
  --hd-font-size-h4: 1.125rem;

  /* Layout Widths */
  --hd-max-w-header: 1200px;
  --hd-max-w-layout: 1140px;
  --hd-max-w-article: 740px;
  --hd-sidebar-w: 300px;
  --hd-header-h: 68px;

  /* Transitions & Shadows */
  --hd-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --hd-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --hd-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --hd-radius-sm: 4px;
  --hd-radius-md: 8px;
  --hd-radius-lg: 12px;
  --hd-transition: 0.18s ease-in-out;
}

/* ==========================================================================
   2. Modern Reset & Base Elements
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--hd-bg-main);
  color: var(--hd-text-body);
  font-family: var(--hd-font-sans);
  font-size: var(--hd-font-size-base);
  line-height: var(--hd-line-height-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--hd-brand-blue-dark);
  text-decoration: none;
  transition: color var(--hd-transition);
}

a:hover, a:focus-visible {
  color: var(--hd-brand-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--hd-text-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--hd-font-size-h1); }
h2 { font-size: var(--hd-font-size-h2); }
h3 { font-size: var(--hd-font-size-h3); }
h4 { font-size: var(--hd-font-size-h4); }

ul, ol {
  padding-left: 1.5rem;
}

/* ==========================================================================
   3. Single-Row Sticky Header (header.php)
   ========================================================================== */
.hd-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--hd-header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hd-border);
  display: flex;
  align-items: center;
}

.hd-header-inner {
  width: 100%;
  max-width: var(--hd-max-w-header);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Brand Logo (Image + Typography) */
.hd-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--hd-text-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.hd-brand:hover {
  text-decoration: none;
}

.hd-brand-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.hd-brand-accent {
  color: var(--hd-brand-blue);
  margin-left: 1px;
}

/* Primary Navigation (Strictly 5 items, Single DOM) */
.hd-nav {
  display: flex;
  align-items: center;
}

.hd-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.hd-nav-link {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--hd-text-body);
  text-decoration: none;
  border-radius: var(--hd-radius-sm);
  transition: background-color var(--hd-transition), color var(--hd-transition);
}

.hd-nav-link:hover,
.hd-nav-link:focus-visible,
.hd-nav-item.current-menu-item .hd-nav-link,
.hd-nav-item.current-page-ancestor .hd-nav-link {
  color: var(--hd-brand-blue);
  background-color: var(--hd-brand-blue-soft);
  text-decoration: none;
}

/* Header Right Actions (Search & Mobile Toggle) */
.hd-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hd-action-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--hd-radius-md);
  color: var(--hd-text-body);
  cursor: pointer;
  padding: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--hd-transition);
}

.hd-action-btn:hover {
  background-color: var(--hd-brand-blue-soft);
  border-color: var(--hd-border-blue);
  color: var(--hd-brand-blue);
}

.hd-action-btn svg {
  width: 20px;
  height: 20px;
}

.hd-mobile-toggle {
  display: none; /* Desktop hidden */
}

/* Inline Header Search (Desktop) */
.hd-header-search {
  display: flex;
  align-items: center;
}

.hd-header-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--hd-bg-soft);
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius-md);
  padding: 0.35rem 0.75rem;
  transition: all var(--hd-transition);
  width: 190px;
}

.hd-header-search-wrap:focus-within {
  width: 230px;
  background: #ffffff;
  border-color: var(--hd-brand-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.hd-header-search-icon {
  width: 15px;
  height: 15px;
  color: var(--hd-text-light);
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.hd-header-search-field {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--hd-text-heading);
  outline: none;
  width: 100%;
}

.hd-header-search-field::placeholder {
  color: var(--hd-text-light);
}

/* ==========================================================================
   4. Single Post Layout & Trust Metadata (single.php)
   ========================================================================== */
.hd-site-main {
  flex: 1;
  width: 100%;
  padding: 2rem 1.25rem 4rem;
}

.hd-article-grid {
  max-width: var(--hd-max-w-layout);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, var(--hd-max-w-article)) var(--hd-sidebar-w);
  gap: 3.5rem;
  align-items: start;
}

.hd-article-main {
  min-width: 0;
}

/* Breadcrumbs */
.hd-breadcrumbs {
  font-size: 0.875rem;
  color: var(--hd-text-muted);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.hd-breadcrumbs a {
  color: var(--hd-text-muted);
}

.hd-breadcrumbs a:hover {
  color: var(--hd-brand-blue);
}

.hd-breadcrumbs-separator {
  color: var(--hd-text-light);
}

/* Category Badge (Medical Blue Theme) */
.hd-category-badge {
  display: inline-block;
  background-color: var(--hd-brand-blue-soft);
  color: var(--hd-brand-blue);
  border: 1px solid var(--hd-border-blue);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--hd-radius-sm);
  margin-bottom: 0.75rem;
  transition: all var(--hd-transition);
}

.hd-category-badge:hover {
  background-color: #e0f2fe;
  color: var(--hd-brand-blue-dark);
  text-decoration: none;
}

/* Title & Trust Metadata Bar */
.hd-article-title {
  margin-bottom: 1.25rem;
}

/* Top Reading Progress Bar (Fixed 4px, #0d9488) */
.hd-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background-color: #0d9488;
  z-index: 9999;
  pointer-events: none;
  transition: width 0.08s linear;
}

.hd-trust-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--hd-border-subtle);
  border-bottom: 1px solid var(--hd-border-subtle);
  font-size: 0.875rem;
  color: var(--hd-text-muted);
}

.hd-trust-meta-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.hd-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hd-trust-divider {
  color: var(--hd-text-light);
  font-weight: bold;
}

.hd-trust-editorial-link {
  color: var(--hd-brand-blue);
  font-weight: 600;
  text-decoration: none;
}

.hd-trust-editorial-link:hover {
  color: var(--hd-brand-blue-dark);
  text-decoration: underline;
}

.hd-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--hd-accent-green);
  font-weight: 600;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

.hd-trust-badge svg {
  width: 14px;
  height: 14px;
}

/* Metadata Bar Utility Actions */
.hd-trust-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hd-util-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  border: 1px solid var(--hd-border);
  color: var(--hd-text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--hd-radius-sm);
  cursor: pointer;
  transition: all var(--hd-transition);
}

.hd-util-btn:hover {
  background: #ffffff;
  color: var(--hd-brand-blue);
  border-color: var(--hd-brand-blue);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hd-util-btn.is-copied {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #86efac;
}

/* Featured Image */
.hd-featured-media {
  margin-bottom: 2rem;
  border-radius: var(--hd-radius-lg);
  overflow: hidden;
  background-color: var(--hd-bg-soft);
  box-shadow: var(--hd-shadow-sm);
}

.hd-featured-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hd-featured-caption {
  font-size: 0.8125rem;
  color: var(--hd-text-muted);
  text-align: center;
  padding: 0.65rem 0.85rem;
  background: var(--hd-bg-soft);
  border-top: 1px solid var(--hd-border-subtle);
  font-style: italic;
}

/* Article Core Typography & Spacing (Golden Reading Width: 740px) */
.hd-article-content {
  max-width: var(--hd-max-w-article);
  font-size: var(--hd-font-size-base);
  line-height: var(--hd-line-height-body);
  color: var(--hd-text-body);
}

.hd-article-content > * + * {
  margin-top: 1.45rem;
}

.hd-article-content h2 {
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--hd-border-subtle);
  scroll-margin-top: 85px;
}

.hd-article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.65rem;
  scroll-margin-top: 85px;
}

.hd-article-content p {
  margin-bottom: 1.25rem;
}

.hd-article-content ul,
.hd-article-content ol {
  margin-bottom: 1.35rem;
  padding-left: 1.65rem;
}

.hd-article-content li {
  margin-bottom: 0.45rem;
}

.hd-article-content blockquote {
  border-left: 4px solid var(--hd-brand-blue);
  background: var(--hd-brand-blue-soft);
  padding: 1.25rem 1.5rem;
  font-style: italic;
  margin: 1.75rem 0;
  border-radius: 0 var(--hd-radius-md) var(--hd-radius-md) 0;
}

/* In-Article Figures & Content Images */
.hd-article-content figure {
  margin: 2.25rem 0;
  text-align: center;
}

.hd-article-content figure img,
.hd-article-content .wp-block-image img,
.hd-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--hd-radius-md);
  margin: 0 auto;
  box-shadow: var(--hd-shadow-sm);
  display: block;
}

.hd-article-content figcaption {
  font-size: 0.8125rem;
  color: var(--hd-text-muted);
  text-align: center;
  margin-top: 0.65rem;
  font-style: italic;
}

/* ==========================================================================
   5. Standardized Article Content Components
   ========================================================================== */
/* 1. Quick Takeaway Callout Box */
.hd-box-takeaway {
  background: var(--hd-brand-blue-soft);
  border-left: 4px solid var(--hd-brand-blue);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: 6px;
  position: relative;
}

.hd-box-takeaway-title {
  color: var(--hd-brand-blue-dark);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hd-box-takeaway p:last-child {
  margin-bottom: 0;
}

/* 2. Timeline & Routine Callout Box */
.hd-box-timeline {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: 6px;
}

.hd-box-timeline-title {
  color: #15803d;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hd-box-timeline p:last-child {
  margin-bottom: 0;
}

/* 3. Recipe & Preparation Card */
.hd-recipe-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 1.5rem;
  margin: 1.75rem 0;
  border-radius: 8px;
}

.hd-recipe-title {
  color: #92400e;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* 4. Responsive Table Wrapper & Clean Nutritional Tables */
.hd-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.75rem 0;
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius-md);
}

.hd-article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}

.hd-article-content th {
  background-color: var(--hd-bg-soft);
  color: var(--hd-text-heading);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--hd-border);
  white-space: nowrap;
}

.hd-article-content td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--hd-border-subtle);
  color: var(--hd-text-body);
}

.hd-article-content tr:last-child td {
  border-bottom: none;
}

.hd-article-content tr:hover td {
  background-color: var(--hd-brand-blue-soft);
}

/* ==========================================================================
   6. Native Zero-CLS AdSense Units (auto-injected via functions.php)
   ========================================================================== */
.hd-ad-container {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--hd-bg-soft);
  border: 1px solid var(--hd-border-subtle);
  border-radius: 8px;
  margin: 2rem 0;
  padding: 12px;
  overflow: hidden;
  text-align: center;
}

.hd-ad-label {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hd-text-light);
  margin-bottom: 0.5rem;
  user-select: none;
}

.hd-ad-content {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================================
   7. Sticky Sidebar & Auto "On This Page" Table of Contents
   ========================================================================== */
.hd-sidebar-sticky {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hd-toc-panel {
  background: var(--hd-bg-soft);
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hd-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hd-toc-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hd-text-heading);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hd-toc-title svg {
  width: 16px;
  height: 16px;
  color: var(--hd-brand-blue);
}

.hd-toc-close-btn {
  display: none; /* hidden on desktop (> 960px) */
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--hd-text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.hd-toc-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: calc(100vh - 420px);
  overflow-y: auto;
}

.hd-toc-item {
  margin-bottom: 0.35rem;
}

.hd-toc-subitem {
  padding-left: 0.85rem;
}

.hd-toc-link {
  display: block;
  font-size: 0.85rem;
  color: var(--hd-text-muted);
  line-height: 1.4;
  padding: 0.35rem 0.6rem;
  border-left: 2.5px solid transparent;
  border-radius: 0 var(--hd-radius-sm) var(--hd-radius-sm) 0;
  transition: all var(--hd-transition);
}

.hd-toc-link:hover {
  color: var(--hd-brand-blue);
  background-color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.hd-toc-link.is-active {
  color: #0d9488;
  background-color: #f0fdfa;
  border-left-color: #0d9488;
  font-weight: 600;
  text-decoration: none;
}

/* Right Rail Popular Widget */
.hd-popular-widget {
  border-top: 1px solid var(--hd-border);
  padding-top: 1rem;
}

.hd-popular-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hd-text-heading);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hd-popular-fire {
  font-size: 0.95rem;
}

.hd-popular-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hd-popular-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.84rem;
  line-height: 1.35;
}

.hd-popular-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: #0d9488;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.hd-popular-link {
  color: var(--hd-text-body);
  font-weight: 500;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-popular-link:hover {
  color: var(--hd-brand-blue);
  text-decoration: underline;
}

.hd-surprise-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px dashed var(--hd-border);
  border-radius: var(--hd-radius-sm);
  color: var(--hd-text-body);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all var(--hd-transition);
  text-align: center;
}

.hd-surprise-btn:hover {
  background: var(--hd-brand-blue-soft);
  border-color: var(--hd-brand-blue);
  color: var(--hd-brand-blue);
  text-decoration: none;
}

.hd-sidebar-footer {
  border-top: 1px solid var(--hd-border);
  padding-top: 0.75rem;
  text-align: center;
}

.hd-sidebar-back-top {
  background: none;
  border: none;
  color: var(--hd-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color var(--hd-transition);
}

.hd-sidebar-back-top:hover {
  color: #0d9488;
}

/* Floating TOC Handle & Backdrop (Hidden on Desktop > 960px) */
.hd-mobile-toc-toggle,
.hd-toc-backdrop {
  display: none;
}

/* ==========================================================================
   Article End Social Media Sharing Bar
   ========================================================================== */
.hd-social-share-wrap {
  margin: 2.25rem 0 1.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--hd-bg-soft);
  border: 1px solid var(--hd-border-subtle);
  border-radius: var(--hd-radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.hd-social-share-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--hd-text-heading);
}

.hd-social-share-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hd-brand-blue);
}

.hd-social-share-heading {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--hd-text-heading);
}

.hd-social-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.hd-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--hd-radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  color: #ffffff;
  transition: transform var(--hd-transition), box-shadow var(--hd-transition), background-color var(--hd-transition);
  cursor: pointer;
  line-height: 1;
}

.hd-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  color: #ffffff;
}

.hd-share-pinterest {
  background-color: #e60023;
}
.hd-share-pinterest:hover {
  background-color: #ad081b;
}

.hd-share-facebook {
  background-color: #1877f2;
}
.hd-share-facebook:hover {
  background-color: #0d65d9;
}

.hd-share-x {
  background-color: #0f1419;
}
.hd-share-x:hover {
  background-color: #272c30;
}

.hd-share-linkedin {
  background-color: #0a66c2;
}
.hd-share-linkedin:hover {
  background-color: #084e96;
}

.hd-share-whatsapp {
  background-color: #25d366;
}
.hd-share-whatsapp:hover {
  background-color: #1ea952;
}

.hd-share-copy {
  background-color: #ffffff;
  color: var(--hd-text-heading);
  border-color: var(--hd-border);
}
.hd-share-copy:hover {
  background-color: var(--hd-bg-subtle);
  color: var(--hd-brand-blue);
  border-color: var(--hd-brand-blue);
}
.hd-share-copy.copied {
  background-color: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

@media (max-width: 640px) {
  .hd-social-share-wrap {
    padding: 1rem 1.15rem;
  }
  .hd-share-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   8. Rich Single Post Footer Stack
   ========================================================================== */
/* Editorial Fact-Check Credibility Card */
.hd-editorial-trust-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 2.25rem 0 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.hd-trust-box-badge {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0d9488;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

.hd-trust-box-badge svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
}

.hd-trust-box-content {
  flex: 1;
  min-width: 0;
}

.hd-trust-box-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #065f46;
  margin: 0 0 0.35rem;
}

.hd-trust-box-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #166534;
  margin: 0;
}

.hd-trust-box-link {
  color: #0f766e;
  font-weight: 700;
  margin-left: 0.35rem;
  text-decoration: none;
  display: inline-block;
}

.hd-trust-box-link:hover {
  color: #115e59;
  text-decoration: underline;
}

/* Previous / Next Article Dual Navigation Cards */
.hd-post-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.hd-post-nav-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius-md);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  transition: all var(--hd-transition);
}

.hd-post-nav-card:hover {
  border-color: #0d9488;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.hd-nav-card-sub {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0d9488;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.hd-nav-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--hd-text-heading);
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-post-nav-card:hover .hd-nav-card-title {
  color: var(--hd-brand-blue-dark);
}

.hd-nav-next {
  text-align: right;
}

.hd-post-nav-card.hd-nav-disabled {
  background: #f8fafc;
  opacity: 0.65;
  cursor: not-allowed;
}

/* Guaranteed 3-Column Related Evidence-Based Guides */
.hd-related-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hd-border);
}

.hd-related-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--hd-text-heading);
  margin-bottom: 1.25rem;
}

.hd-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.hd-related-grid .hd-post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius-md);
  background: #ffffff;
  overflow: hidden;
  transition: transform var(--hd-transition), box-shadow var(--hd-transition), border-color var(--hd-transition);
}

.hd-related-grid .hd-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: #0d9488;
}

.hd-related-grid .hd-card-thumb-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e2e8f0;
  display: block;
}

.hd-related-grid .hd-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hd-related-grid .hd-post-card:hover .hd-card-thumb {
  transform: scale(1.04);
}

.hd-card-thumb-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0d9488, #0284c7);
}

.hd-related-grid .hd-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hd-related-grid .hd-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-related-grid .hd-card-title a {
  color: var(--hd-text-heading);
  text-decoration: none;
}

.hd-related-grid .hd-card-title a:hover {
  color: var(--hd-brand-blue);
}

.hd-related-grid .hd-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--hd-text-muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--hd-border-subtle);
}

/* Medical Disclaimer Box */
.hd-medical-disclaimer-box {
  background: #f8fafc;
  border: 1px solid var(--hd-border);
  border-left: 3.5px solid #0284c7;
  border-radius: var(--hd-radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--hd-text-muted);
}

.hd-disclaimer-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #0284c7;
  margin-top: 0.15rem;
}

.hd-disclaimer-text {
  margin: 0;
}

/* ==========================================================================
   9. Post Card & Grid Layout (index.php / archive.php)
   ========================================================================== */
.hd-archive-container {
  max-width: var(--hd-max-w-layout);
  margin: 0 auto;
}

/* Elevated Archive Header Banner */
.hd-archive-header {
  padding: 1.5rem 0 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--hd-border);
}

.hd-archive-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.hd-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
}

.hd-eyebrow-category {
  background-color: var(--hd-brand-blue-soft);
  color: var(--hd-brand-blue);
  border: 1px solid var(--hd-border-blue);
}

.hd-eyebrow-tag {
  background-color: #f0fdfa;
  color: #0d9488;
  border: 1px solid #99f6e4;
}

.hd-eyebrow-icon {
  font-size: 0.8125rem;
}

.hd-archive-count-badge {
  font-size: 0.8125rem;
  color: var(--hd-text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.hd-archive-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--hd-text-heading);
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hd-archive-title-icon {
  margin-right: 0.25rem;
  display: inline-block;
}

.hd-archive-desc {
  max-width: 820px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--hd-text-body);
}

.hd-archive-desc p {
  margin: 0;
}

/* Compact Horizontal Topic Switcher Bar */
.hd-archive-filter-bar {
  margin: 0 0 2.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 6px;
}

.hd-archive-filter-bar::-webkit-scrollbar {
  display: none;
}

.hd-filter-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  min-width: min-content;
}

/* Fallback for general page headers (search, 404, etc.) */
.hd-page-header {
  max-width: var(--hd-max-w-layout);
  margin: 0 auto 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--hd-border);
}

.hd-page-title {
  margin-bottom: 0.5rem;
}

.hd-page-desc {
  color: var(--hd-text-muted);
  font-size: 1.125rem;
}

/* Clean 3-Column Posts Grid */
.hd-posts-grid {
  max-width: var(--hd-max-w-layout);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.hd-post-card {
  background: var(--hd-bg-main);
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--hd-transition), box-shadow var(--hd-transition), border-color var(--hd-transition);
}

.hd-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  border-color: var(--hd-border-blue);
}

/* Standardized 16:10 Thumbnail Wrap with Relative Positioning for Badges */
.hd-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: var(--hd-bg-soft);
  overflow: hidden;
  display: block;
}

.hd-card-img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.hd-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hd-post-card:hover .hd-card-thumb {
  transform: scale(1.03);
}

.hd-card-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
}

.hd-card-body {
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hd-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-card-title a {
  color: var(--hd-text-heading);
  text-decoration: none;
}

.hd-card-title a:hover {
  color: var(--hd-brand-blue);
}

.hd-card-excerpt {
  font-size: 0.9rem;
  color: var(--hd-text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-card-meta {
  font-size: 0.78rem;
  color: var(--hd-text-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
  margin-top: auto;
}

/* In-Feed Native Ad Card (Slot #3 in first row) */
.hd-archive-ad-card {
  background: #fafbfc;
  border: 1px dashed var(--hd-border-blue);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 1.5rem 1.25rem;
}

.hd-ad-card-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hd-ad-card-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hd-text-light);
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: var(--hd-radius-sm);
}

.hd-ad-card-content {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hd-ad-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--hd-text-muted);
}

.hd-ad-placeholder-icon {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.hd-ad-placeholder-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--hd-text-heading);
}

.hd-ad-placeholder-sub {
  font-size: 0.75rem;
  color: var(--hd-text-light);
}

/* Pagination */
.hd-pagination {
  max-width: var(--hd-max-w-layout);
  margin: 3rem auto 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.hd-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.85rem;
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--hd-text-body);
  text-decoration: none;
  transition: all var(--hd-transition);
}

.hd-pagination .page-numbers.current {
  background: var(--hd-brand-blue);
  color: #fff;
  border-color: var(--hd-brand-blue);
}

.hd-pagination .page-numbers:hover:not(.current) {
  background: var(--hd-brand-blue-soft);
  color: var(--hd-brand-blue);
  border-color: var(--hd-border-blue);
}

/* ==========================================================================
   10. Trust-Focused Footer (footer.php) - Navy Slate Background
   ========================================================================== */
.hd-site-footer {
  background-color: #0f172a; /* Slate 900 Dark Slate Background */
  color: #94a3b8;
  padding: 3.5rem 1.25rem 2rem;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.hd-footer-grid {
  max-width: var(--hd-max-w-layout);
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.2fr;
  gap: 3rem;
}

.hd-footer-col-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hd-footer-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.hd-brand-accent-footer {
  color: var(--hd-brand-cyan);
  margin-left: 1px;
}

.hd-footer-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.hd-footer-mission {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #94a3b8;
  max-width: 420px;
}

.hd-footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hd-footer-nav-item {
  margin-bottom: 0.65rem;
}

.hd-footer-nav-link {
  color: #cbd5e1;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color var(--hd-transition);
}

.hd-footer-nav-link:hover {
  color: var(--hd-brand-cyan);
  text-decoration: underline;
}

/* Global Medical Disclaimer Bar */
.hd-footer-disclaimer-wrap {
  max-width: var(--hd-max-w-layout);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid #1e293b;
}

.hd-global-disclaimer {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.hd-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   11. Unified Container & Layout System
   ========================================================================== */
.hd-container {
  width: 100%;
  max-width: var(--hd-max-w-layout);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Dynamic Category Badges */
.hd-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--hd-radius-sm);
  text-decoration: none;
}

/* ==========================================================================
   12. Zone 0: 12 Core Tags Slow-Scrolling Marquee
   ========================================================================== */
.hd-tag-marquee-section {
  background: #ffffff;
  border-bottom: 1px solid var(--hd-border-subtle);
  padding: 0.65rem 0;
  margin-bottom: 2rem;
  width: 100%;
}

.hd-tag-marquee {
  overflow: hidden;
  width: 100%;
  position: relative;
  padding-top: 10px;
  padding-bottom: 10px;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.hd-tag-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: hd-marquee-scroll 55s linear infinite;
  will-change: transform;
  padding-top: 10px;
  padding-bottom: 10px;
}

@keyframes hd-marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pause on Interaction (desktop hover, mobile focus/active) */
.hd-tag-marquee:hover .hd-tag-track,
.hd-tag-marquee:focus-within .hd-tag-track,
.hd-tag-marquee:active .hd-tag-track {
  animation-play-state: paused;
}

/* Fallback for users preferring reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hd-tag-track {
    animation: none;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: thin;
  }
}

/* Tag Pill Component (Shared by Marquee and Single Post Bottom) */
.hd-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hd-text-body);
  background: #ffffff;
  border: 1px solid var(--hd-border);
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--hd-transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
  box-sizing: border-box;
}

.hd-tag-pill:hover,
.hd-tag-pill:focus-visible {
  border-color: var(--hd-brand-blue);
  color: var(--hd-brand-blue);
  background: var(--hd-brand-blue-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.16);
  text-decoration: none;
}

/* Active State for Current Category / Tag */
.hd-tag-pill.is-active {
  background: var(--hd-brand-blue, #0284c7);
  color: #ffffff;
  border-color: var(--hd-brand-blue, #0284c7);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.28);
}

.hd-tag-pill.is-active:hover {
  background: #0369a1;
  border-color: #0369a1;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.hd-archive-container .hd-tag-marquee-section {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 2rem;
}

.hd-tag-icon {
  font-size: 0.95rem;
  display: inline-block;
  vertical-align: middle;
}

.hd-tag-name {
  line-height: 1;
}

/* Single Post Bottom Tag Row */
.hd-post-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2.5rem 0 1.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--hd-bg-soft);
  border: 1px solid var(--hd-border-subtle);
  border-radius: var(--hd-radius-md);
}

.hd-tags-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--hd-text-heading);
  white-space: nowrap;
}

.hd-post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ==========================================================================
   13. Zone 1: Asymmetric 1+4 Bento Grid (Layout A Blueprint)
   ========================================================================== */
.hd-bento-section {
  margin-bottom: 2.75rem;
}

.hd-bento-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

/* Main Hero (Card 1) */
.hd-bento-hero {
  grid-row: span 2;
  background: #ffffff;
  border: 1px solid var(--hd-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--hd-transition), box-shadow var(--hd-transition), border-color var(--hd-transition);
}

.hd-bento-hero:hover {
  transform: translateY(-2px);
  box-shadow: var(--hd-shadow-md);
  border-color: var(--hd-border-blue);
}

.hd-hero-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e 0%, #0369a1 50%, #1e3a8a 100%);
}

.hd-hero-img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.hd-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hd-bento-hero:hover .hd-hero-img {
  transform: scale(1.025);
}

.hd-hero-fallback-graphic {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f766e 0%, #0284c7 60%, #1e40af 100%);
}

.hd-overlaid-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--hd-radius-sm);
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hd-overlaid-badge:hover {
  color: #ffffff;
  text-decoration: none;
  filter: brightness(1.1);
}

.hd-hero-watermark {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  padding: 0.2rem 0.55rem;
  border-radius: var(--hd-radius-sm);
}

.hd-hero-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hd-hero-title {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 0.75rem;
}

.hd-hero-title a {
  color: var(--hd-text-heading);
  text-decoration: none;
  transition: color var(--hd-transition);
}

.hd-hero-title a:hover {
  color: var(--hd-brand-blue);
  text-decoration: none;
}

.hd-hero-excerpt {
  font-size: 0.95rem;
  color: var(--hd-text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--hd-text-muted);
  font-weight: 500;
  border-top: 1px solid var(--hd-border-subtle);
  padding-top: 0.85rem;
  margin-top: auto;
}

.hd-meta-evidence {
  color: var(--hd-accent-green);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.hd-meta-divider {
  color: var(--hd-border-dark);
}

/* Compact 2x2 Bento Subcards (Cards 2 to 5) */
.hd-bento-subcard {
  background: #ffffff;
  border: 1px solid var(--hd-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--hd-transition), box-shadow var(--hd-transition), border-color var(--hd-transition);
}

.hd-bento-subcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--hd-shadow-md);
  border-color: var(--hd-border-blue);
}

.hd-subcard-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--hd-bg-subtle);
}

.hd-subcard-img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.hd-subcard-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hd-bento-subcard:hover .hd-subcard-img {
  transform: scale(1.025);
}

.hd-subcard-fallback-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
}

.hd-subcard-body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hd-subcard-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-subcard-title a {
  color: var(--hd-text-heading);
  text-decoration: none;
  transition: color var(--hd-transition);
}

.hd-subcard-title a:hover {
  color: var(--hd-brand-blue);
  text-decoration: none;
}

.hd-subcard-desc {
  font-size: 0.8125rem;
  color: var(--hd-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* ==========================================================================
   14. Zone 2: Discovery Strip (You May Also Like)
   ========================================================================== */
.hd-discovery-strip {
  background: #f0fdf4;
  border-top: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0;
  padding: 2.25rem 0;
  margin: 2.5rem 0;
}

.hd-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hd-strip-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.hd-strip-icon {
  font-size: 1.1rem;
}

.hd-strip-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #166534;
  margin: 0;
}

.hd-strip-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hd-strip-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #bbf7d0;
  background: #ffffff;
  color: #166534;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--hd-transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 0;
}

.hd-strip-btn:hover:not(:disabled) {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
  transform: translateY(-1px);
}

.hd-strip-btn:active:not(:disabled) {
  transform: translateY(0);
}

.hd-strip-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
}

.hd-strip-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 2px 8px 2px;
  scroll-behavior: smooth;
}

.hd-strip-track::-webkit-scrollbar {
  display: none;
}

.hd-mini-card {
  flex: 0 0 calc(25% - 0.75rem);
  min-width: 250px;
  scroll-snap-align: start;
  background: #ffffff;
  border: 1px solid #dcfce7;
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform var(--hd-transition), box-shadow var(--hd-transition), border-color var(--hd-transition);
}

.hd-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hd-shadow-md);
  border-color: #86efac;
}

.hd-mini-thumb-wrap {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--hd-bg-subtle);
}

.hd-mini-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.hd-mini-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.hd-mini-body {
  flex: 1;
  min-width: 0;
}

.hd-mini-cat {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  display: block;
}

.hd-mini-title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-mini-title a {
  color: var(--hd-text-heading);
  text-decoration: none;
  transition: color var(--hd-transition);
}

.hd-mini-title a:hover {
  color: var(--hd-brand-blue);
  text-decoration: none;
}

/* ==========================================================================
   15. Zone 3: Two-Column Editorial Feed + Sticky Sidebar
   ========================================================================== */
.hd-zone3-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 355px;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
  align-items: start;
}

.hd-feed-main {
  min-width: 0;
}

.hd-feed-header {
  margin-bottom: 1.5rem;
}

.hd-feed-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--hd-text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.hd-feed-sub {
  font-size: 0.9375rem;
  color: var(--hd-text-muted);
  margin: 0;
}

.hd-feed-list {
  display: flex;
  flex-direction: column;
}

.hd-feed-card {
  display: flex;
  gap: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--hd-border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  align-items: center;
  transition: transform var(--hd-transition), box-shadow var(--hd-transition), border-color var(--hd-transition);
}

.hd-feed-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hd-shadow-md);
  border-color: var(--hd-border-blue);
}

.hd-feed-thumb-wrap {
  width: 200px;
  height: 135px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--hd-bg-subtle);
}

.hd-feed-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hd-feed-card:hover .hd-feed-thumb {
  transform: scale(1.025);
}

.hd-feed-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 135px;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 800;
  text-decoration: none;
}

.hd-feed-body {
  flex: 1;
  min-width: 0;
}

.hd-feed-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hd-text-muted);
  margin-bottom: 0.4rem;
}

.hd-feed-cat {
  text-decoration: none;
  font-weight: 700;
}

.hd-feed-cat:hover {
  text-decoration: underline;
}

.hd-meta-bullet {
  color: var(--hd-border-dark);
}

.hd-feed-date {
  color: var(--hd-text-muted);
}

.hd-feed-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.45rem;
}

.hd-feed-card-title a {
  color: var(--hd-text-heading);
  text-decoration: none;
  transition: color var(--hd-transition);
}

.hd-feed-card-title a:hover {
  color: var(--hd-brand-blue);
  text-decoration: none;
}

.hd-feed-excerpt {
  font-size: 0.9375rem;
  color: var(--hd-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* AdSense Slot #1: In-Feed Native Unit (Zero CLS) */
.hd-feed-ad-card {
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  min-height: 148px;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  box-sizing: border-box;
}

.hd-feed-ad-real {
  width: 100%;
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hd-feed-ad-thumb {
  width: 200px;
  height: 120px;
  flex-shrink: 0;
  background: #fef3c7;
  border: 1px dashed #f59e0b;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  text-align: center;
  color: #b45309;
  font-size: 0.8125rem;
  font-weight: 700;
}

.hd-feed-ad-thumb-sub {
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.35rem;
  color: #92400e;
}

.hd-feed-ad-content {
  flex: 1;
  min-width: 0;
}

.hd-ad-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}

.hd-ad-feed-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #92400e;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.hd-ad-feed-desc {
  font-size: 0.8125rem;
  color: #78350f;
  line-height: 1.5;
  margin: 0;
}

/* Sidebar Sticky Container (Right 1/3) */
.hd-feed-sidebar {
  min-width: 0;
}

.hd-sidebar-sticky {
  position: sticky;
  top: calc(var(--hd-header-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-self: start;
}

/* Sidebar Widgets */
.hd-widget-box {
  background: #ffffff;
  border: 1px solid var(--hd-border);
  border-radius: 12px;
  padding: 1.35rem;
  box-shadow: var(--hd-shadow-sm);
}

.hd-widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hd-text-heading);
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

/* Search Widget Form */
.hd-sidebar-search-form {
  display: flex;
  gap: 0.5rem;
}

.hd-sidebar-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--hd-border);
  border-radius: 6px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--hd-transition), box-shadow var(--hd-transition);
}

.hd-sidebar-search-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.hd-sidebar-search-btn {
  background: #0d9488;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  padding: 0 1.15rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color var(--hd-transition);
}

.hd-sidebar-search-btn:hover {
  background: #0f766e;
}

/* AdSense Slot #2 (Sidebar 300x250 Display/Video Unit) */
.hd-widget-ad-box {
  min-height: 280px;
  background: #fffdf5;
  border: 1px dashed #fde68a;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.hd-ad-top-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #b45309;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
}

.hd-ad-video-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fef3c7;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.hd-ad-sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 0.35rem;
}

.hd-ad-sidebar-desc {
  font-size: 0.8125rem;
  color: #92400e;
  line-height: 1.45;
}

.hd-ad-sidebar-sub {
  font-size: 0.75rem;
  color: #b45309;
}

/* Most Read Articles (Numbered 01 - 05) */
.hd-most-read-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--hd-text-heading);
  margin-bottom: 1rem;
}

.hd-fire-icon {
  font-size: 1.15rem;
}

.hd-most-read-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hd-most-read-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hd-border-subtle);
}

.hd-most-read-item:last-child {
  border-bottom: none;
}

.hd-most-read-num {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--hd-font-mono);
  color: #0d9488;
  width: 28px;
  flex-shrink: 0;
  line-height: 1.35;
}

.hd-most-read-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--hd-transition);
}

.hd-most-read-link:hover {
  color: var(--hd-brand-blue);
  text-decoration: none;
}

/* ==========================================================================
   16. Single Mobile Breakpoint (max-width: 960px) - Single DOM Enforcement
   ========================================================================== */
@media (max-width: 960px) {
  /* Header Mobile Adaptation */
  .hd-header-search {
    display: none;
  }

  .hd-mobile-toggle {
    display: inline-flex;
  }

  .hd-nav {
    display: none;
    position: absolute;
    top: var(--hd-header-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hd-border);
    box-shadow: var(--hd-shadow-md);
    padding: 1rem 1.25rem 1.5rem;
  }

  .hd-nav.is-open {
    display: block;
  }

  .hd-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .hd-nav-link {
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
    border-radius: var(--hd-radius-md);
    border-bottom: 1px solid var(--hd-border-subtle);
  }

  /* Bento Grid Collapse */
  .hd-bento-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hd-bento-hero {
    grid-row: span 1;
  }

  /* Discovery Strip Mobile/Tablet Sizing */
  .hd-mini-card {
    flex: 0 0 calc(45% - 0.5rem);
    min-width: 240px;
  }

  /* Zone 3 Feed & Sidebar Collapse */
  .hd-zone3-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hd-sidebar-sticky {
    position: static;
  }

  /* Single Article Grid Collapse & Mobile Slide-Out TOC Drawer (Single-DOM) */
  .hd-article-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hd-sidebar-sticky {
    position: static;
  }

  /* Floating Right-Edge Arrow Handle */
  .hd-mobile-toc-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    position: fixed;
    right: 0;
    top: 48%;
    transform: translateY(-50%);
    z-index: 999;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    border: 1.5px solid #0d9488;
    border-right: none;
    border-radius: 14px 0 0 14px;
    padding: 10px 8px;
    box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    user-select: none;
    transition: background 0.2s, transform 0.2s;
  }

  .hd-mobile-toc-toggle:hover {
    background: rgba(13, 148, 136, 0.95);
  }

  .hd-toc-arrow {
    font-size: 0.75rem;
    color: #2dd4bf;
    transition: transform 0.2s;
  }

  .hd-toc-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
  }

  /* Translucent Backdrop */
  .hd-toc-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .hd-toc-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Mobile Slide-Out TOC Drawer */
  .hd-toc-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(82vw, 310px);
    z-index: 1000;
    background: #ffffff;
    box-shadow: -6px 0 25px rgba(0, 0, 0, 0.18);
    border: none;
    border-radius: 0;
    padding: 1.25rem 1.15rem 2.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .hd-toc-panel.is-open {
    transform: translateX(0);
  }

  .hd-toc-close-btn {
    display: block;
  }

  .hd-toc-nav {
    max-height: none;
  }

  /* Responsive Adjustments for Tablet / Mobile */
  .hd-trust-bar {
    gap: 0.75rem;
  }

  .hd-trust-actions {
    margin-left: auto;
  }

  .hd-related-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hd-post-nav-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .hd-nav-next {
    text-align: left;
  }

  /* Archive Posts Grid Tablet Adaptation */
  .hd-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Footer Grid Collapse */
  .hd-footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Small Screens / Mobile Phones (max-width: 580px) */
@media (max-width: 580px) {
  .hd-archive-title {
    font-size: 1.75rem;
  }

  .hd-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hd-post-tags {
    padding: 1rem;
    gap: 0.5rem;
  }

  .hd-mini-card {
    flex: 0 0 82%;
    min-width: 230px;
    max-width: 320px;
  }

  .hd-feed-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .hd-feed-thumb-wrap {
    width: 100%;
    height: 180px;
  }

  .hd-feed-ad-card {
    flex-direction: column;
    align-items: stretch;
  }

  .hd-feed-ad-thumb {
    width: 100%;
    height: 100px;
  }
}

/* ==========================================================================
   404 Error Page & Search Form Styling
   ========================================================================== */
.hd-404-container {
  max-width: 680px;
  margin: 3.5rem auto 5rem;
  text-align: center;
  padding: 0 1.5rem;
}

.hd-404-badge {
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.35rem 0.95rem;
  background: #f1f5f9;
  color: #475569;
  border-radius: 9999px;
  display: inline-block;
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
}

.hd-404-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  line-height: 1.25;
}

.hd-404-subtitle {
  color: var(--hd-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hd-404-search {
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.hd-404-search-form {
  display: flex;
  gap: 0.5rem;
}

.hd-404-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #0f172a;
  outline: none;
  transition: border-color var(--hd-transition), box-shadow var(--hd-transition), background-color var(--hd-transition);
}

.hd-404-search-input:focus {
  background-color: #ffffff;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.hd-404-search-btn {
  background: #0d9488;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  padding: 0 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--hd-transition), transform var(--hd-transition);
}

.hd-404-search-btn:hover {
  background: #0f766e;
}

.hd-404-search-btn:active {
  transform: scale(0.98);
}

.hd-404-topics-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hd-border);
}

.hd-404-topics-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.hd-404-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.hd-404-popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  text-align: left;
  margin-bottom: 2rem;
}

.hd-404-popular-card {
  background: #f8fafc;
  border: 1px solid var(--hd-border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color var(--hd-transition), transform var(--hd-transition), background var(--hd-transition);
}

.hd-404-popular-card:hover {
  border-color: #0d9488;
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: var(--hd-shadow-sm);
}

.hd-404-popular-card-cat {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0d9488;
  letter-spacing: 0.04em;
}

.hd-404-popular-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
  margin: 0;
}

.hd-404-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0d9488;
  text-decoration: none;
  transition: color var(--hd-transition);
}

.hd-404-home-link:hover {
  color: #0f766e;
  text-decoration: underline;
}

/* Static Page Lead Paragraph */
.hd-page-intro {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 1.75rem;
}

/* ==========================================================================
   Modern Dual-Sitemap Architecture Styles (/site-map)
   ========================================================================== */

/* Expand main column width for the HTML Sitemap page to full layout grid */
body.hd-page-sitemap .hd-site-main > div {
  max-width: var(--hd-max-w-layout) !important;
}

.hd-html-sitemap {
  margin-top: 1rem;
}

.hd-sitemap-subtitle {
  font-size: 1.125rem;
  color: var(--hd-text-muted);
  line-height: 1.6;
  margin-bottom: 2.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--hd-border);
}

.hd-sitemap-section {
  margin-bottom: 3.5rem;
}

.hd-sitemap-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--hd-text-heading);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--hd-border-subtle);
}

.hd-sitemap-heading-icon {
  font-size: 1.25rem;
}

/* Section 1: Browse by Topic Tags Grid */
.hd-sitemap-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hd-sitemap-tag-pill {
  text-decoration: none;
  transition: all var(--hd-transition);
}

.hd-sitemap-tag-count {
  font-size: 0.75rem;
  color: var(--hd-text-light);
  margin-left: 0.2rem;
  font-weight: 500;
}

.hd-sitemap-tag-pill:hover .hd-sitemap-tag-count {
  color: var(--hd-brand-blue);
}

/* Section 2: 2-Column Responsive Category Grid */
.hd-sitemap-category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .hd-sitemap-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hd-sitemap-cat-card {
  background: #ffffff;
  border: 1px solid var(--hd-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: border-color var(--hd-transition), box-shadow var(--hd-transition);
}

.hd-sitemap-cat-card:hover {
  border-color: var(--hd-brand-blue-soft);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
}

.hd-sitemap-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--hd-border-subtle);
}

.hd-sitemap-cat-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--hd-text-heading);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hd-sitemap-cat-title a {
  color: var(--hd-text-heading);
  text-decoration: none;
  transition: color var(--hd-transition);
}

.hd-sitemap-cat-title a:hover {
  color: var(--hd-brand-blue);
}

.hd-sitemap-cat-icon {
  font-size: 1.25rem;
}

.hd-sitemap-cat-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background: var(--hd-bg-subtle);
  color: var(--hd-text-muted);
  border-radius: 9999px;
  white-space: nowrap;
}

/* Post list inside category cards */
.hd-sitemap-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hd-sitemap-post-item {
  position: relative;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hd-sitemap-post-item::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--hd-brand-blue);
  opacity: 0.55;
  transition: all var(--hd-transition);
}

.hd-sitemap-post-item:hover::before {
  opacity: 1;
  transform: scale(1.4);
  background-color: var(--hd-brand-blue-deep);
}

.hd-sitemap-post-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--hd-text-heading);
  text-decoration: none;
  line-height: 1.45;
  transition: color var(--hd-transition);
}

.hd-sitemap-post-link:hover {
  color: var(--hd-brand-blue);
  text-decoration: underline;
}

.hd-sitemap-post-date {
  font-size: 0.75rem;
  color: var(--hd-text-light);
  font-weight: 400;
}

.hd-sitemap-empty {
  font-size: 0.875rem;
  color: var(--hd-text-muted);
  font-style: italic;
  margin: 0;
}

/* Category Card Footer & View All Link */
.hd-sitemap-cat-footer {
  margin-top: auto;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--hd-border-subtle);
}

.hd-sitemap-view-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.95rem;
  background-color: var(--hd-bg-soft);
  color: var(--hd-brand-blue);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--hd-radius-md);
  border: 1px solid var(--hd-border-subtle);
  transition: all var(--hd-transition);
}

.hd-sitemap-view-all-btn:hover {
  background-color: var(--hd-brand-blue-soft);
  color: var(--hd-brand-blue-deep);
  border-color: var(--hd-brand-blue);
}

.hd-sitemap-btn-arrow {
  font-size: 1rem;
  transition: transform var(--hd-transition);
}

.hd-sitemap-view-all-btn:hover .hd-sitemap-btn-arrow {
  transform: translateX(3px);
}

/* Section 3: Institutional About & Legal Grid */
.hd-sitemap-institutional-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .hd-sitemap-institutional-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .hd-sitemap-institutional-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hd-sitemap-inst-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--hd-bg-soft);
  border: 1px solid var(--hd-border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  text-decoration: none;
  transition: background var(--hd-transition), border-color var(--hd-transition), transform var(--hd-transition), box-shadow var(--hd-transition);
}

.hd-sitemap-inst-card:hover {
  background: #ffffff;
  border-color: var(--hd-brand-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.08);
}

.hd-sitemap-inst-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hd-sitemap-inst-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--hd-text-heading);
  line-height: 1.3;
}

.hd-sitemap-inst-card:hover .hd-sitemap-inst-title {
  color: var(--hd-brand-blue);
}

.hd-sitemap-inst-desc {
  font-size: 0.78125rem;
  color: var(--hd-text-muted);
  line-height: 1.35;
}

.hd-sitemap-inst-arrow {
  color: var(--hd-text-light);
  font-size: 1.1rem;
  transition: transform var(--hd-transition), color var(--hd-transition);
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.hd-sitemap-inst-card:hover .hd-sitemap-inst-arrow {
  transform: translateX(4px);
  color: var(--hd-brand-blue);
}

