/*
Theme Name: HelpfulThings
Theme URI: https://helpfulthings.online
Author: HelpfulThings
Author URI: https://helpfulthings.online
Description: Custom theme for HelpfulThings.online — AI tools, productivity, automation, and digital marketing tools blog.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: helpfulthings
Tags: blog, custom-menu, featured-images, two-columns, right-sidebar
*/

/* ── RESET & BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #2563EB;
  --blue-dk: #1D4ED8;
  --green:   #10B981;
  --gray-50: #F9FAFB;
  --gray-100:#F3F4F6;
  --gray-200:#E5E7EB;
  --gray-400:#9CA3AF;
  --gray-600:#4B5563;
  --gray-800:#1F2937;
  --gray-900:#111827;
  --font: 'Inter', 'Segoe UI', Arial, sans-serif;
  /* Aliases used throughout templates */
  --bg:     #F9FAFB;
  --border: #E5E7EB;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-900);
  background: #fff;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dk); }

img { max-width: 100%; height: auto; display: block; }

/* ── NAVIGATION ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 5%; height: 64px;
  display: flex; align-items: center; gap: 24px;
}
/* Logo */
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-icon {
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #2563EB, #10B981);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 16px; letter-spacing: -1px;
}
.logo-text { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.logo-text span { color: var(--blue); }

/* Center nav */
.site-nav { flex: 1; display: flex; justify-content: center; }

/* WordPress nav menu */
.nav-menu { list-style: none; display: flex; align-items: center; gap: 6px; }
.nav-menu li a {
  font-size: 14px; font-weight: 500; color: var(--gray-600);
  text-decoration: none; padding: 7px 12px; border-radius: 7px;
  transition: all .2s; white-space: nowrap;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item a { color: var(--blue); background: #EFF6FF; }

/* Newsletter CTA button */
.nav-cta {
  background: var(--blue); color: #fff !important;
  padding: 8px 18px; border-radius: 8px; font-weight: 600;
  font-size: 14px; text-decoration: none; flex-shrink: 0;
  transition: background .2s; white-space: nowrap;
}
.nav-cta:hover { background: var(--blue-dk); color: #fff !important; }

/* Mobile hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; margin-left: auto; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--gray-800); margin: 5px 0; border-radius: 2px; }

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0FDF4 100%);
  padding: 80px 5% 70px; text-align: center;
  border-bottom: 1px solid var(--gray-200);
}
.hero-badge {
  display: inline-block; background: #DBEAFE; color: var(--blue);
  font-size: 12px; font-weight: 600; letter-spacing: .6px;
  text-transform: uppercase; padding: 5px 14px;
  border-radius: 20px; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 52px); font-weight: 800;
  color: var(--gray-900); line-height: 1.15;
  max-width: 700px; margin: 0 auto 18px;
}
.hero h1 span { color: var(--blue); }
.hero-eyebrow {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .8px; color: var(--blue); margin-bottom: 14px; display: block;
}
.hero p {
  font-size: 18px; color: var(--gray-600); max-width: 560px;
  margin: 0 auto 32px; line-height: 1.7;
}
.hero-search {
  display: flex; gap: 10px; max-width: 480px; margin: 0 auto;
  background: #fff; border: 1.5px solid var(--gray-200);
  border-radius: 10px; padding: 6px 6px 6px 16px;
  box-shadow: 0 2px 12px rgba(37,99,235,.1);
}
.hero-search input {
  flex: 1; border: none; outline: none;
  font-size: 15px; color: var(--gray-800); font-family: inherit;
}
.hero-search button {
  background: var(--blue); color: #fff; border: none; border-radius: 7px;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.hero-search button:hover { background: var(--blue-dk); }

/* ── CATEGORY PILLS ───────────────────────────────────────────────────────── */
.category-bar {
  background: #fff; padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
  overflow: hidden;
}
.cat-pills {
  display: flex; gap: 10px;
  justify-content: flex-start; /* never center in a scrollable row — centered overflow is unreachable */
  flex-wrap: nowrap; overflow-x: auto;
  width: 100%; box-sizing: border-box;
  padding: 2px 8px; /* small fixed gutter — .container already provides the 5% page margin */
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.cat-pills::-webkit-scrollbar { display: none; }
.cat-pill {
  padding: 8px 18px; border-radius: 99px; font-size: 13px;
  font-weight: 600; text-decoration: none; transition: all .2s;
  border: 1px solid var(--gray-200); color: var(--gray-600);
  background: var(--gray-100);
  white-space: nowrap; flex-shrink: 0;
}
.cat-pill:hover, .cat-pill.active {
  background: #DBEAFE; color: var(--blue);
  border-color: #BFDBFE;
}
.cat-pill.current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── MAIN LAYOUT ──────────────────────────────────────────────────────────── */
.site-main { padding: 48px 0; }

.container {
  max-width: 1200px; margin: 0 auto; padding: 0 5%;
}

/* 2-column layout: posts + sidebar */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.posts-column { min-width: 0; } /* prevent grid blowout */

.site-main.full-width .main-grid { grid-template-columns: 1fr; max-width: 860px; }

/* ── POST CATEGORY BADGE ──────────────────────────────────────────────────── */
.post-cat {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--blue); margin-bottom: 8px;
  display: block;
}

/* ── FEATURED POST ────────────────────────────────────────────────────────── */
.featured-post {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--gray-200); margin-bottom: 40px;
  display: grid; grid-template-columns: 1fr 1fr;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s; text-decoration: none; color: inherit;
}
.featured-post:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,.1); }
.featured-img {
  min-height: 260px; display: flex; align-items: center;
  justify-content: center; font-size: 72px;
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  overflow: hidden;
}
.featured-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.featured-body h2 { font-size: 22px; font-weight: 700; line-height: 1.35; margin-bottom: 10px; color: var(--gray-900); }
.featured-body p { font-size: 14px; color: var(--gray-600); line-height: 1.6; margin-bottom: 20px; }
.read-more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--blue); font-weight: 600; font-size: 14px;
}
.read-more:hover { color: var(--blue-dk); }

/* ── SECTION TITLE ────────────────────────────────────────────────────────── */
.section-title {
  font-size: 20px; font-weight: 700; color: var(--gray-900);
  margin-bottom: 24px; display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

/* ── POST GRID ────────────────────────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.post-card {
  border-radius: 12px; border: 1px solid var(--gray-200); overflow: hidden;
  background: #fff; transition: transform .2s, box-shadow .2s;
  text-decoration: none; color: inherit; display: block;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.09); }
.card-img {
  height: 150px; display: flex; align-items: center;
  justify-content: center; font-size: 44px; overflow: hidden;
  flex-shrink: 0;
}
/* img is now always inside a .card-img div — never the card-img itself */
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img.ai   { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); }
.card-img.prod { background: linear-gradient(135deg, #F0FDF4, #DCFCE7); }
.card-img.auto { background: linear-gradient(135deg, #FFF7ED, #FED7AA); }
.card-img.mkt  { background: linear-gradient(135deg, #FDF4FF, #F3E8FF); }
.card-body { padding: 18px; }
.card-body h3 { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; color: var(--gray-900); }
.card-body p { font-size: 13px; color: var(--gray-600); line-height: 1.5; margin-bottom: 12px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-date, .card-min { font-size: 12px; color: var(--gray-400); }

/* ── ARCHIVE HEADER ───────────────────────────────────────────────────────── */
.archive-header {
  background: linear-gradient(135deg, #EFF6FF, #F0FDF4);
  padding: 48px 5%; border-bottom: 1px solid var(--gray-200);
}
.archive-header-inner { max-width: 1200px; margin: 0 auto; }
.archive-header h1 { font-size: 32px; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; }
.archive-header p { font-size: 16px; color: var(--gray-600); }

/* ── SINGLE POST ──────────────────────────────────────────────────────────── */
.single-post-header {
  background: linear-gradient(135deg, #EFF6FF, #F0FDF4);
  padding: 60px 5% 48px; border-bottom: 1px solid var(--gray-200);
}
.single-post-header-inner { max-width: 1200px; margin: 0 auto; }
.single-post-header h1 {
  font-size: clamp(26px, 4vw, 42px); font-weight: 800;
  color: var(--gray-900); line-height: 1.2; margin-bottom: 16px;
}
.single-post-meta { display: flex; gap: 20px; font-size: 13px; color: var(--gray-400); flex-wrap: wrap; }
.single-post-meta span { display: flex; align-items: center; gap: 5px; }

.single-post-thumbnail {
  max-width: 1200px; margin: 0 auto; padding: 0 5%;
}
.single-post-thumbnail img { width: 100%; border-radius: 12px; margin-top: -24px; box-shadow: 0 4px 24px rgba(0,0,0,.1); }

/* Entry content styles */
.entry-content { font-size: 16px; line-height: 1.8; color: var(--gray-800); }
.entry-content h2 { font-size: 24px; font-weight: 700; color: var(--gray-900); margin: 36px 0 16px; }
.entry-content h3 { font-size: 20px; font-weight: 600; color: var(--gray-900); margin: 28px 0 12px; }
.entry-content p { margin-bottom: 20px; }
.entry-content ul, .entry-content ol { margin: 0 0 20px 24px; }
.entry-content li { margin-bottom: 8px; }
.entry-content strong { color: var(--gray-900); font-weight: 600; }
.entry-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--blue-dk); }
.entry-content blockquote {
  border-left: 4px solid var(--blue); padding: 16px 24px;
  margin: 24px 0; background: var(--gray-50); border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--gray-600);
}
.entry-content img { border-radius: 10px; margin: 24px 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.entry-content th { background: var(--blue); color: #fff; padding: 10px 14px; text-align: left; font-weight: 600; }
.entry-content td { padding: 10px 14px; border-bottom: 1px solid var(--gray-200); }
.entry-content tr:nth-child(even) td { background: var(--gray-50); }

/* Affiliate CTA button styling */
.entry-content a[style*="background:#2563EB"],
.entry-content a[style*="background: #2563EB"] {
  transition: background .2s !important;
}

/* ── STATIC PAGE ──────────────────────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, #EFF6FF, #F0FDF4);
  padding: 60px 5% 48px; border-bottom: 1px solid var(--gray-200);
  text-align: center;
}
.page-header h1 { font-size: 36px; font-weight: 800; color: var(--gray-900); }
.page-content { max-width: 860px; margin: 0 auto; padding: 48px 5%; }
.page-content h2 { font-size: 22px; font-weight: 700; color: var(--gray-900); margin: 32px 0 14px; }
.page-content h3 { font-size: 18px; font-weight: 600; color: var(--gray-800); margin: 24px 0 10px; }
.page-content p { font-size: 16px; color: var(--gray-700, #374151); line-height: 1.8; margin-bottom: 18px; }
.page-content ul, .page-content ol { margin: 0 0 18px 24px; }
.page-content li { margin-bottom: 8px; font-size: 16px; color: var(--gray-700, #374151); }
.page-content a { color: var(--blue); }

/* ── SIDEBAR ──────────────────────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
  background: var(--gray-50); border-radius: 12px; padding: 22px;
  border: 1px solid var(--gray-200);
}
.widget-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--gray-600); margin-bottom: 16px;
}
/* WordPress default widgets */
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li { padding: 8px 0; border-bottom: 1px solid var(--gray-200); font-size: 13px; }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { color: var(--gray-700, #374151); font-weight: 500; }
.sidebar-widget ul li a:hover { color: var(--blue); }
.sidebar-widget ul li .post-count { color: var(--gray-400); font-size: 12px; }

/* Newsletter widget */
.newsletter-widget { background: linear-gradient(135deg, #EFF6FF, #F0FDF4); }
.newsletter-widget h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.newsletter-widget p { font-size: 13px; color: var(--gray-600); margin-bottom: 14px; line-height: 1.6; }
.newsletter-widget input[type="email"] {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-200);
  border-radius: 8px; font-size: 14px; margin-bottom: 10px;
  font-family: inherit; outline: none;
}
.newsletter-widget input[type="email"]:focus { border-color: var(--blue); }
.newsletter-widget button, .newsletter-widget input[type="submit"] {
  width: 100%; background: var(--blue); color: #fff; border: none;
  border-radius: 8px; padding: 11px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.newsletter-widget button:hover { background: var(--blue-dk); }

/* ── CATEGORIES SECTION ───────────────────────────────────────────────────── */
.category-section, .categories-section {
  background: var(--gray-50); padding: 60px 5%;
  border-top: 1px solid var(--gray-200);
}
.category-section .container, .categories-section-inner { max-width: 1200px; margin: 0 auto; }
.section-title {
  font-size: 26px; font-weight: 700; text-align: center;
  margin-bottom: 32px; color: var(--gray-900);
}

/* Category cards grid */
.cat-cards, .cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.cat-card {
  border-radius: 14px; padding: 28px 20px; text-align: center;
  text-decoration: none; color: inherit; border: 1px solid transparent;
  transition: all .2s; display: flex; flex-direction: column; align-items: center;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }

/* Card color variants */
.cat-card.ai   { background: linear-gradient(135deg,#EFF6FF,#DBEAFE); border-color:#BFDBFE; }
.cat-card.prod { background: linear-gradient(135deg,#F0FDF4,#DCFCE7); border-color:#A7F3D0; }
.cat-card.auto { background: linear-gradient(135deg,#FFF7ED,#FFEDD5); border-color:#FED7AA; }
.cat-card.mkt  { background: linear-gradient(135deg,#FDF4FF,#F3E8FF); border-color:#E9D5FF; }

.cat-card-emoji { font-size: 40px; margin-bottom: 14px; display: block; }
.cat-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
.cat-card p { font-size: 13px; color: var(--gray-600); line-height: 1.5; margin-bottom: 16px; }
.cat-card-link {
  font-size: 13px; font-weight: 600; color: var(--blue);
  margin-top: auto; display: inline-block;
}
.cat-icon { font-size: 36px; margin-bottom: 14px; }

/* ── PAGINATION ───────────────────────────────────────────────────────────── */
.pagination {
  margin: 40px 0; display: flex; justify-content: center; gap: 8px;
}
.pagination .page-numbers {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--gray-200);
  font-size: 14px; font-weight: 500; color: var(--gray-600);
  text-decoration: none; transition: all .2s;
}
.pagination .page-numbers:hover { border-color: var(--blue); color: var(--blue); }
.pagination .page-numbers.current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--gray-900); color: #9CA3AF; padding: 48px 5% 24px; }
.footer-top {
  max-width: 1200px; margin: 0 auto 36px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}
.footer-brand p { font-size: 13px; line-height: 1.7; margin-top: 12px; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #9CA3AF; font-size: 13px; text-decoration: none; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  border-top: 1px solid #374151; padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 12px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #9CA3AF; font-size: 12px; text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* ── 404 PAGE ─────────────────────────────────────────────────────────────── */
.error-404 { text-align: center; padding: 100px 5%; }
.error-404 .error-code { font-size: 96px; font-weight: 800; color: var(--blue); line-height: 1; }
.error-404 h1 { font-size: 28px; font-weight: 700; margin: 16px 0 12px; }
.error-404 p { font-size: 16px; color: var(--gray-600); margin-bottom: 28px; }
.btn-primary {
  background: var(--blue); color: #fff; padding: 12px 24px;
  border-radius: 8px; font-weight: 600; font-size: 15px; text-decoration: none;
  display: inline-block; transition: background .2s;
}
.btn-primary:hover { background: var(--blue-dk); color: #fff; }

/* ── SEARCH FORM ──────────────────────────────────────────────────────────── */
.search-form { display: flex; gap: 8px; max-width: 400px; margin: 0 auto; }
.search-form input[type="search"] {
  flex: 1; padding: 10px 16px; border: 1.5px solid var(--gray-200);
  border-radius: 8px; font-size: 14px; font-family: inherit; outline: none;
}
.search-form input[type="search"]:focus { border-color: var(--blue); }
.search-form button { background: var(--blue); color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-weight: 600; cursor: pointer; }

/* ── FOOTER GRID (PHP template) ───────────────────────────────────────────── */
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
  max-width: 1200px; margin: 0 auto 36px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-logo span { color: #fff; font-size: 16px; font-weight: 700; }
.footer-tagline { font-size: 13px; line-height: 1.7; margin-top: 12px; max-width: 280px; }
.footer-disclosure { font-size: 11px; color: #6B7280; }

/* ── NEWSLETTER SECTION ───────────────────────────────────────────────────── */
.newsletter-section { background: var(--blue); padding: 56px 5%; color: #fff; }
.newsletter-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.newsletter-text { flex: 1; min-width: 240px; }
.newsletter-text h2 { font-size: 1.6rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.newsletter-text p { font-size: 15px; opacity: .85; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 280px; }
.newsletter-form input[type="email"] {
  flex: 1; min-width: 200px; padding: 12px 16px; border-radius: 8px;
  border: none; font-size: 15px; font-family: inherit; outline: none;
}
.newsletter-form button {
  background: var(--green); color: #fff; border: none; border-radius: 8px;
  padding: 12px 22px; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .2s;
}
.newsletter-form button:hover { background: #059669; }

/* ── ARCHIVE HERO ─────────────────────────────────────────────────────────── */
.archive-hero { padding: 48px 5% 32px; text-align: center; }
.archive-hero .archive-emoji { font-size: 3rem; display: block; margin-bottom: 12px; }
.archive-hero .archive-title { font-size: 2rem; font-weight: 800; color: var(--gray-900); margin-bottom: 10px; }
.archive-hero .archive-desc { color: var(--gray-600); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.cat-banner-ai   { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); }
.cat-banner-prod { background: linear-gradient(135deg, #F0FDF4, #DCFCE7); }
.cat-banner-auto { background: linear-gradient(135deg, #FFF7ED, #FFEDD5); }
.cat-banner-mkt  { background: linear-gradient(135deg, #FDF4FF, #F3E8FF); }

/* ── SINGLE POST / ENTRY ──────────────────────────────────────────────────── */
/* .single-main inherits padding: 48px 0 from .site-main — no override needed */
.entry-header { margin-bottom: 24px; }
.entry-cats { margin-bottom: 12px; }
.entry-cat {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.entry-cat.cat-ai   { background: #DBEAFE; color: #1D4ED8; }
.entry-cat.cat-prod { background: #D1FAE5; color: #065F46; }
.entry-cat.cat-auto { background: #FFEDD5; color: #9A3412; }
.entry-cat.cat-mkt  { background: #F3E8FF; color: #7E22CE; }
.entry-title { font-size: 2rem; font-weight: 800; color: var(--gray-900); line-height: 1.25; margin-bottom: 16px; }
.entry-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--gray-500); flex-wrap: wrap; }
.meta-divider { color: var(--gray-300); }
.entry-thumbnail { margin: 24px 0; border-radius: 12px; overflow: hidden; }
.entry-thumbnail img { width: 100%; height: auto; display: block; }
.entry-thumbnail-placeholder { height: 320px; border-radius: 12px; margin: 24px 0; }

.entry-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.entry-tag {
  background: var(--gray-100); color: var(--gray-600);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
  text-decoration: none; transition: background .2s;
}
.entry-tag:hover { background: #DBEAFE; color: var(--blue); }

/* ── AUTHOR BOX ──────────────────────────────────────────────────────────── */
.author-box {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px; margin-top: 36px;
}
.author-avatar-placeholder {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.author-info .author-label { font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; }
.author-info .author-name { display: block; font-weight: 700; font-size: 15px; color: var(--gray-900); margin: 2px 0 6px; }
.author-info .author-bio { font-size: 13px; color: var(--gray-600); line-height: 1.6; margin: 0; }

/* ── RELATED POSTS ───────────────────────────────────────────────────────── */
.related-posts { background: var(--bg); padding: 48px 5%; margin-top: 48px; }
.related-grid { grid-template-columns: repeat(3, 1fr); }

/* ── SIDEBAR EXTRA STYLES ────────────────────────────────────────────────── */
.sidebar-newsletter-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.sidebar-newsletter-form input[type="email"] {
  padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 13px; font-family: inherit; outline: none;
}
.sidebar-newsletter-form button {
  background: var(--blue); color: #fff; border: none;
  border-radius: 8px; padding: 10px; font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background .2s;
}
.sidebar-newsletter-form button:hover { background: var(--blue-dk); }
.top-tools-list { list-style: none; }
.top-tool-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.top-tool-item:last-child { border-bottom: none; }
.tool-thumb { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; }
.tool-thumb.ai   { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); }
.tool-thumb.prod { background: linear-gradient(135deg, #F0FDF4, #DCFCE7); }
.tool-thumb.auto { background: linear-gradient(135deg, #FFF7ED, #FED7AA); }
.tool-thumb.mkt  { background: linear-gradient(135deg, #FDF4FF, #F3E8FF); }
.tool-name { font-size: 13px; font-weight: 600; color: var(--gray-900); text-decoration: none; display: block; line-height: 1.3; }
.tool-name:hover { color: var(--blue); }
.tool-cat { font-size: 11px; color: var(--gray-500); }
.sidebar-cats { list-style: none; }
.sidebar-cats li { margin-bottom: 6px; }
.sidebar-cat-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; border-radius: 8px; text-decoration: none;
  font-size: 13px; font-weight: 500; transition: background .15s;
}
.sidebar-cat-link.cat-ai   { background: #EFF6FF; color: #1D4ED8; }
.sidebar-cat-link.cat-prod { background: #F0FDF4; color: #065F46; }
.sidebar-cat-link.cat-auto { background: #FFF7ED; color: #9A3412; }
.sidebar-cat-link.cat-mkt  { background: #FDF4FF; color: #7E22CE; }
.cat-count { font-size: 11px; background: rgba(0,0,0,.08); border-radius: 999px; padding: 2px 8px; }
.recent-posts-list { list-style: none; }
.recent-posts-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.recent-posts-list a { font-size: 13px; font-weight: 500; color: var(--gray-900); text-decoration: none; line-height: 1.4; flex: 1; }
.recent-posts-list a:hover { color: var(--blue); }
.recent-date { font-size: 11px; color: var(--gray-500); white-space: nowrap; }

/* ── CONTACT FORM (CF7 + generic page forms) ─────────────────────────────── */
.wpcf7-form p,
.entry-content form p { margin-bottom: 20px; }

.wpcf7-form label,
.entry-content form label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--gray-800); margin-bottom: 6px;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form select,
.wpcf7-form textarea,
.entry-content form input[type="text"],
.entry-content form input[type="email"],
.entry-content form textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px; font-size: 15px;
  font-family: inherit; outline: none;
  color: var(--gray-800); background: #fff;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus,
.entry-content form input[type="text"]:focus,
.entry-content form input[type="email"]:focus,
.entry-content form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.wpcf7-form textarea,
.entry-content form textarea {
  min-height: 160px; resize: vertical; line-height: 1.6;
}

.wpcf7-form .wpcf7-submit,
.entry-content form input[type="submit"],
.entry-content form button[type="submit"] {
  background: var(--blue); color: #fff;
  border: none; border-radius: 8px;
  padding: 13px 32px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background .2s; display: inline-block;
  margin-top: 4px;
}
.wpcf7-form .wpcf7-submit:hover,
.entry-content form input[type="submit"]:hover,
.entry-content form button[type="submit"]:hover { background: var(--blue-dk); }

/* CF7 validation + response messages */
.wpcf7-not-valid-tip { color: #DC2626; font-size: 13px; margin-top: 5px; display: block; }
.wpcf7-form-control.wpcf7-not-valid { border-color: #DC2626 !important; }
.wpcf7-response-output {
  border-radius: 8px; padding: 12px 16px; font-size: 14px;
  margin-top: 20px; border: none !important;
}
.wpcf7-mail-sent-ok { background: #D1FAE5; color: #065F46; }
.wpcf7-mail-sent-ng,
.wpcf7-validation-errors { background: #FEE2E2; color: #991B1B; }

/* ── NEWSLETTER INLINE FEEDBACK ──────────────────────────────────────────── */
.ht-newsletter-msg {
  font-size: 13px; font-weight: 500;
  margin-top: 10px; padding: 8px 12px;
  border-radius: 8px; line-height: 1.4;
}
.ht-newsletter-msg--success {
  background: #D1FAE5; color: #065F46;
}
.ht-newsletter-msg--error {
  background: #FEE2E2; color: #991B1B;
}
.sidebar-newsletter-form button:disabled {
  opacity: 0.7; cursor: not-allowed;
}
/* Big footer form success state — white text on blue background */
.ht-newsletter-msg--success-inline {
  color: #fff; font-size: 1.1rem; font-weight: 600;
  padding: 12px 0; text-align: center;
}
.ht-newsletter-msg--success-inline::before {
  content: '✓ '; color: #10B981;
}

/* ── NO RESULTS / PAGE ────────────────────────────────────────────────────── */
.no-results { text-align: center; padding: 60px 20px; }
.no-results h2 { font-size: 1.5rem; margin-bottom: 12px; }
.no-results p { color: var(--gray-600); margin-bottom: 24px; }
.page-main .entry-title { font-size: 2rem; font-weight: 800; margin-bottom: 24px; }

/* ── MOBILE NAV OPEN STATE ────────────────────────────────────────────────── */
.site-header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.08); }
.site-nav.nav-open .nav-menu {
  display: flex; flex-direction: column;
  position: absolute; top: 64px; left: 0; right: 0;
  background: #fff; padding: 16px 5%;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  z-index: 99;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cat-cards, .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .site-sidebar { order: 2; margin-top: 48px; } /* sidebar stacks below content on tablet/mobile */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-img { min-height: 200px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-inner { flex-direction: column; gap: 24px; }
  /* Collapse nav on tablet */
  .site-nav { display: none; }
  .site-nav.nav-open { display: flex; }
  .nav-toggle { display: flex; flex-direction: column; }
  .nav-cta { display: none; }
}

@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .cat-cards, .cat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 16px; }
  .related-grid { grid-template-columns: 1fr; }
  .entry-title { font-size: 1.5rem; }
  .author-box { flex-direction: column; }
  .archive-hero .archive-title { font-size: 1.5rem; }

  /* ── Hero: reduce padding on mobile ── */
  .hero { padding: 40px 5% 36px; }

  /* ── Single post: breathing room below nav ── */
  .single-main { padding-top: 28px; }
  .entry-header { margin-bottom: 16px; }

  /* ── Entry content: tighter line-height and spacing ── */
  .entry-content { font-size: 15px; line-height: 1.65; }
  .entry-content p { margin-bottom: 14px; }
  .entry-content h2 { font-size: 20px; margin: 24px 0 12px; }
  .entry-content h3 { font-size: 17px; margin: 20px 0 10px; }
}
