/*
Theme Name:  TalkTools Blog
Theme URI:   https://blog.talktools.com
Author:      TalkTools
Author URI:  https://talktools.com
Description: Custom blog theme for TalkTools — evidence-based tools and education for speech-language pathologists, feeding therapists, and families. Features a responsive hero, category chip filter, article list with sidebar, and full-width footer.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: talktools
Tags:        blog, medical, therapy, responsive, accessibility-ready, custom-header, custom-menu, featured-images, sticky-post, threaded-comments, translation-ready
*/

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

:root {
  --purple:    #6361aa;
  --yellow:    #ffd677;
  --green:     #86cba4;
  --magenta:   #ed3877;
  --gray:      #242424;

  --purple-10: rgba(99,97,170,0.1);
  --purple-15: rgba(99,97,170,0.15);
  --yellow-10: rgba(255,214,119,0.12);
  --green-10:  rgba(134,203,164,0.12);
  --magenta-10:rgba(237,56,119,0.1);

  --bg:        #f8f8f9;
  --surface:   #ffffff;
  --ink:       #1c1c1e;
  --ink-2:     #48484a;
  --ink-3:     #767676;
  --line:      rgba(28,28,30,0.08);
  --line-md:   rgba(28,28,30,0.14);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 2px 12px rgba(0,0,0,0.04);
  --shadow:    0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);

  --announce-h:    30px;
  --header-mid-h:  68px;
  --header-nav-h:  48px;
  --header-total:  calc(var(--announce-h) + var(--header-mid-h) + var(--header-nav-h));

  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --focus-ring:  3px solid #005fcc;
  --focus-ring-offset: 2px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════
   ACCESSIBILITY
═══════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 1rem;
  z-index: 9999;
  background: var(--purple);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 0; outline: var(--focus-ring); outline-offset: var(--focus-ring-offset); }

*:focus { outline: none; }
*:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-ring-offset); border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.03); }
}

/* ═══════════════════════════════════════
   SITE HEADER
═══════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
}

/* Announcement bar */
.announce-bar {
  background: var(--purple);
  color: #fff;
  text-align: center;
  padding: 0.45rem 1rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
}
.announce-bar-social {
  position: absolute;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.announce-bar-social a {
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.announce-bar-social a:hover { color: #fff; }

/* Middle row */
.header-mid {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 2.5rem;
  height: 68px;
  gap: 2rem;
}
.header-logo { flex-shrink: 0; text-decoration: none; display: flex; align-items: center; transition: opacity 0.2s; }
.header-logo:hover { opacity: 0.78; }
.header-logo img { height: 38px; width: auto; }
.header-logo .custom-logo { height: 38px; width: auto; }

.header-search { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.header-search input,
.header-search .search-field {
  width: 100%;
  height: 44px;
  border: 2px solid rgba(99,97,170,0.25);
  border-radius: 100px;
  padding: 0 3rem 0 1.25rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  color: var(--ink);
  background: #f5f4fb;
  transition: border-color 0.2s, background 0.2s;
}
.header-search input::placeholder,
.header-search .search-field::placeholder { color: var(--ink-3); }
.header-search input:focus-visible,
.header-search .search-field:focus-visible { border-color: var(--purple); background: #fff; outline: var(--focus-ring); outline-offset: 0; }
.header-search-btn,
.header-search .search-submit {
  position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--purple);
  display: flex; align-items: center;
  padding: 0.5rem; min-width: 44px; min-height: 44px; justify-content: center;
  font-size: 0; /* hide "Search" text from WP search form */
}

.header-actions { display: flex; align-items: center; gap: 1.5rem; flex-shrink: 0; }
.header-action-link {
  display: flex; align-items: center; gap: 0.45rem;
  text-decoration: none; color: var(--ink);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  transition: color 0.2s; min-height: 44px; padding: 0 0.25rem;
}
.header-action-link:hover { color: var(--purple); }
.header-action-link svg { color: var(--green); flex-shrink: 0; }
.header-action-link:hover svg { color: var(--purple); }
.cart-count {
  background: var(--magenta); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 0.25rem; margin-left: -0.5rem; margin-top: -0.75rem;
}

/* Bottom nav row */
.header-nav { background: #fff; border-bottom: 1px solid var(--line); }
.header-nav-inner,
.header-nav > ul,
.header-nav .menu {
  max-width: 1200px; margin: 0 auto; padding: 0 2.5rem;
  display: flex; align-items: center; gap: 0; list-style: none; height: 48px;
}
.header-nav-item,
.header-nav li { position: relative; }

.header-nav-item > a,
.header-nav-item > button,
.header-nav li > a,
.header-nav li > button {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0 1.1rem; height: 48px; min-height: 44px;
  font-family: 'Poppins', sans-serif; font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  background: none; border: none; cursor: pointer;
  white-space: nowrap; transition: color 0.2s; border-bottom: 2px solid transparent;
}
.header-nav-item > a:hover, .header-nav-item > button:hover,
.header-nav-item:hover > a, .header-nav-item:hover > button,
.header-nav li > a:hover, .header-nav li:hover > a { color: var(--purple); border-bottom-color: var(--purple); }
.header-nav-item > a.active,
.header-nav li > a.current-menu-item,
.header-nav li.current-menu-item > a { color: var(--magenta); border-bottom-color: var(--magenta); }

/* Dropdown */
.dropdown,
.header-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 0.5rem 0; opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease); z-index: 300;
}
.header-nav-item:hover > .dropdown,
.header-nav-item:focus-within > .dropdown,
.header-nav li:hover > .sub-menu,
.header-nav li:focus-within > .sub-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.header-nav-item > button[aria-expanded="true"] + .dropdown { opacity: 1; pointer-events: auto; transform: translateY(0); }

.dropdown a, .header-nav .sub-menu a {
  display: block; padding: 0.65rem 1.25rem;
  font-size: 0.78rem; color: var(--ink-2); text-decoration: none;
  transition: color 0.15s, background 0.15s;
  /* override nav link styles */
  height: auto; min-height: unset; border-bottom: none;
  text-transform: none; letter-spacing: 0; font-weight: 400;
}
.dropdown a:hover, .header-nav .sub-menu a:hover { color: var(--purple); background: var(--purple-10); }
.dropdown-divider { height: 1px; background: var(--line); margin: 0.35rem 0; }

.chevron { width: 10px; height: 10px; transition: transform 0.2s; }
.header-nav-item:hover .chevron { transform: rotate(180deg); }

/* Mobile toggle */
.mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none; margin-left: auto;
}
.mobile-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s; }
.mobile-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  margin-top: calc(var(--announce-h) + var(--header-mid-h) + var(--header-nav-h));
  background: linear-gradient(135deg, #f5f4fb 0%, #f8f8f9 60%, #eef6f2 100%);
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ''; position: absolute; top: -80px; right: 40%;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,97,170,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -60px; left: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(134,203,164,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 580px) minmax(0, 1fr);
  align-items: stretch; min-height: 480px;
  position: relative; z-index: 1;
  width: 100%; max-width: 1440px; margin: 0 auto;
}
.hero-content {
  display: flex; flex-direction: column; justify-content: center;
  padding: 3.5rem 3.5rem 3.5rem clamp(2rem, 5vw, 5rem);
  width: 100%; max-width: 580px; margin-left: auto;
}
.hero-image-wrap { position: relative; overflow: hidden; }
.hero-img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center 20%; display: block; min-height: 460px;
}

.hero-title { animation: slideUp 0.7s var(--ease-out) 0.1s both; }
.hero-sub    { animation: slideUp 0.7s var(--ease-out) 0.2s both; }
.hero-actions{ animation: slideUp 0.7s var(--ease-out) 0.3s both; }
.hero-stats  { animation: slideUp 0.7s var(--ease-out) 0.4s both; }

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.15;
  color: var(--ink); margin-bottom: 1.25rem;
}
.hero-title em { font-style: normal; color: var(--purple); }
.hero-sub {
  font-size: 1rem; font-weight: 300; color: var(--ink-2);
  max-width: 520px; margin-bottom: 2rem; line-height: 1.7;
}
.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-stats { display: flex; gap: 2rem; }
.stat { display: flex; flex-direction: column; }
.stat-number { font-size: 1.4rem; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.stat-label  { font-size: 0.72rem; font-weight: 400; color: var(--ink-3); letter-spacing: 0.02em; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn-primary {
  background: var(--purple); color: #fff;
  font-family: 'Poppins', sans-serif; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.02em; padding: 0.7rem 1.75rem;
  border-radius: 100px; border: none; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: background 0.2s, transform 0.15s var(--ease-spring), box-shadow 0.2s;
  box-shadow: 0 2px 16px rgba(99,97,170,0.3);
}
.btn-primary:hover { background: #7270bb; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(99,97,170,0.4); }
.btn-ghost {
  color: var(--ink-2); font-family: 'Poppins', sans-serif;
  font-size: 0.82rem; font-weight: 500; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: color 0.2s, gap 0.2s;
}
.btn-ghost:hover { color: var(--purple); gap: 0.65rem; }
.btn-ghost svg { transition: transform 0.2s; }
.btn-ghost:hover svg { transform: translateX(3px); }

/* ═══════════════════════════════════════
   CATEGORY CHIPS
═══════════════════════════════════════ */
.chips-bar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky;
  top: calc(var(--announce-h) + var(--header-mid-h) + var(--header-nav-h));
  z-index: 100;
}
.chips-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 3rem;
  display: flex; align-items: center; gap: 0.5rem;
  overflow-x: auto; scrollbar-width: none; height: 56px;
}
.chips-inner::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap; font-family: 'Poppins', sans-serif;
  font-size: 0.72rem; font-weight: 500; padding: 0.35rem 1rem;
  border-radius: 100px; border: 1px solid var(--line-md);
  background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s var(--ease-spring);
  text-decoration: none; display: inline-block;
}
.chip:hover, .chip.active {
  background: var(--purple-10); border-color: rgba(99,97,170,0.25); color: var(--purple);
}
.chip.active { font-weight: 600; }
.chip:hover  { transform: translateY(-1px); }

/* ═══════════════════════════════════════
   MAIN CONTENT LAYOUT
═══════════════════════════════════════ */
.main {
  max-width: 1200px; margin: 0 auto; padding: 3rem;
  display: grid; grid-template-columns: 1fr 300px;
  gap: 3rem; align-items: start;
}

/* Section headings */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.75rem; }
.section-title { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.section-view-all {
  font-size: 0.72rem; font-weight: 500; color: var(--purple);
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem;
  transition: gap 0.2s, opacity 0.2s;
}
.section-view-all:hover { gap: 0.5rem; opacity: 0.8; }

/* ═══════════════════════════════════════
   POST CARDS
═══════════════════════════════════════ */
.posts-list {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--line); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.post-card {
  background: var(--surface); display: grid;
  grid-template-columns: auto 1fr; gap: 0;
  text-decoration: none; color: inherit; position: relative; transition: background 0.15s;
}
.post-card:hover { background: #fcfcfe; }
.post-card::before {
  content: ''; position: absolute; left: 0; top: 16px; bottom: 16px;
  width: 3px; border-radius: 0 2px 2px 0; background: var(--purple);
  opacity: 0; transition: opacity 0.2s;
}
.post-card:hover::before { opacity: 1; }

.post-card-color { width: 4px; align-self: stretch; }
.post-card-inner { padding: 1.25rem 1.4rem 1.25rem 1.5rem; display: flex; align-items: center; gap: 1.25rem; }
.post-card-text  { flex: 1; }
.post-card-cat {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--purple); margin-bottom: 0.3rem;
}
.post-card-title {
  font-size: 0.92rem; font-weight: 600; line-height: 1.4;
  color: var(--ink); margin-bottom: 0.4rem; transition: color 0.15s;
}
.post-card:hover .post-card-title { color: var(--purple); }
.post-card-excerpt {
  font-size: 0.78rem; font-weight: 300; color: var(--ink-3); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-meta { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.6rem; }
.post-card-date  { font-size: 0.68rem; color: var(--ink-3); font-weight: 400; }
.post-card-arrow { color: var(--ink-3); flex-shrink: 0; transition: transform 0.2s var(--ease-spring), color 0.2s; }
.post-card:hover .post-card-arrow { transform: translateX(4px); color: var(--purple); }

.post-tag {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.18rem 0.6rem; border-radius: 100px;
  background: var(--purple-10); color: var(--purple); border: 1px solid rgba(99,97,170,0.15);
}
.post-tag.green   { background: var(--green-10);   color: #3a9967;     border-color: rgba(134,203,164,0.25); }
.post-tag.magenta { background: var(--magenta-10); color: var(--magenta); border-color: rgba(237,56,119,0.18); }
.post-tag.yellow  { background: var(--yellow-10);  color: #b07d00;     border-color: rgba(255,214,119,0.3); }

.accent-purple { background: var(--purple); }
.accent-green  { background: var(--green); }
.accent-magenta{ background: var(--magenta); }
.accent-yellow { background: var(--yellow); }

/* ═══════════════════════════════════════
   FEATURED GRID
═══════════════════════════════════════ */
.featured-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-bottom: 2.5rem;
}
.featured-card {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); overflow: hidden; text-decoration: none; color: inherit; display: block;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.featured-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.featured-card-img {
  height: 130px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.featured-card-img.purple  { background: linear-gradient(135deg, #e8e7f5, #d6d5ee); }
.featured-card-img.green   { background: linear-gradient(135deg, #d4f0e2, #c2e8d4); }
.featured-card-img.magenta { background: linear-gradient(135deg, #fce4ec, #f8cdd9); }
.featured-card-img.yellow  { background: linear-gradient(135deg, #fff8e1, #ffedb3); }
.featured-card-img svg { opacity: 0.5; }
.featured-card-body { padding: 1rem 1.1rem; }
.featured-card-cat {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--purple); margin-bottom: 0.3rem;
}
.featured-card-cat.green   { color: #3a9967; }
.featured-card-cat.magenta { color: var(--magenta); }
.featured-card-title {
  font-size: 0.85rem; font-weight: 600; line-height: 1.4;
  color: var(--ink); margin-bottom: 0.35rem; transition: color 0.15s;
}
.featured-card:hover .featured-card-title { color: var(--purple); }
.featured-card-date { font-size: 0.68rem; color: var(--ink-3); }

/* ═══════════════════════════════════════
   SIDEBAR & WIDGETS
═══════════════════════════════════════ */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden;
}
.widget-head { padding: 1rem 1.25rem 0.85rem; border-bottom: 1px solid var(--line); }
.widget-title { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.widget-body  { padding: 1rem 1.25rem; }

.search-wrap { position: relative; }
.search-input {
  width: 100%; font-family: 'Poppins', sans-serif;
  font-size: 0.82rem; font-weight: 400; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-md);
  border-radius: 100px; padding: 0.55rem 2.5rem 0.55rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: var(--ink-3); }
.search-input:focus-visible { border-color: rgba(99,97,170,0.4); box-shadow: 0 0 0 3px rgba(99,97,170,0.15); outline: var(--focus-ring); outline-offset: 0; }
.search-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }

.cat-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.cat-item  { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.cat-item:last-child { border-bottom: none; }
.cat-link  { font-size: 0.8rem; font-weight: 400; color: var(--ink-2); text-decoration: none; transition: color 0.15s; display: flex; align-items: center; gap: 0.5rem; }
.cat-link:hover { color: var(--purple); }
.cat-dot   { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cat-count { font-size: 0.68rem; color: var(--ink-3); font-weight: 500; background: var(--bg); padding: 0.1rem 0.5rem; border-radius: 100px; }

/* Newsletter widget */
.newsletter-widget {
  background: linear-gradient(135deg, #6361aa 0%, #8280cc 100%);
  border-radius: var(--radius); padding: 1.5rem; color: white;
  position: relative; overflow: hidden;
}
.newsletter-widget::before { content: ''; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,0.07); }
.newsletter-widget::after  { content: ''; position: absolute; bottom: -30px; left: -20px; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,0.05); }
.newsletter-icon  { font-size: 1.5rem; margin-bottom: 0.6rem; }
.newsletter-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; position: relative; z-index: 1; }
.newsletter-desc  { font-size: 0.75rem; font-weight: 300; opacity: 0.85; margin-bottom: 1rem; position: relative; z-index: 1; line-height: 1.5; }
.newsletter-form  { display: flex; flex-direction: column; gap: 0.6rem; position: relative; z-index: 1; }
.newsletter-input {
  font-family: 'Poppins', sans-serif; font-size: 0.78rem;
  padding: 0.65rem 1rem; border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.12); color: white;
  transition: border-color 0.2s, background 0.2s; backdrop-filter: blur(8px);
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.7); }
.newsletter-input:focus-visible { border-color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.22); outline: 3px solid #fff; outline-offset: 2px; }
.newsletter-btn {
  font-family: 'Poppins', sans-serif; font-size: 0.78rem; font-weight: 600;
  padding: 0.65rem 1rem; min-height: 44px; border-radius: 100px;
  border: none; background: var(--yellow); color: #4a3800;
  cursor: pointer; transition: background 0.2s, transform 0.15s var(--ease-spring);
}
.newsletter-btn:hover { background: #ffe899; transform: translateY(-1px); }

/* Recent posts */
.recent-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.recent-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background 0.15s; }
.recent-item:last-child { border-bottom: none; }
.recent-item:hover .recent-title { color: var(--purple); }
.recent-num  { width: 22px; height: 22px; border-radius: 6px; background: var(--purple-10); color: var(--purple); font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.recent-title { font-size: 0.78rem; font-weight: 500; line-height: 1.4; color: var(--ink); margin-bottom: 0.2rem; transition: color 0.15s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-date  { font-size: 0.65rem; color: var(--ink-3); }

/* ═══════════════════════════════════════
   PAGINATION
═══════════════════════════════════════ */
.pagination { display: flex; align-items: center; gap: 0.4rem; margin-top: 2.5rem; justify-content: center; }
.page-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-md); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-size: 0.78rem; font-weight: 500;
  color: var(--ink-2); cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.page-btn:hover  { background: var(--purple-10); border-color: rgba(99,97,170,0.2); color: var(--purple); }
.page-btn.active { background: var(--purple); border-color: var(--purple); color: white; font-weight: 600; }

/* WP native pagination */
.nav-links { display: flex; align-items: center; gap: 0.4rem; margin-top: 2.5rem; justify-content: center; }
.nav-links .page-numbers {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-md); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-size: 0.78rem; font-weight: 500;
  color: var(--ink-2); text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.nav-links .page-numbers:hover { background: var(--purple-10); border-color: rgba(99,97,170,0.2); color: var(--purple); }
.nav-links .page-numbers.current { background: var(--purple); border-color: var(--purple); color: white; font-weight: 600; }

/* ═══════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════ */
.single-post-wrap { max-width: 1200px; margin: 0 auto; padding: 3rem; display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: start; }
.entry-header { margin-bottom: 2rem; }
.entry-category { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--purple); margin-bottom: 0.75rem; display: block; }
.entry-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 1rem; }
.entry-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.75rem; color: var(--ink-3); flex-wrap: wrap; }
.entry-meta a { color: var(--purple); text-decoration: none; }
.entry-thumbnail { width: 100%; height: 400px; object-fit: cover; border-radius: var(--radius); margin-bottom: 2rem; display: block; }
.entry-content { font-size: 1rem; line-height: 1.75; color: var(--ink-2); }
.entry-content h2 { font-size: 1.4rem; font-weight: 700; color: var(--ink); margin: 2rem 0 0.75rem; }
.entry-content h3 { font-size: 1.15rem; font-weight: 600; color: var(--ink); margin: 1.5rem 0 0.5rem; }
.entry-content p  { margin-bottom: 1.25rem; }
.entry-content a  { color: var(--purple); text-decoration: underline; text-decoration-color: rgba(99,97,170,0.4); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: var(--purple); }
.entry-content ul, .entry-content ol { margin: 0 0 1.25rem 1.5rem; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content blockquote { border-left: 3px solid var(--purple); padding: 1rem 1.5rem; background: var(--purple-10); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.5rem 0; font-style: italic; color: var(--ink); }
.entry-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 1rem 0; }
.entry-footer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 4rem; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 3rem;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem;
}
.footer-brand img,
.footer-brand .custom-logo { height: 28px; margin-bottom: 1rem; }
.footer-tagline { font-size: 0.8rem; color: var(--ink-3); line-height: 1.6; margin-bottom: 1.25rem; }
.social-links { display: flex; gap: 0.5rem; }
.social-link {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--line-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); text-decoration: none; font-size: 0.8rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.social-link:hover { background: var(--purple-10); color: var(--purple); border-color: rgba(99,97,170,0.2); }
.footer-col-title { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.8rem; color: var(--ink-3); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--purple); }

.footer-bottom {
  background: var(--green); padding: 1rem 3rem;
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; flex-wrap: wrap;
}
.footer-copy { font-size: 0.72rem; color: #fff; font-weight: 500; letter-spacing: 0.01em; }
.footer-bottom-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-bottom-links a { font-size: 0.72rem; color: rgba(255,255,255,0.8); text-decoration: none; transition: color 0.15s; }
.footer-bottom-links a:hover { color: #fff; }

/* WordPress widget area in footer */
.footer-widget-area { display: contents; }
.footer-widget-area .widget { }
.footer-widget-area .widget-title { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); margin-bottom: 1rem; }
.footer-widget-area ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-widget-area ul li a { font-size: 0.8rem; color: var(--ink-3); text-decoration: none; transition: color 0.15s; }
.footer-widget-area ul li a:hover { color: var(--purple); }

/* ═══════════════════════════════════════
   COMMENTS
═══════════════════════════════════════ */
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.comments-title { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-bottom: 1.5rem; }
.comment-list { list-style: none; }
.comment { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.comment-author .fn { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.comment-meta { font-size: 0.72rem; color: var(--ink-3); margin-bottom: 0.75rem; }
.comment-content p { font-size: 0.9rem; color: var(--ink-2); line-height: 1.65; }
.reply a { font-size: 0.72rem; font-weight: 600; color: var(--purple); text-decoration: none; letter-spacing: 0.04em; text-transform: uppercase; }

.comment-respond { margin-top: 2rem; }
.comment-respond .comment-reply-title { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 1.25rem; }
.comment-form label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.05em; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; font-family: 'Poppins', sans-serif; font-size: 0.85rem;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line-md);
  border-radius: var(--radius-sm); padding: 0.65rem 1rem;
  transition: border-color 0.2s; margin-bottom: 1rem;
}
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form input:focus-visible, .comment-form textarea:focus-visible { border-color: var(--purple); outline: var(--focus-ring); outline-offset: 0; }
.comment-form .submit { background: var(--purple); color: #fff; font-family: 'Poppins', sans-serif; font-size: 0.82rem; font-weight: 600; padding: 0.7rem 1.75rem; border-radius: 100px; border: none; cursor: pointer; transition: background 0.2s; }
.comment-form .submit:hover { background: #7270bb; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (min-width: 1400px) {
  .hero-content { padding: 4rem 4rem 4rem clamp(3rem, 6vw, 6rem); }
  .hero-title { font-size: 3.4rem; }
  .main { max-width: 1300px; padding: 3.5rem; }
  .footer-inner { max-width: 1300px; }
  .single-post-wrap { max-width: 1300px; padding: 3.5rem; }
}

@media (max-width: 1199px) {
  .hero-content { padding: 3rem 3rem 3rem clamp(1.5rem, 4vw, 3.5rem); }
  .main { padding: 2.5rem 2rem; gap: 2rem; }
  .single-post-wrap { padding: 2.5rem 2rem; gap: 2rem; }
  .footer-inner { padding: 2.5rem 2rem; gap: 2rem; }
  .chips-inner { padding: 0 2rem; }
  .header-mid { padding: 0 1.75rem; }
  .header-nav-inner { padding: 0 1.75rem; }
}

@media (max-width: 1023px) and (min-width: 901px) {
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .hero-img   { min-height: 380px; }
  .hero-content { padding: 2.5rem 2.5rem 2.5rem 2rem; max-width: 100%; margin-left: 0; }
  .hero-title { font-size: 2.25rem; }
  .main { grid-template-columns: 1fr 260px; gap: 2rem; padding: 2rem 1.75rem; }
  .single-post-wrap { grid-template-columns: 1fr 260px; gap: 2rem; padding: 2rem 1.75rem; }
  .footer-inner { grid-template-columns: 1.2fr 1fr 1fr; padding: 2.5rem 1.75rem; gap: 2rem; }
  .footer-inner > nav:last-child { grid-column: 1 / -1; }
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .chips-inner { padding: 0 1.75rem; }
  .header-nav-item > a, .header-nav-item > button { padding: 0 0.75rem; font-size: 0.68rem; }
  .header-mid { padding: 0 1.75rem; }
}

@media (max-width: 900px) {
  .header-nav { display: none; }
  .mobile-toggle { display: flex; }
  .announce-bar-social { display: none; }
  .header-actions .header-action-link span:not(.cart-count) { display: none; }
  .header-mid { gap: 0.75rem; padding: 0 1.25rem; height: 60px; }
  .header-logo img, .header-logo .custom-logo { height: 32px; }
  .header-search { max-width: none; }
  .hero { margin-top: calc(30px + 60px); }

  .header-nav.nav-open {
    display: block; position: fixed; top: calc(30px + 60px);
    left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    max-height: calc(100vh - 90px); overflow-y: auto; z-index: 150;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  }
  .header-nav.nav-open .header-nav-inner,
  .header-nav.nav-open .menu { flex-direction: column; height: auto; padding: 0.5rem 0; gap: 0; align-items: stretch; }
  .header-nav.nav-open .header-nav-item,
  .header-nav.nav-open li { width: 100%; }
  .header-nav.nav-open .header-nav-item > a,
  .header-nav.nav-open .header-nav-item > button,
  .header-nav.nav-open li > a { width: 100%; justify-content: space-between; padding: 0.85rem 1.5rem; height: auto; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 0.8rem; }
  .header-nav.nav-open .dropdown,
  .header-nav.nav-open .sub-menu { position: static; opacity: 1; pointer-events: auto; transform: none; box-shadow: none; border-radius: 0; border: none; border-top: 1px solid var(--line); background: var(--bg); display: none; }
  .header-nav.nav-open .header-nav-item > button[aria-expanded="true"] + .dropdown,
  .header-nav.nav-open li.open > .sub-menu { display: block; }
  .header-nav.nav-open .dropdown a,
  .header-nav.nav-open .sub-menu a { padding: 0.75rem 2rem; font-size: 0.8rem; }

  .hero-inner { grid-template-columns: 1fr; min-height: unset; }
  .hero-content { padding: 2.5rem 1.75rem 2rem; max-width: 100%; margin-left: 0; }
  .hero-image-wrap { height: 320px; order: -1; }
  .hero-img { min-height: 320px; }
  .hero-title { font-size: clamp(1.8rem, 5vw, 2.5rem); }

  .main { grid-template-columns: 1fr; padding: 2rem 1.75rem; gap: 2rem; }
  .single-post-wrap { grid-template-columns: 1fr; padding: 2rem 1.75rem; }
  .sidebar { display: none; }
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .chips-bar { top: calc(30px + 60px); }
  .chips-inner { padding: 0 1.75rem; }

  .footer-inner { grid-template-columns: 1fr 1fr; padding: 2.5rem 1.75rem; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { padding: 1rem 1.75rem; }
}

@media (max-width: 767px) {
  .announce-bar { font-size: 0.68rem; padding: 0.35rem 1rem; }
  .header-mid { height: 56px; padding: 0 1rem; gap: 0.5rem; }
  .header-logo img, .header-logo .custom-logo { height: 28px; }
  .hero { margin-top: calc(28px + 56px); }
  .chips-bar { top: calc(28px + 56px); }
  .hero-image-wrap { height: 280px; }
  .hero-img { min-height: 280px; }
  .hero-content { padding: 2rem 1.25rem 1.75rem; }
  .hero-title { font-size: clamp(1.65rem, 6vw, 2.2rem); }
  .hero-sub { font-size: 0.92rem; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .stat-number { font-size: 1.25rem; }
  .chips-inner { padding: 0 1.25rem; gap: 0.4rem; }
  .chip { font-size: 0.68rem; padding: 0.3rem 0.85rem; }
  .main { padding: 1.75rem 1.25rem; }
  .featured-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .featured-card-img { height: 110px; }
  .post-card-inner { padding: 1rem 1rem 1rem 1.25rem; gap: 0.85rem; }
  .post-card-title { font-size: 0.88rem; }
  .post-card-excerpt { display: none; }
  .footer-inner { grid-template-columns: 1fr; padding: 2rem 1.25rem; gap: 1.75rem; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; padding: 1rem 1.25rem; text-align: center; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .single-post-wrap { padding: 1.75rem 1.25rem; }
  .entry-thumbnail { height: 240px; }
}

@media (max-width: 479px) {
  .hero-image-wrap { height: 240px; }
  .hero-img { min-height: 240px; }
  .hero-content { padding: 1.75rem 1rem 1.5rem; }
  .hero-title { font-size: clamp(1.5rem, 7vw, 1.9rem); }
  .hero-actions { gap: 0.75rem; }
  .btn-primary { font-size: 0.78rem; padding: 0.6rem 1.4rem; }
  .hero-stats { gap: 1rem; }
  .stat-number { font-size: 1.15rem; }
  .stat-label  { font-size: 0.68rem; }
  .chips-inner { padding: 0 1rem; }
  .main { padding: 1.5rem 1rem; }
  .header-mid { padding: 0 0.85rem; }
  .section-head { flex-direction: column; gap: 0.35rem; align-items: flex-start; }
  .footer-inner { padding: 1.75rem 1rem; }
  .footer-bottom { padding: 0.85rem 1rem; }
  .newsletter-widget { padding: 1.25rem; }
  .single-post-wrap { padding: 1.5rem 1rem; }
}

@media (max-width: 359px) {
  .hero-title  { font-size: 1.4rem; }
  .hero-sub    { font-size: 0.85rem; }
  .hero-stats  { flex-direction: column; gap: 0.6rem; }
  .chips-inner { height: 48px; }
  .chip        { font-size: 0.65rem; padding: 0.25rem 0.7rem; }
  .header-mid  { height: 52px; }
  .hero        { margin-top: calc(28px + 52px); }
  .chips-bar   { top: calc(28px + 52px); }
}
