/*
 Theme Name:   Hello Tech Blog Pro
 Theme URI:    https://github.com/guilherme/hello-tech-blog-pro
 Description:  Child theme premium do Hello Elementor com auto-setup completo. Blog de Tech, Games e Curiosidades com dark mode, animações, trending, bookmarks, TOC automático e mais. Instale e pronto — tudo configurado automaticamente.
 Author:       Guilherme
 Author URI:   https://guilherme.dev
 Template:     hello-elementor
 Version:      2.1.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  hello-tech-blog-pro
*/

/* ============================================
   CSS CUSTOM PROPERTIES — LIGHT MODE
   ============================================ */
:root {
  /* Core */
  --htb-bg: #f8f9fc;
  --htb-bg-alt: #ffffff;
  --htb-surface: #f1f3f8;
  --htb-surface-hover: #e8ebf2;
  --htb-text: #0f172a;
  --htb-text-secondary: #475569;
  --htb-text-muted: #94a3b8;
  --htb-accent: #6d5cff;
  --htb-accent-hover: #5a47eb;
  --htb-accent-soft: rgba(109, 92, 255, 0.08);
  --htb-accent-glow: rgba(109, 92, 255, 0.25);
  --htb-border: rgba(15, 23, 42, 0.08);
  --htb-border-hover: rgba(15, 23, 42, 0.15);
  --htb-card-bg: #ffffff;
  --htb-card-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.03);
  --htb-card-shadow-hover: 0 8px 30px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  --htb-glass: rgba(255, 255, 255, 0.72);
  --htb-glass-border: rgba(255, 255, 255, 0.5);
  --htb-overlay: rgba(15, 23, 42, 0.5);
  --htb-gradient-hero: linear-gradient(135deg, #6d5cff 0%, #a78bfa 50%, #38bdf8 100%);
  --htb-gradient-card: linear-gradient(135deg, rgba(109, 92, 255, 0.05) 0%, rgba(56, 189, 248, 0.05) 100%);
  --htb-success: #22c55e;
  --htb-warning: #f59e0b;
  --htb-danger: #ef4444;
  --htb-info: #38bdf8;

  /* Tipografia */
  --htb-font-display: 'Outfit', sans-serif;
  --htb-font-body: 'DM Sans', sans-serif;
  --htb-font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --htb-container: 1200px;
  --htb-container-narrow: 760px;
  --htb-radius: 16px;
  --htb-radius-sm: 10px;
  --htb-radius-xs: 6px;
  --htb-radius-full: 50px;
  --htb-gap: 1.5rem;
  --htb-header-h: 68px;
  --htb-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --htb-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --htb-transition: 0.3s var(--htb-ease);
  --htb-transition-slow: 0.5s var(--htb-ease);
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  --htb-bg: #0c0e1a;
  --htb-bg-alt: #131627;
  --htb-surface: #1a1e35;
  --htb-surface-hover: #242948;
  --htb-text: #e2e8f0;
  --htb-text-secondary: #94a3b8;
  --htb-text-muted: #64748b;
  --htb-accent: #8b7dff;
  --htb-accent-hover: #a599ff;
  --htb-accent-soft: rgba(139, 125, 255, 0.12);
  --htb-accent-glow: rgba(139, 125, 255, 0.3);
  --htb-border: rgba(226, 232, 240, 0.08);
  --htb-border-hover: rgba(226, 232, 240, 0.15);
  --htb-card-bg: #161a30;
  --htb-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
  --htb-card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
  --htb-glass: rgba(19, 22, 39, 0.8);
  --htb-glass-border: rgba(255, 255, 255, 0.06);
  --htb-overlay: rgba(0, 0, 0, 0.7);
  --htb-gradient-hero: linear-gradient(135deg, #4c3fff 0%, #7c3aed 50%, #0ea5e9 100%);
  --htb-gradient-card: linear-gradient(135deg, rgba(109, 92, 255, 0.08) 0%, rgba(56, 189, 248, 0.08) 100%);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--htb-font-body);
  background: var(--htb-bg);
  color: var(--htb-text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

a { color: var(--htb-accent); text-decoration: none; transition: color var(--htb-transition); }
a:hover { color: var(--htb-accent-hover); }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--htb-font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--htb-text);
  letter-spacing: -0.02em;
}

::selection {
  background: var(--htb-accent);
  color: #fff;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.htb-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--htb-ease), transform 0.7s var(--htb-ease);
}

.htb-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.htb-reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--htb-ease), transform 0.7s var(--htb-ease);
}

.htb-reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.htb-reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s var(--htb-ease), transform 0.6s var(--htb-ease-bounce);
}

.htb-reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.htb-delay-1 { transition-delay: 0.1s; }
.htb-delay-2 { transition-delay: 0.2s; }
.htb-delay-3 { transition-delay: 0.3s; }
.htb-delay-4 { transition-delay: 0.4s; }
.htb-delay-5 { transition-delay: 0.5s; }

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.htb-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--htb-gradient-hero);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 3px 3px 0;
}

/* ============================================
   LAYOUT
   ============================================ */
.htb-container {
  max-width: var(--htb-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.htb-container-narrow {
  max-width: var(--htb-container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   HEADER — GLASS MORPHISM
   ============================================ */
.htb-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--htb-header-h);
  background: var(--htb-glass);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--htb-glass-border);
  transition: transform 0.35s var(--htb-ease), box-shadow 0.35s ease;
}

.htb-header.scrolled {
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.htb-header.hidden {
  transform: translateY(-100%);
}

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

/* Logo */
.htb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--htb-font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--htb-text);
  letter-spacing: -0.03em;
}

.htb-logo:hover { color: var(--htb-text); }

.htb-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--htb-gradient-hero);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

.htb-logo-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
}

/* Nav */
.htb-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.htb-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--htb-text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--htb-radius-sm);
  transition: all var(--htb-transition);
  position: relative;
}

.htb-nav a:hover,
.htb-nav a.active {
  color: var(--htb-accent);
  background: var(--htb-accent-soft);
}

/* Header Actions */
.htb-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.htb-icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--htb-radius-sm);
  background: transparent;
  border: none;
  color: var(--htb-text-secondary);
  cursor: pointer;
  transition: all var(--htb-transition);
  position: relative;
}

.htb-icon-btn:hover {
  background: var(--htb-surface);
  color: var(--htb-text);
}

/* Dark Mode Toggle */
.htb-theme-toggle {
  position: relative;
  overflow: hidden;
}

.htb-theme-toggle .icon-sun,
.htb-theme-toggle .icon-moon {
  position: absolute;
  transition: all 0.4s var(--htb-ease-bounce);
}

.htb-theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.htb-theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

[data-theme="dark"] .htb-theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .htb-theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Mobile Menu */
.htb-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.htb-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--htb-text);
  border-radius: 2px;
  transition: all 0.3s var(--htb-ease);
  transform-origin: center;
}

.htb-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.htb-menu-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.htb-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

/* Body offset for fixed header */
body { padding-top: var(--htb-header-h); }

/* ============================================
   HERO — ANIMATED GRADIENT
   ============================================ */
.htb-hero {
  position: relative;
  padding: 5rem 0 3rem;
  text-align: center;
  overflow: hidden;
}

.htb-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, var(--htb-accent-soft) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(56, 189, 248, 0.06) 0%, transparent 50%);
  animation: htb-hero-float 15s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes htb-hero-float {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(30px, -20px) rotate(3deg); }
}

.htb-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 1rem;
  background: var(--htb-accent-soft);
  border: 1px solid rgba(109, 92, 255, 0.15);
  border-radius: var(--htb-radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--htb-accent);
  margin-bottom: 1.5rem;
}

.htb-hero-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--htb-accent);
  border-radius: 50%;
  animation: htb-pulse 2s ease-in-out infinite;
}

@keyframes htb-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.htb-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  line-height: 1.1;
  position: relative;
}

.htb-hero h1 .gradient-text {
  background: var(--htb-gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.htb-hero-subtitle {
  font-size: 1.15rem;
  color: var(--htb-text-secondary);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Stats Bar */
.htb-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2rem;
}

.htb-hero-stat {
  text-align: center;
}

.htb-hero-stat .stat-number {
  font-family: var(--htb-font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--htb-text);
  display: block;
  line-height: 1.2;
}

.htb-hero-stat .stat-label {
  font-size: 0.78rem;
  color: var(--htb-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ============================================
   CATEGORIES BAR — ANIMATED PILLS
   ============================================ */
.htb-categories-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.5rem 0 3rem;
  flex-wrap: wrap;
  position: relative;
}

.htb-cat-pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1.15rem;
  border-radius: var(--htb-radius-full);
  background: var(--htb-card-bg);
  color: var(--htb-text-secondary);
  border: 1px solid var(--htb-border);
  transition: all 0.35s var(--htb-ease);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.htb-cat-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--htb-gradient-hero);
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: inherit;
}

.htb-cat-pill:hover,
.htb-cat-pill.active {
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--htb-accent-glow);
}

.htb-cat-pill:hover::before,
.htb-cat-pill.active::before {
  opacity: 1;
}

.htb-cat-pill span {
  position: relative;
  z-index: 1;
}

.htb-cat-pill .cat-count {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.2);
  padding: 1px 6px;
  border-radius: 50px;
  margin-left: 4px;
}

/* ============================================
   POST GRID
   ============================================ */
.htb-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--htb-gap);
  padding-bottom: 3rem;
}

/* ============================================
   CARD — MODERN GLASSMORPHISM
   ============================================ */
.htb-card {
  background: var(--htb-card-bg);
  border-radius: var(--htb-radius);
  border: 1px solid var(--htb-border);
  overflow: hidden;
  transition: all 0.4s var(--htb-ease);
  display: flex;
  flex-direction: column;
  position: relative;
}

.htb-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--htb-gradient-card);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
}

.htb-card:hover {
  border-color: var(--htb-border-hover);
  box-shadow: var(--htb-card-shadow-hover);
  transform: translateY(-4px);
}

.htb-card:hover::before {
  opacity: 1;
}

/* Card Thumbnail */
.htb-card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: var(--htb-surface);
  z-index: 1;
}

.htb-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--htb-ease);
}

.htb-card:hover .htb-card-thumb img {
  transform: scale(1.06);
}

/* Overlay gradient on thumb */
.htb-card-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.15) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.htb-card:hover .htb-card-thumb::after {
  opacity: 1;
}

/* Category Badge */
.htb-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--htb-radius-full);
  background: var(--htb-glass);
  backdrop-filter: blur(12px);
  color: var(--htb-accent);
  border: 1px solid var(--htb-glass-border);
}

/* Bookmark Icon */
.htb-card-bookmark {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--htb-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--htb-glass-border);
  color: var(--htb-text-muted);
  cursor: pointer;
  transition: all 0.3s var(--htb-ease);
  opacity: 0;
  transform: scale(0.8);
}

.htb-card:hover .htb-card-bookmark {
  opacity: 1;
  transform: scale(1);
}

.htb-card-bookmark:hover {
  background: var(--htb-accent);
  color: #fff;
  border-color: var(--htb-accent);
}

.htb-card-bookmark.saved {
  opacity: 1;
  transform: scale(1);
  background: var(--htb-accent);
  color: #fff;
  border-color: var(--htb-accent);
}

/* Card Body */
.htb-card-body {
  padding: 1.35rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.htb-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--htb-text-muted);
  margin-bottom: 10px;
}

.htb-card-meta .meta-sep {
  width: 3px;
  height: 3px;
  background: var(--htb-text-muted);
  border-radius: 50%;
  flex-shrink: 0;
}

.htb-card-title {
  font-family: var(--htb-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.htb-card-title a {
  color: var(--htb-text);
  transition: color var(--htb-transition);
}

.htb-card-title a:hover { color: var(--htb-accent); }

.htb-card-excerpt {
  font-size: 0.88rem;
  color: var(--htb-text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer */
.htb-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--htb-border);
}

.htb-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.htb-card-author img,
.htb-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--htb-surface);
}

.htb-card-author-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--htb-text);
}

.htb-read-more {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--htb-accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--htb-transition);
}

.htb-read-more svg {
  transition: transform var(--htb-transition);
}

.htb-read-more:hover svg {
  transform: translateX(3px);
}

/* Engagement Stats */
.htb-card-engagement {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.htb-card-engagement span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--htb-text-muted);
}

/* ============================================
   FEATURED CARD — HORIZONTAL HERO
   ============================================ */
.htb-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  border: none;
  background: var(--htb-card-bg);
  box-shadow: var(--htb-card-shadow);
}

.htb-card.featured .htb-card-thumb {
  aspect-ratio: auto;
  min-height: 340px;
  border-radius: var(--htb-radius) 0 0 var(--htb-radius);
}

.htb-card.featured .htb-card-body {
  padding: 2.5rem;
  justify-content: center;
}

.htb-card.featured .htb-card-badge {
  position: static;
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  backdrop-filter: none;
  background: var(--htb-accent-soft);
  border-color: transparent;
}

.htb-card.featured .htb-card-title {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.htb-card.featured .htb-card-excerpt {
  -webkit-line-clamp: 3;
  font-size: 0.92rem;
}

/* ============================================
   TRENDING SECTION
   ============================================ */
.htb-trending {
  background: var(--htb-surface);
  border-radius: var(--htb-radius);
  padding: 2rem;
  margin-bottom: 3rem;
}

.htb-trending-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.htb-trending-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.htb-trending-icon {
  width: 28px;
  height: 28px;
  background: var(--htb-accent-soft);
  border-radius: var(--htb-radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--htb-accent);
}

.htb-trending-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.htb-trending-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0.85rem;
  border-radius: var(--htb-radius-sm);
  background: var(--htb-card-bg);
  border: 1px solid var(--htb-border);
  transition: all var(--htb-transition);
}

.htb-trending-item:hover {
  border-color: var(--htb-accent);
  box-shadow: 0 2px 12px var(--htb-accent-glow);
  transform: translateX(4px);
}

.htb-trending-number {
  font-family: var(--htb-font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--htb-text-muted);
  line-height: 1;
  opacity: 0.4;
  min-width: 36px;
}

.htb-trending-item:hover .htb-trending-number {
  color: var(--htb-accent);
  opacity: 1;
}

.htb-trending-content h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.4;
}

.htb-trending-content h4 a {
  color: var(--htb-text);
}

.htb-trending-content h4 a:hover {
  color: var(--htb-accent);
}

.htb-trending-content .trending-meta {
  font-size: 0.75rem;
  color: var(--htb-text-muted);
}

/* ============================================
   NEWSLETTER — ANIMATED GRADIENT
   ============================================ */
.htb-newsletter {
  position: relative;
  border-radius: var(--htb-radius);
  padding: 3.5rem 2.5rem;
  text-align: center;
  margin: 3rem 0;
  overflow: hidden;
  background: var(--htb-gradient-hero);
  isolation: isolate;
}

.htb-newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: -1;
}

.htb-newsletter::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  top: -60px;
  right: -40px;
  z-index: -1;
  animation: htb-float 8s ease-in-out infinite;
}

@keyframes htb-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 15px); }
}

.htb-newsletter h3 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.htb-newsletter p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.75rem;
  font-size: 1rem;
}

.htb-newsletter-form {
  display: flex;
  max-width: 460px;
  margin: 0 auto;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  padding: 6px;
  border-radius: var(--htb-radius-sm);
  border: 1px solid rgba(255,255,255,0.2);
}

.htb-newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--htb-radius-xs);
  background: transparent;
  color: #fff;
  font-family: var(--htb-font-body);
  font-size: 0.9rem;
  outline: none;
}

.htb-newsletter-form input::placeholder {
  color: rgba(255,255,255,0.5);
}

.htb-newsletter-form button {
  padding: 0.75rem 1.75rem;
  background: #fff;
  color: var(--htb-accent);
  border: none;
  border-radius: var(--htb-radius-xs);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--htb-transition);
  white-space: nowrap;
}

.htb-newsletter-form button:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* ============================================
   SINGLE POST
   ============================================ */
.htb-single {
  max-width: var(--htb-container-narrow);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.htb-single-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.htb-single-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--htb-accent);
  background: var(--htb-accent-soft);
  padding: 0.35rem 1rem;
  border-radius: var(--htb-radius-full);
  margin-bottom: 1.5rem;
}

.htb-single-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.htb-single-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--htb-text-secondary);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.htb-single-meta img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--htb-surface);
}

.htb-single-featured-img {
  border-radius: var(--htb-radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: var(--htb-card-shadow);
}

.htb-single-featured-img img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

/* Table of Contents */
.htb-toc {
  background: var(--htb-surface);
  border-radius: var(--htb-radius-sm);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--htb-border);
}

.htb-toc-title {
  font-family: var(--htb-font-display);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.htb-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.htb-toc-list li {
  margin-bottom: 6px;
}

.htb-toc-list a {
  font-size: 0.88rem;
  color: var(--htb-text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--htb-radius-xs);
  transition: all var(--htb-transition);
}

.htb-toc-list a::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--htb-border);
  flex-shrink: 0;
  transition: background var(--htb-transition);
}

.htb-toc-list a:hover,
.htb-toc-list a.active {
  color: var(--htb-accent);
  background: var(--htb-accent-soft);
}

.htb-toc-list a:hover::before,
.htb-toc-list a.active::before {
  background: var(--htb-accent);
}

/* Post Content */
.htb-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--htb-text);
}

.htb-content h2 {
  font-size: 1.6rem;
  margin: 3rem 0 1rem;
  scroll-margin-top: calc(var(--htb-header-h) + 1rem);
}

.htb-content h3 {
  font-size: 1.3rem;
  margin: 2.5rem 0 0.8rem;
  scroll-margin-top: calc(var(--htb-header-h) + 1rem);
}

.htb-content p { margin-bottom: 1.5rem; }

.htb-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--htb-accent);
  background: var(--htb-accent-soft);
  border-radius: 0 var(--htb-radius-sm) var(--htb-radius-sm) 0;
  font-style: italic;
  color: var(--htb-text-secondary);
}

.htb-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.5rem;
  border-radius: var(--htb-radius-sm);
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.88rem;
  line-height: 1.7;
  font-family: var(--htb-font-mono);
  position: relative;
  border: 1px solid rgba(255,255,255,0.06);
}

.htb-content code {
  font-family: var(--htb-font-mono);
  background: var(--htb-surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

.htb-content pre code {
  background: none;
  padding: 0;
}

.htb-content img {
  border-radius: var(--htb-radius-sm);
  margin: 2rem 0;
  box-shadow: var(--htb-card-shadow);
}

.htb-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--htb-accent-glow);
}

.htb-content a:hover {
  text-decoration-color: var(--htb-accent);
}

/* Post Tags */
.htb-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--htb-border);
}

.htb-post-tags a {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: var(--htb-radius-full);
  background: var(--htb-surface);
  color: var(--htb-text-secondary);
  border: 1px solid var(--htb-border);
  transition: all var(--htb-transition);
}

.htb-post-tags a:hover {
  background: var(--htb-accent);
  color: #fff;
  border-color: var(--htb-accent);
  transform: translateY(-2px);
}

/* Share Floating Bar */
.htb-share-float {
  position: fixed;
  left: calc(50% - 440px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
}

.htb-share-float a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--htb-card-bg);
  color: var(--htb-text-muted);
  border: 1px solid var(--htb-border);
  transition: all var(--htb-transition);
  box-shadow: var(--htb-card-shadow);
}

.htb-share-float a:hover {
  background: var(--htb-accent);
  color: #fff;
  border-color: var(--htb-accent);
  transform: scale(1.1);
}

/* Author Box */
.htb-author-box {
  display: flex;
  gap: 1.25rem;
  padding: 2rem;
  background: var(--htb-surface);
  border-radius: var(--htb-radius);
  margin-top: 3rem;
  border: 1px solid var(--htb-border);
}

.htb-author-box img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.htb-author-box h4 {
  font-size: 1rem;
  margin: 0 0 4px;
}

.htb-author-box p {
  font-size: 0.88rem;
  color: var(--htb-text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Related Posts */
.htb-related {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--htb-border);
}

.htb-section-title {
  font-family: var(--htb-font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

/* ============================================
   FOOTER
   ============================================ */
.htb-footer {
  background: var(--htb-bg-alt);
  border-top: 1px solid var(--htb-border);
  padding: 4rem 0 1.5rem;
  margin-top: 4rem;
}

.htb-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  max-width: var(--htb-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.htb-footer-brand p {
  font-size: 0.88rem;
  color: var(--htb-text-secondary);
  line-height: 1.7;
  margin-top: 0.75rem;
}

.htb-footer h4 {
  font-family: var(--htb-font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--htb-text);
  margin-bottom: 1.25rem;
}

.htb-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.htb-footer li { margin-bottom: 8px; }

.htb-footer a {
  color: var(--htb-text-secondary);
  font-size: 0.88rem;
  transition: all var(--htb-transition);
}

.htb-footer a:hover {
  color: var(--htb-accent);
  padding-left: 4px;
}

.htb-footer-bottom {
  max-width: var(--htb-container);
  margin: 3rem auto 0;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid var(--htb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--htb-text-muted);
}

.htb-footer-social {
  display: flex;
  gap: 8px;
}

.htb-footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--htb-surface);
  color: var(--htb-text-muted);
  border: 1px solid var(--htb-border);
  transition: all var(--htb-transition);
}

.htb-footer-social a:hover {
  background: var(--htb-accent);
  color: #fff;
  border-color: var(--htb-accent);
  transform: translateY(-2px);
}

/* ============================================
   SEARCH OVERLAY — FULL SCREEN
   ============================================ */
.htb-search-overlay {
  position: fixed;
  inset: 0;
  background: var(--htb-overlay);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s var(--htb-ease);
}

.htb-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.htb-search-box {
  background: var(--htb-card-bg);
  border-radius: var(--htb-radius);
  padding: 6px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
  border: 1px solid var(--htb-border);
  transform: translateY(-30px) scale(0.96);
  transition: all 0.4s var(--htb-ease-bounce);
}

.htb-search-overlay.active .htb-search-box {
  transform: translateY(0) scale(1);
}

.htb-search-box input {
  width: 100%;
  border: none;
  outline: none;
  padding: 1.1rem 1.25rem;
  font-size: 1.15rem;
  font-family: var(--htb-font-body);
  background: transparent;
  color: var(--htb-text);
}

.htb-search-box input::placeholder { color: var(--htb-text-muted); }

.htb-search-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1.25rem 0.85rem;
  font-size: 0.78rem;
  color: var(--htb-text-muted);
}

.htb-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  background: var(--htb-surface);
  border: 1px solid var(--htb-border);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--htb-font-mono);
}

/* ============================================
   BACK TO TOP — ANIMATED
   ============================================ */
.htb-back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: var(--htb-card-bg);
  color: var(--htb-accent);
  border: 1px solid var(--htb-border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--htb-transition);
  box-shadow: var(--htb-card-shadow);
  z-index: 50;
}

.htb-back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.htb-back-to-top:hover {
  background: var(--htb-accent);
  color: #fff;
  border-color: var(--htb-accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--htb-accent-glow);
}

/* ============================================
   PAGINATION
   ============================================ */
.htb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3rem 0;
}

.htb-pagination a,
.htb-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.5rem;
  border-radius: var(--htb-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--htb-text-secondary);
  background: var(--htb-card-bg);
  border: 1px solid var(--htb-border);
  transition: all var(--htb-transition);
}

.htb-pagination a:hover {
  border-color: var(--htb-accent);
  color: var(--htb-accent);
  transform: translateY(-2px);
}

.htb-pagination .current {
  background: var(--htb-accent);
  color: #fff;
  border-color: var(--htb-accent);
  box-shadow: 0 4px 12px var(--htb-accent-glow);
}

/* ============================================
   404 PAGE
   ============================================ */
.htb-404 {
  text-align: center;
  padding: 6rem 1.5rem;
}

.htb-404-number {
  font-family: var(--htb-font-display);
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1rem;
  background: var(--htb-gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.htb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.8rem 1.75rem;
  background: var(--htb-accent);
  color: #fff;
  border-radius: var(--htb-radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--htb-transition);
  border: none;
  cursor: pointer;
}

.htb-btn:hover {
  background: var(--htb-accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--htb-accent-glow);
}

.htb-btn-outline {
  background: transparent;
  border: 2px solid var(--htb-border);
  color: var(--htb-text);
}

.htb-btn-outline:hover {
  border-color: var(--htb-accent);
  color: var(--htb-accent);
  background: var(--htb-accent-soft);
  box-shadow: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .htb-share-float { display: none; }
  .htb-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .htb-nav { display: none; }
  .htb-menu-toggle { display: flex; }

  .htb-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--htb-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--htb-bg);
    padding: 2rem 1.5rem;
    gap: 4px;
    z-index: 999;
    animation: htb-slide-in 0.3s var(--htb-ease);
  }

  @keyframes htb-slide-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .htb-nav.mobile-open a {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
  }

  .htb-posts-grid { grid-template-columns: 1fr; }

  .htb-card.featured {
    grid-template-columns: 1fr;
  }

  .htb-card.featured .htb-card-thumb {
    min-height: 220px;
    border-radius: var(--htb-radius) var(--htb-radius) 0 0;
  }

  .htb-footer-grid { grid-template-columns: 1fr; }
  .htb-footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .htb-hero-stats { gap: 1.5rem; }
  .htb-hero h1 { font-size: 2rem; }
  .htb-newsletter { padding: 2.5rem 1.5rem; }
  .htb-newsletter-form { flex-direction: column; }
  .htb-trending-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .htb-single-title { font-size: 1.5rem; }
  .htb-hero-stats { flex-direction: column; gap: 1rem; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .htb-header, .htb-footer, .htb-back-to-top, .htb-search-overlay,
  .htb-share-float, .htb-newsletter, .htb-progress-bar { display: none !important; }
  body { padding-top: 0; }
  .htb-content { font-size: 12pt; }
}
