/* =========================================
   MamiBlog Theme - Main Stylesheet
   ========================================= */

/* --- CSS Custom Properties --- */
:root {
  --primary: #D4628A;
  --primary-light: #FDEEF5;
  --primary-dark: #B84D71;
  --primary-mid: #F0A0BF;
  --accent: #9747CC;
  --accent-light: #F5EEFF;
  --accent-dark: #7A2EB5;
  --teal: #3AAFA9;
  --teal-light: #E6F7F7;
  --text: #2C2C3A;
  --text-light: #6B7280;
  --text-muted: #9CA3AF;
  --bg: #FDFBFE;
  --bg-section: #FDF5F9;
  --white: #FFFFFF;
  --border: #F0E0EC;
  --border-light: #FAF0F5;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --shadow: 0 4px 24px rgba(212, 98, 138, 0.10);
  --shadow-hover: 0 8px 40px rgba(212, 98, 138, 0.20);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --header-h: 72px;
  --container: 1200px;
  --sidebar-w: 340px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  color: var(--text);
  font-weight: 700;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1.2rem; }

/* --- Layout Helpers --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

.section-padding { padding: 72px 0; }
.section-padding-sm { padding: 48px 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(212, 98, 138, 0.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 98, 138, 0.45);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(151, 71, 204, 0.30);
}
.btn-accent:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-sm { padding: 8px 20px; font-size: 0.875rem; }
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }

/* =========================================
   HEADER
   ========================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(253, 251, 254, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
#site-header.scrolled {
  box-shadow: 0 2px 24px rgba(212, 98, 138, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

/* Logo */
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-logo img { height: 44px; width: auto; }
.site-logo-text { display: flex; flex-direction: column; }
.site-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.site-title span { color: var(--accent); }
.site-tagline { font-size: 0.72rem; color: var(--text-light); letter-spacing: 0.04em; text-transform: uppercase; }

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.main-nav a {
  padding: 7px 12px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  transition: var(--transition);
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current_page_item a {
  color: var(--primary);
  background: var(--primary-light);
}
.main-nav .menu-item-has-children { position: relative; }
.main-nav .menu-item-has-children > a::after {
  content: " ▾";
  font-size: 0.7rem;
  opacity: 0.6;
}
.main-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
}
.main-nav .menu-item-has-children:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.main-nav .sub-menu a {
  display: block;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.search-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}
.search-toggle:hover { background: var(--primary); color: var(--white); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 44, 58, 0.7);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.search-overlay.active { opacity: 1; visibility: visible; }
.search-overlay-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 600px;
  margin: 0 24px;
}
.search-overlay form { display: flex; gap: 12px; }
.search-overlay input[type="search"] {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition);
}
.search-overlay input[type="search"]:focus { border-color: var(--primary); }

/* Reading progress bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* =========================================
   HERO SECTION (Homepage)
   ========================================= */
.hero-section {
  background: linear-gradient(135deg, #FDF0F6 0%, #F8EEFF 50%, #EDF9F8 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(212,98,138,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(151,71,204,0.10) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero-title em { color: var(--primary); font-style: normal; }
.hero-description {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}
.hero-stat-label { font-size: 0.82rem; color: var(--text-light); }

.hero-featured {
  position: relative;
}
.hero-featured-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  position: relative;
}
.hero-featured-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.hero-featured-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(44,44,58,0.92) 0%, transparent 100%);
  padding: 40px 28px 28px;
  color: var(--white);
}
.hero-featured-cat {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.hero-featured-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.3;
}
.hero-featured-meta {
  font-size: 0.82rem;
  opacity: 0.8;
  display: flex;
  gap: 16px;
}

/* =========================================
   CATEGORY PILLS NAV
   ========================================= */
.category-pills {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }
.category-pills-inner {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.cat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-section);
  border: 1.5px solid var(--border);
  transition: var(--transition);
  white-space: nowrap;
}
.cat-pill .cat-icon { font-size: 1rem; }
.cat-pill:hover,
.cat-pill.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212,98,138,0.25);
}

/* =========================================
   SECTION HEADINGS
   ========================================= */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.section-label::before,
.section-label::after {
  content: '';
  display: block;
  width: 24px; height: 1.5px;
  background: var(--primary-mid);
}
.section-title { margin-bottom: 12px; }
.section-title em { color: var(--primary); font-style: normal; }
.section-desc { color: var(--text-light); max-width: 560px; margin: 0 auto; }

.section-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}
.section-header-flex h2 { margin: 0; }

/* =========================================
   POST CARDS
   ========================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.posts-grid-2 { grid-template-columns: repeat(2, 1fr); }
.posts-grid-4 { grid-template-columns: repeat(4, 1fr); }

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-mid);
}
.post-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}
.post-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.06); }
.post-card-image .post-cat-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.post-card-image .post-featured-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
}
.post-card-placeholder {
  width: 100%; aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.post-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.post-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.post-meta-item svg { width: 12px; height: 12px; }
.post-reading-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: 50px;
}

.post-card-title {
  font-size: 1.05rem;
  margin-bottom: 10px;
  line-height: 1.4;
}
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--primary); }

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.read-more-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.read-more-link:hover { gap: 8px; }
.read-more-link::after { content: '→'; }

/* Featured post card (large) */
.post-card-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
}
.post-card-featured .post-card-image {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  aspect-ratio: auto;
  min-height: 320px;
}
.post-card-featured .post-card-body { padding: 40px; justify-content: center; }
.post-card-featured .post-card-title { font-size: 1.4rem; }
.post-card-featured .post-card-excerpt { -webkit-line-clamp: 4; }

/* =========================================
   CATEGORY SECTIONS (Homepage)
   ========================================= */
.categories-showcase { background: var(--bg-section); }
.cat-section { margin-bottom: 60px; }
.cat-section:last-child { margin-bottom: 0; }

.cat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.cat-section-header::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 60px; height: 2px;
  background: var(--primary);
}
.cat-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}
.cat-section-icon {
  width: 40px; height: 40px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.view-all-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.view-all-link:hover { gap: 8px; }
.view-all-link::after { content: '→'; }

/* =========================================
   HOMEPAGE NEWSLETTER
   ========================================= */
.newsletter-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-section::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 200px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.newsletter-section h2 { color: var(--white); margin-bottom: 12px; }
.newsletter-section p { color: rgba(255,255,255,0.85); margin-bottom: 32px; font-size: 1.05rem; }
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  background: rgba(255,255,255,0.95);
  color: var(--text);
}
.newsletter-form button {
  background: var(--text);
  color: var(--white);
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.newsletter-form button:hover {
  background: var(--white);
  color: var(--primary);
}
.newsletter-privacy {
  color: rgba(255,255,255,0.65);
  font-size: 0.78rem;
  margin-top: 12px;
}

/* =========================================
   SIDEBAR LAYOUT
   ========================================= */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 48px;
  align-items: start;
}
.content-area { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--header-h) + 24px); }

/* Sidebar Widgets */
.widget {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 36px; height: 2px;
  background: var(--primary);
}

/* Widget: Categories */
.widget-categories li {
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
}
.widget-categories li:last-child { border-bottom: none; }
.widget-categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}
.widget-categories a:hover { color: var(--primary); }
.widget-categories .count {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Widget: Recent posts */
.widget-recent-posts li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.widget-recent-posts li:last-child { border-bottom: none; }
.widget-post-thumb {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.widget-post-thumb-placeholder {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.widget-post-info {}
.widget-post-title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.widget-post-title a { color: var(--text); }
.widget-post-title a:hover { color: var(--primary); }
.widget-post-date { font-size: 0.75rem; color: var(--text-muted); }

/* Widget: Tags */
.widget-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.widget-tags a {
  background: var(--bg-section);
  color: var(--text-light);
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  transition: var(--transition);
}
.widget-tags a:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-mid);
}

/* Widget: Affiliate banner */
.widget-affiliate {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  border: 1.5px dashed var(--primary-mid);
}
.widget-affiliate img { border-radius: var(--radius-sm); margin: 0 auto 16px; }
.widget-affiliate h4 { margin-bottom: 8px; }
.widget-affiliate p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 16px; }

/* =========================================
   BLOG LISTING (index, archive, search)
   ========================================= */
.blog-header {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  padding: 48px 0;
  margin-bottom: 48px;
  text-align: center;
}
.archive-title { color: var(--text); }
.archive-title span { color: var(--primary); }
.archive-description { color: var(--text-light); max-width: 540px; margin: 12px auto 0; }

.blog-listing .posts-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Horizontal list post card */
.post-card-list {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}
.post-card-list:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-mid);
}
.post-card-list .post-card-image {
  border-radius: 0;
  aspect-ratio: auto;
  min-height: 200px;
}
.post-card-list .post-card-body { padding: 28px 32px; }
.post-card-list .post-card-title { font-size: 1.2rem; }
.post-card-list .post-card-excerpt { -webkit-line-clamp: 3; }

/* Pagination */
.pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  border: 1.5px solid var(--border);
  transition: var(--transition);
  background: var(--white);
}
.page-numbers:hover { color: var(--primary); border-color: var(--primary); }
.page-numbers.current { background: var(--primary); color: var(--white); border-color: var(--primary); }
.page-numbers.dots { border: none; }

/* =========================================
   SINGLE POST
   ========================================= */
.single-post-header {
  background: linear-gradient(160deg, var(--primary-light) 0%, var(--accent-light) 100%);
  padding: 56px 0 0;
  margin-bottom: 0;
}
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.post-breadcrumb a { color: var(--text-light); }
.post-breadcrumb a:hover { color: var(--primary); }
.post-breadcrumb span:not(.sep) { color: var(--text); font-weight: 600; }
.post-breadcrumb .sep { color: var(--text-muted); }

.post-categories-list { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.post-cat-tag {
  display: inline-block;
  padding: 5px 16px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
}
.post-cat-tag:hover { background: var(--primary-dark); color: var(--white); }
.post-cat-tag.accent { background: var(--accent); }
.post-cat-tag.teal { background: var(--teal); }

.single-post-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  margin-bottom: 20px;
  line-height: 1.25;
}
.post-full-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 28px;
}
.post-author-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--white);
}
.post-author-avatar-placeholder {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid var(--white);
}
.post-author-name { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.post-author-role { font-size: 0.75rem; color: var(--text-light); }

.single-featured-image {
  margin-top: 32px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  max-height: 520px;
}
.single-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Post content */
.post-content-wrap {
  padding: 48px 0;
}
.post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.post-content h2 {
  font-size: 1.7rem;
  margin: 48px 0 20px;
  padding-top: 8px;
  border-top: 2px solid var(--border);
  color: var(--text);
}
.post-content h3 {
  font-size: 1.3rem;
  margin: 36px 0 16px;
  color: var(--primary-dark);
}
.post-content h4 {
  font-size: 1.1rem;
  margin: 28px 0 12px;
}
.post-content p { margin-bottom: 1.4rem; }
.post-content ul, .post-content ol {
  margin: 0 0 1.4rem 0;
  padding-left: 0;
}
.post-content ul { list-style: none; }
.post-content ul li {
  padding: 6px 0 6px 28px;
  position: relative;
}
.post-content ul li::before {
  content: '●';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.6rem;
  top: 12px;
}
.post-content ol { list-style: decimal; list-style-position: inside; }
.post-content ol li { padding: 6px 0; }
.post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--primary-dark); }
.post-content strong { color: var(--text); font-weight: 700; }
.post-content em { font-style: italic; }
.post-content img {
  border-radius: var(--radius);
  margin: 24px 0;
  box-shadow: var(--shadow);
}
.post-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 20px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;
  font-style: italic;
  color: var(--text-light);
  font-size: 1.05rem;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.9rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.post-content th {
  background: var(--primary);
  color: var(--white);
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
}
.post-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.post-content tr:nth-child(even) td { background: var(--primary-light); }
.post-content tr:hover td { background: var(--accent-light); }
.post-content code {
  background: var(--bg-section);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: monospace;
}
.post-content pre {
  background: #2D2D3A;
  color: #F8F8F2;
  padding: 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 28px 0;
}
.post-content pre code { background: none; padding: 0; color: inherit; }

/* Table of Contents */
.toc-box {
  background: var(--primary-light);
  border: 1.5px solid var(--primary-mid);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}
.toc-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-list { counter-reset: toc-counter; }
.toc-list li {
  counter-increment: toc-counter;
  padding: 6px 0;
  border-bottom: 1px solid rgba(212,98,138,0.15);
}
.toc-list li:last-child { border-bottom: none; }
.toc-list li::before {
  content: counter(toc-counter) ". ";
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
}
.toc-list a {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.toc-list a:hover { color: var(--primary); }

/* Affiliate Product Box */
.affiliate-box {
  background: var(--white);
  border: 2px solid var(--primary-mid);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 36px 0;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.affiliate-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.affiliate-box-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  position: absolute;
  top: 4px; right: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.affiliate-box-inner {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: center;
}
.affiliate-product-img {
  border-radius: var(--radius);
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--bg-section);
  padding: 8px;
}
.affiliate-product-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.affiliate-product-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.affiliate-product-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.affiliate-product-price-old {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
}
.affiliate-product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.stars { color: #F59E0B; font-size: 1rem; letter-spacing: 2px; }
.rating-count { font-size: 0.8rem; color: var(--text-muted); }
.affiliate-product-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.6;
}
.affiliate-box-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.affiliate-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FF6B35 0%, #F7C59F 100%);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
  transition: var(--transition);
}
.affiliate-buy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.45);
  color: var(--white);
}
.affiliate-disclaimer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Pros/Cons Box */
.pros-cons-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}
.pros-box, .cons-box {
  border-radius: var(--radius);
  padding: 20px 24px;
}
.pros-box { background: #F0FDF4; border: 1.5px solid #86EFAC; }
.cons-box { background: #FFF1F2; border: 1.5px solid #FDA4AF; }
.pros-box h4, .cons-box h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pros-box h4 { color: #16A34A; }
.cons-box h4 { color: #DC2626; }
.pros-box li, .cons-box li {
  font-size: 0.875rem;
  padding: 5px 0 5px 22px;
  position: relative;
  border: none;
  list-style: none;
}
.pros-box li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #16A34A;
  font-weight: 700;
}
.cons-box li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #DC2626;
  font-weight: 700;
}

/* Info/Warning boxes */
.info-box, .tip-box, .warning-box {
  padding: 20px 24px;
  border-radius: var(--radius);
  margin: 24px 0;
  border-left: 4px solid;
}
.info-box { background: #EFF6FF; border-color: #60A5FA; color: #1D4ED8; }
.tip-box { background: #F0FDF4; border-color: #4ADE80; color: #166534; }
.warning-box { background: #FFFBEB; border-color: #FBBF24; color: #92400E; }
.info-box strong, .tip-box strong, .warning-box strong { display: block; margin-bottom: 6px; }

/* Post Tags */
.post-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.post-tags-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}
.post-tag-link {
  background: var(--bg-section);
  color: var(--text-light);
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  transition: var(--transition);
}
.post-tag-link:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-mid);
}

/* Social Share */
.social-share {
  background: var(--bg-section);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.social-share-label {
  font-weight: 700;
  color: var(--text);
  font-size: 0.9rem;
}
.social-share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
}
.share-btn:hover { transform: translateY(-2px); filter: brightness(0.9); }
.share-fb { background: #1877F2; color: var(--white); }
.share-tw { background: #1DA1F2; color: var(--white); }
.share-pin { background: #E60023; color: var(--white); }
.share-wa { background: #25D366; color: var(--white); }
.share-copy { background: var(--bg-section); color: var(--text); border: 1.5px solid var(--border); }
.share-copy:hover { border-color: var(--primary); color: var(--primary); }

/* Author Box */
.author-box {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 40px 0;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
}
.author-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: var(--shadow);
}
.author-avatar-placeholder {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  border: 3px solid var(--white);
  box-shadow: var(--shadow);
}
.author-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.author-role {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}
.author-bio { font-size: 0.9rem; color: var(--text-light); line-height: 1.7; }

/* Related Posts */
.related-posts { margin: 48px 0; }
.related-posts h3 {
  margin-bottom: 24px;
  font-size: 1.4rem;
}

/* Post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 40px 0;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}
.post-nav-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: var(--transition);
}
.post-nav-item:hover {
  border-color: var(--primary-mid);
  box-shadow: var(--shadow);
}
.post-nav-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; font-weight: 600; }
.post-nav-title { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.post-nav-item.next { text-align: right; }

/* =========================================
   COMMENTS
   ========================================= */
.comments-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 2px solid var(--border);
}
.comments-section h2 { margin-bottom: 28px; font-size: 1.6rem; }
.comment-list { margin-bottom: 40px; }
.comment {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.comment-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.comment-author-name { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.comment-date { font-size: 0.78rem; color: var(--text-muted); }
.comment-content { font-size: 0.9rem; line-height: 1.7; }

.comment-form { background: var(--bg-section); border-radius: var(--radius-lg); padding: 36px; }
.comment-form h3 { margin-bottom: 24px; font-size: 1.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(212,98,138,0.12); }
textarea.form-control { min-height: 140px; resize: vertical; }
.form-submit { margin-top: 4px; }

/* =========================================
   FOOTER
   ========================================= */
#site-footer {
  background: #1E1B2E;
  color: rgba(255,255,255,0.7);
  padding-top: 72px;
}
.footer-top { padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand {}
.footer-logo-text {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}
.footer-logo-text span { color: var(--primary-mid); }
.footer-tagline { font-size: 0.82rem; margin-bottom: 20px; }
.footer-desc { font-size: 0.875rem; line-height: 1.7; margin-bottom: 24px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: var(--white); }

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 28px; height: 1px;
  background: var(--primary-mid);
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-links a:hover { color: var(--primary-mid); padding-left: 4px; }
.footer-links a::before { content: '›'; color: var(--primary-mid); font-size: 1rem; }

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copyright { font-size: 0.82rem; color: rgba(255,255,255,0.4); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  transition: var(--transition);
}
.footer-bottom-links a:hover { color: var(--primary-mid); }

/* =========================================
   404 PAGE
   ========================================= */
.error-404-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 0;
}
.error-number {
  font-family: var(--font-heading);
  font-size: clamp(6rem, 20vw, 14rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}
.error-emoji { font-size: 4rem; margin-bottom: 20px; }
.error-404-section h2 { margin-bottom: 12px; }
.error-404-section p { color: var(--text-light); margin-bottom: 32px; }

/* =========================================
   SEARCH RESULTS
   ========================================= */
.search-header {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  padding: 48px 0;
  text-align: center;
}
.search-header h1 span { color: var(--primary); }
.search-header p { color: var(--text-light); margin-top: 8px; }
.search-again-form {
  max-width: 500px;
  margin: 24px auto 0;
  display: flex;
  gap: 12px;
}
.search-again-form input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
}
.search-again-form input:focus { border-color: var(--primary); }
.search-again-form button {
  background: var(--primary);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
}

/* =========================================
   BACK TO TOP
   ========================================= */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px; height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(212,98,138,0.40);
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-4px);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1100px) {
  .content-sidebar-wrap {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-featured { order: -1; }
  .post-card-featured {
    grid-template-columns: 1fr;
  }
  .post-card-featured .post-card-image {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    min-height: 240px;
  }
  .pros-cons-box { grid-template-columns: 1fr; }
  .author-box { grid-template-columns: 1fr; text-align: center; }
  .author-avatar, .author-avatar-placeholder { margin: 0 auto; }
  .affiliate-box-inner { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .main-nav-wrap {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    transform: translateY(-120%);
    transition: var(--transition);
    z-index: 999;
  }
  .main-nav-wrap.open { transform: translateY(0); }
  .main-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .main-nav a { width: 100%; padding: 12px 16px; }
  .main-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    background: transparent;
  }
  .menu-toggle { display: flex; }
  .header-actions .btn { display: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .posts-grid { grid-template-columns: 1fr; }
  .post-card-list { grid-template-columns: 1fr; }
  .post-card-list .post-card-image { min-height: 220px; }
  .form-row { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .hero-actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .category-pills-inner { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .section-padding { padding: 48px 0; }
  .hero-section { padding: 48px 0 40px; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .post-card-featured .post-card-body { padding: 24px; }
  .affiliate-buy-btn { width: 100%; justify-content: center; }
  .social-share { flex-direction: column; gap: 12px; }
}

/* =========================================
   UTILITIES & EXTRAS
   ========================================= */
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.bg-primary-light { background: var(--primary-light); }
.bg-accent-light { background: var(--accent-light); }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 12px 24px;
  z-index: 10000;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
}
.skip-link:focus { top: 0; }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.5s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* WordPress Core (block editor, alignments, etc.) */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { text-align: center; margin: 0 auto 16px; display: block; }
.alignwide { margin-left: -40px; margin-right: -40px; max-width: calc(100% + 80px); }
.wp-caption { text-align: center; }
.wp-caption-text { font-size: 0.82rem; color: var(--text-muted); font-style: italic; margin-top: 6px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.gallery img { border-radius: var(--radius-sm); width: 100%; height: 200px; object-fit: cover; }

/* Screen reader text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Highlight box for important notes in articles */
.highlight-box {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 28px 0;
  border: 1.5px solid var(--primary-mid);
}
.highlight-box p:last-child { margin-bottom: 0; }
