/* ============================================================
   geefee Theme — Diet, Health & Lifestyle Magazine
   2026 Edition | Ghost CMS
   Mobile-first responsive system
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand colours */
  --color-primary:       #5f9e2f;
  --color-primary-light: #8db468;
  --color-primary-dark:  #245220;
  --color-accent:        #6a9d35;
  --color-cafe:          #8b6233;
  --color-bio:           #0089ab;

  /* Neutrals */
  --color-dark:          #2f2f2f;
  --color-grey:          #c8c8c8;
  --color-light-bg:      #f8f8f8;
  --color-white:         #ffffff;
  --color-text:          #2f2f2f;
  --color-text-muted:    #777777;
  --color-border:        #e8e8e8;

  /* Typography */
  --font-sans:   'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:  'Georgia', 'Noto Serif JP', serif;
  --font-script: 'Dancing Script', cursive;

  /* Radii */
  --radius:    8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow:       0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.14);

  /* Transitions */
  --transition: all 0.2s ease;

  /* Layout */
  --max-width:    1200px;
  --header-height: 64px;
  --sidebar-width: 300px;
  --gap:           24px;
}

/* Dark mode overrides */
[data-theme="dark"] {
  --color-white:      #1a1a1a;
  --color-light-bg:   #242424;
  --color-text:       #e8e8e8;
  --color-text-muted: #aaaaaa;
  --color-border:     #333333;
  --shadow:           0 2px 12px rgba(0,0,0,0.4);
  --shadow-hover:     0 8px 32px rgba(0,0,0,0.6);
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover { color: var(--color-primary-dark); }

ul, ol { list-style: none; }

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: clamp(1.6rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1rem; }

p { margin-bottom: 1.2rem; }

/* ============================================================
   4. LAYOUT PRIMITIVES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ============================================================
   5. READING PROGRESS BAR
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-bio));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================================
   6. AD BANNER (top of page, above header)
   ============================================================ */
.ad-header-banner {
  background: var(--color-light-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 4px 0;
  text-align: center;
  /* Collapse when no ad is loaded */
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Hide banner entirely if AdSense hasn't loaded */
.ad-header-banner:empty,
.ad-header-banner .adsbygoogle[data-ad-status="unfilled"] {
  display: none;
}

.ad-slot {
  display: block;
  text-align: center;
  overflow: hidden;
  width: 100%;
}

.ad-label {
  font-size: 0.6rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 2px;
}

/* ============================================================
   7. SITE HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  transition: background 0.3s, box-shadow 0.3s;
}

.header-top {
  display: flex;
  align-items: center;
  height: var(--header-height);
  gap: 12px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: auto;
}

.site-logo img {
  height: 38px;
  width: auto;
}

/* Desktop navigation — hidden on mobile, shown on desktop */
.header-nav {
  display: none;
  align-items: center;
}

/* Ghost renders nav as ul.nav > li > a */
.header-nav .nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav .nav li {
  position: relative;
}

.header-nav .nav li a {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 6px 10px;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: var(--transition);
}

.header-nav .nav li a:hover,
.header-nav .nav li.nav-current > a {
  color: var(--color-primary);
  background: var(--color-light-bg);
}

/* Dropdown nav */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav-arrow {
  font-size: 0.65rem;
  transition: transform 0.2s;
}

.nav-dropdown:hover .nav-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  min-width: 160px;
  z-index: 1100;
  padding: 6px 0;
  list-style: none;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  border-radius: 0;
  background: none;
}

.nav-dropdown-menu li a:hover {
  color: var(--color-primary);
  background: var(--color-light-bg);
}

/* Header actions (right side) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.78rem;
  font-weight: 600;
}

.lang-toggle a {
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--color-text-muted);
}

.lang-toggle a.active,
.lang-toggle a:hover {
  color: var(--color-primary);
  background: var(--color-light-bg);
}

/* Icon buttons */
.dark-mode-toggle,
.search-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: var(--transition);
  flex-shrink: 0;
}

.dark-mode-toggle:hover,
.search-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Subscribe button */
.btn-subscribe {
  background: var(--color-primary);
  color: #fff !important;
  padding: 7px 16px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-subscribe:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(95,158,47,0.3);
}

/* Hamburger — visible on mobile only */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--color-text);
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* Mobile nav drawer */
.header-nav.open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  z-index: 999;
  padding: 12px 0;
}

.header-nav.open .nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
}

.header-nav.open .nav li a {
  padding: 10px 24px;
  border-radius: 0;
  font-size: 0.9rem;
}

/* Mobile: show dropdown items inline in the drawer */
.header-nav.open .nav-dropdown-menu {
  display: block;
  position: static;
  box-shadow: none;
  border: none;
  border-left: 3px solid var(--color-primary);
  margin-left: 24px;
  padding: 0;
  background: transparent;
}

.header-nav.open .nav-dropdown-menu li a {
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================================================
   8. CATEGORY TABS BAR
   ============================================================ */
.category-tabs-bar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: var(--header-height);
  z-index: 900;
}

.category-tabs-bar .container {
  padding-top: 0;
  padding-bottom: 0;
}

.category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-white);
  transition: var(--transition);
  cursor: pointer;
  flex-shrink: 0;
}

.category-tab:hover,
.category-tab.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(95,158,47,0.06);
}

/* ============================================================
   9. SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.search-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.search-box {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: calc(100% - 48px);
  max-width: 600px;
}

.search-input {
  width: 100%;
  border: none;
  font-size: 1.3rem;
  color: var(--color-text);
  background: transparent;
  outline: none;
  padding: 8px 0;
  border-bottom: 2px solid var(--color-primary);
}

/* ============================================================
   10. HERO FEATURED
   ============================================================ */
.hero-featured {
  position: relative;
  overflow: hidden;
  background: var(--color-dark);
  margin-bottom: 32px;
}

.hero-featured .hero-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.6s ease;
}

.hero-featured:hover .hero-image {
  transform: scale(1.02);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.82));
  color: white;
}

.hero-tag {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  color: white;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  line-height: 1.25;
}

.hero-excerpt {
  display: none; /* hidden on mobile, shown on tablet+ */
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  flex-wrap: wrap;
}

/* ============================================================
   11. POST GRID
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.post-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.4s ease both;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.10s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.20s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.30s; }

.post-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--color-light-bg);
  flex-shrink: 0;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.04);
}

.post-card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-primary);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--color-primary); }

.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.post-card-author {
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-card-author img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* Featured (wide) card */
.post-card.featured .post-card-title {
  font-size: 1.15rem;
  -webkit-line-clamp: 2;
}

/* ============================================================
   12. CONTENT + SIDEBAR LAYOUT
   ============================================================ */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

/* ============================================================
   13. SIDEBAR
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.sidebar-widget-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

/* Sidebar ad */
.ad-sidebar {
  background: var(--color-light-bg);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--color-border);
}

/* In-feed ad */
.ad-in-feed {
  background: var(--color-light-bg);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  border: 1px dashed var(--color-border);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   14. SECTION TITLE
   ============================================================ */
.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ============================================================
   15. NEWSLETTER WIDGET
   ============================================================ */
.newsletter-widget {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  color: white;
  margin-bottom: 40px;
}

.newsletter-widget h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.newsletter-widget p {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 11px 16px;
  border-radius: 24px;
  border: none;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.95);
  color: var(--color-text);
  outline: none;
}

.newsletter-form button {
  background: var(--color-dark);
  color: white;
  border: none;
  padding: 11px 24px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background: #111;
  transform: translateY(-1px);
}

/* ============================================================
   16. SINGLE POST / ARTICLE
   ============================================================ */
.post-header {
  max-width: 800px;
  margin: 0 auto 28px;
  text-align: center;
  padding: 28px 0 0;
}

.post-tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.post-tag {
  background: rgba(95,158,47,0.1);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  line-height: 1.25;
  margin-bottom: 14px;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.post-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.post-feature-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

/* Article body */
.post-content {
  max-width: 740px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.85;
}

.post-content h2 {
  margin: 2rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.post-content h3 { margin: 1.5rem 0 0.75rem; }

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
  list-style: revert;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 14px 20px;
  margin: 20px 0;
  background: rgba(95,158,47,0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.post-content img {
  border-radius: var(--radius);
  margin: 20px auto;
}

/* In-article ad */
.ad-in-article {
  background: var(--color-light-bg);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  margin: 28px 0;
  border: 1px dashed var(--color-border);
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   17. SOCIAL SHARE
   ============================================================ */
.social-share {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 28px 0;
  flex-wrap: wrap;
}

.social-share-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.social-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 24px;
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  transition: var(--transition);
}

.social-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: white;
}

.share-x        { background: #000000; }
.share-facebook { background: #1877f2; }
.share-line     { background: #06c755; }
.share-copy     { background: var(--color-text-muted); }

/* ============================================================
   18. RELATED POSTS
   ============================================================ */
.related-posts { margin: 40px 0; }

/* ============================================================
   19. AFFILIATE / PRODUCT ZONE
   ============================================================ */
.affiliate-zone {
  background: linear-gradient(135deg, #fffbf0, #fff8e8);
  border: 1px solid #f0e0c0;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 24px 0;
}

[data-theme="dark"] .affiliate-zone {
  background: linear-gradient(135deg, #2a2010, #1e1a0e);
  border-color: #4a3820;
}

.affiliate-zone-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-cafe);
  margin-bottom: 12px;
}

.affiliate-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.affiliate-product {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.affiliate-product:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.affiliate-product img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 8px;
}

.affiliate-product-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.affiliate-product-btn {
  display: inline-block;
  background: var(--color-cafe);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  transition: var(--transition);
}

.affiliate-product-btn:hover {
  background: #6a4a20;
  color: white;
}

/* ============================================================
   20. TAGS CLOUD
   ============================================================ */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  background: var(--color-light-bg);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.tag-pill:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ============================================================
   21. PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ============================================================
   22. FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 20px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 14px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-tagline {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 18px;
  line-height: 1.6;
}

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

.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--color-primary);
  color: white;
}

.footer-col h4 {
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.footer-col ul li {
  margin-bottom: 7px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-col ul li a:hover { color: var(--color-primary-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: var(--color-primary-light); }

/* ============================================================
   23. UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.hidden { display: none !important; }

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* ============================================================
   24. ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   25. RESPONSIVE — TABLET  (≥ 640px)
   ============================================================ */
@media (min-width: 640px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .post-card.featured {
    grid-column: span 2;
  }

  .hero-featured .hero-image { height: 360px; }
  .hero-content { padding: 32px; }
  .hero-excerpt { display: block; }

  .newsletter-form { flex-direction: row; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ============================================================
   26. RESPONSIVE — DESKTOP  (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  :root {
    --header-height: 70px;
    --gap: 32px;
  }

  /* Show desktop nav, hide hamburger */
  .header-nav { display: flex; align-items: center; }
  .header-nav .nav { display: flex; flex-direction: row; }
  .menu-toggle { display: none; }

  /* Restore logo margin */
  .site-logo { margin-right: 0; }

  /* Header layout: logo | nav | actions */
  .header-top {
    gap: 20px;
  }

  .header-nav {
    flex: 1;
    justify-content: center;
  }

  /* 3-column post grid */
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  .post-card.featured {
    grid-column: span 2;
  }

  /* Sidebar layout */
  .content-with-sidebar {
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 40px;
  }

  .sidebar {
    position: sticky;
    top: calc(var(--header-height) + 60px + 20px); /* header + tabs bar + gap */
  }

  /* Hero */
  .hero-featured .hero-image { height: 520px; }
  .hero-content { padding: 48px; }

  /* Footer */
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }

  /* Newsletter form */
  .newsletter-widget { padding: 40px; }
}

/* ============================================================
   27. RESPONSIVE — WIDE  (≥ 1280px)
   ============================================================ */
@media (min-width: 1280px) {
  :root { --sidebar-width: 320px; }

  .posts-grid { gap: 32px; }
}
