/*
Theme Name:  Worker Themes
Theme URI:   https://github.com/worker-themes
Author:      Worker Themes
Author URI:  https://worker-themes.com
Description: A fast, SEO-optimised WordPress theme with a card-based masonry gallery, amber/orange colour scheme, pill-chip navigation, FAQ accordion, how-to step lists, and a clean sticky header/footer. Built to match Cloudflare Worker site aesthetics. Optimised for Google and Bing.
Version:     1.3.4
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: worker-themes
Tags:        blog, portfolio, grid-layout, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, sticky-post, threaded-comments, translation-ready, block-editor-styles, wide-blocks
*/

/* ═══════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
═══════════════════════════════════════════════════════════ */
:root {
  --c:        #ea580c;   /* primary amber/orange */
  --cd:       #c2410c;   /* dark orange */
  --cl:       #fff7ed;   /* light orange tint */
  --bg:       #f8fafc;
  --card:     #ffffff;
  --text:     #1e293b;
  --muted:    #64748b;
  --border:   #e2e8f0;
  --r:        10px;
  --shadow:   0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --shadow-md:0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:0 8px 32px rgba(0,0,0,.12);
  --font:     'DM Sans', system-ui, -apple-system, sans-serif;
  --max:      1280px;
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE — CSS variable overrides
   Applied via [data-theme="dark"] on <html>
═══════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --bg:       #0f172a;
  --card:     #1e293b;
  --text:     #e2e8f0;
  --muted:    #94a3b8;
  --border:   #334155;
  --cl:       rgba(234,88,12,.15);   /* amber tint on dark */
  --shadow:   0 1px 3px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
  --shadow-md:0 4px 16px rgba(0,0,0,.35);
  --shadow-lg:0 8px 32px rgba(0,0,0,.45);
}

/* Body & global */
[data-theme="dark"] body           { background: var(--bg); color: var(--text); }

/* Header stays amber — brand colour unchanged */

/* Cards & surfaces */
[data-theme="dark"] .card,
[data-theme="dark"] .uc-card,
[data-theme="dark"] .widget,
[data-theme="dark"] .detail-hero,
[data-theme="dark"] .howto-section,
[data-theme="dark"] .faq-section,
[data-theme="dark"] .related-post-card,
[data-theme="dark"] .post-nav-link,
[data-theme="dark"] .archive-filter-pills,
[data-theme="dark"] .search-hero,
[data-theme="dark"] .search-no-results,
[data-theme="dark"] .no-results       { background: var(--card); border-color: var(--border); }

/* Gallery card label */
[data-theme="dark"] .card-label       { color: var(--text); }
[data-theme="dark"] .card-thumb-placeholder { background: #334155; }

/* Category cards */
[data-theme="dark"] .uc-card          { background: var(--card); }
[data-theme="dark"] .uc-head h3       { color: var(--text); }
[data-theme="dark"] .uc-desc          { color: var(--muted); }

/* Hero */
[data-theme="dark"] .hero-banner      { background: linear-gradient(160deg,#7c2d12 0%,#431407 50%,#1a0a02 100%); }
[data-theme="dark"] .hero-banner h1   { color: #fff; }
[data-theme="dark"] .hero-sub         { color: rgba(255,255,255,.75); }
[data-theme="dark"] .hero-search      { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
[data-theme="dark"] .hero-search input{ background: transparent; color: #fff; }
[data-theme="dark"] .hero-search input::placeholder { color: rgba(255,255,255,.45); }
[data-theme="dark"] .cat-chip         { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: rgba(255,255,255,.85); }
[data-theme="dark"] .cat-chip:hover   { background: var(--c); color: #fff; border-color: var(--c); }

/* Trending / popular searches */
[data-theme="dark"] .trending-grid a  { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); color: var(--text); }

/* Site main background */
[data-theme="dark"] .site-main        { background: var(--bg); }

/* Archive header */
[data-theme="dark"] .archive-header h1 { color: var(--text); }
[data-theme="dark"] .archive-header p  { color: var(--muted); }
[data-theme="dark"] .post-count        { background: rgba(234,88,12,.2); color: var(--c); }

/* Search */
[data-theme="dark"] .search-hero       { background: linear-gradient(160deg, rgba(234,88,12,.12) 0%, var(--card) 60%); }
[data-theme="dark"] .search-hero-form  { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .search-hero-form input { color: var(--text); }

/* Filter pills */
[data-theme="dark"] .filter-pill       { background: var(--card); border-color: var(--border); color: var(--muted); }
[data-theme="dark"] .filter-pill:hover { background: var(--c); color: #fff; border-color: var(--c); }

/* Post content */
[data-theme="dark"] .post-content      { color: var(--text); }
[data-theme="dark"] .post-content h2,
[data-theme="dark"] .post-content h3   { color: var(--text); }
[data-theme="dark"] .post-content blockquote { background: rgba(234,88,12,.1); color: var(--muted); }
[data-theme="dark"] .post-content code { background: #334155; color: #fca5a5; }
[data-theme="dark"] .post-content th   { background: var(--c); }
[data-theme="dark"] .post-content tr:nth-child(even) td { background: #1e293b; }
[data-theme="dark"] .post-content td   { border-color: var(--border); }

/* Tags */
[data-theme="dark"] .post-tags a       { background: #334155; border-color: var(--border); color: var(--muted); }
[data-theme="dark"] .post-tags a:hover { background: var(--c); color: #fff; border-color: var(--c); }

/* How-to & FAQ */
[data-theme="dark"] .howto-steps li strong { color: var(--text); }
[data-theme="dark"] .faq-item summary  { color: var(--text); }
[data-theme="dark"] .faq-item          { background: var(--card); border-color: var(--border); }

/* Sidebar */
[data-theme="dark"] .widget            { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .widget-title      { color: var(--text); }
[data-theme="dark"] .widget ul li a    { color: var(--muted); }
[data-theme="dark"] .cat-icon-link     { background: #1e293b; border-color: var(--border); color: var(--muted); }
[data-theme="dark"] .cat-icon-link:hover { background: rgba(234,88,12,.15); color: var(--c); }
[data-theme="dark"] .rp-title          { color: var(--text); }

/* Breadcrumb */
[data-theme="dark"] .breadcrumb-nav    { color: var(--muted); }
[data-theme="dark"] .breadcrumb-nav a  { color: var(--muted); }

/* Pagination */
[data-theme="dark"] .pagination li a,
[data-theme="dark"] .pagination li span { background: var(--card); border-color: var(--border); color: var(--muted); }

/* Buttons (outline variant) */
[data-theme="dark"] .btn-outline       { border-color: var(--border); color: var(--text); background: var(--card); }
[data-theme="dark"] .btn-outline:hover { border-color: var(--c); color: var(--c); background: rgba(234,88,12,.08); }

/* Nav links (primary nav on dark pages) */
[data-theme="dark"] .primary-nav a     { color: rgba(255,255,255,.9); }
[data-theme="dark"] .primary-nav a:hover { color: #fff; }

/* Page / static content */
[data-theme="dark"] .page-content h1,
[data-theme="dark"] .page-content h2   { color: var(--text); }
[data-theme="dark"] .page-content p    { color: var(--muted); }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea { background: #1e293b; border-color: var(--border); color: var(--text); }

/* Related posts */
[data-theme="dark"] .related-post-card .rpc-title { color: var(--text); }

/* 404 */
[data-theme="dark"] .error-404-number  { color: #1e293b; }
[data-theme="dark"] .error-404-inner h1 { color: var(--text); }

/* Section headings — Popular Template Searches, Browse by Category,
   Latest Free Printables, Related Templates, post title, search title */
[data-theme="dark"] .gallery-section-title,
[data-theme="dark"] .trending-section h2,
[data-theme="dark"] .section-title,
[data-theme="dark"] .related-section h2,
[data-theme="dark"] .related-section h3,
[data-theme="dark"] .howto-section h2,
[data-theme="dark"] .faq-section h2,
[data-theme="dark"] .detail-actions h1,
[data-theme="dark"] .search-hero-query,
[data-theme="dark"] .archive-header h1,
[data-theme="dark"] .single-main h1,
[data-theme="dark"] .single-main h2,
[data-theme="dark"] .single-main h3,
[data-theme="dark"] .post-content h2,
[data-theme="dark"] .post-content h3,
[data-theme="dark"] .rpc-title,
[data-theme="dark"] .nav-title,
[data-theme="dark"] .page-content h1,
[data-theme="dark"] .page-content h2,
[data-theme="dark"] .full-width-title    { color: var(--text); }

/* Post meta (date, reading time) */
[data-theme="dark"] .post-meta          { color: var(--muted); }
[data-theme="dark"] .post-intro         { color: var(--muted); }

/* Trending/popular searches section background */
[data-theme="dark"] .trending-section   { background: var(--bg); }

/* Gallery section wrapper */
[data-theme="dark"] .gallery-section    { background: var(--bg); }

/* Homepage category cards count badge */
[data-theme="dark"] .uc-count          { background: rgba(234,88,12,.2); color: var(--c); }

/* Detail hero background on single posts */
[data-theme="dark"] .detail-hero       { background: var(--card); }

/* Post nav direction label */
[data-theme="dark"] .nav-dir           { color: var(--c); }

/* Widget count badges */
[data-theme="dark"] .widget ul li .count,
[data-theme="dark"] .widget ul li .post-count { background: #334155; color: var(--muted); }

/* Search result count */
[data-theme="dark"] .search-result-count { color: var(--muted); }

/* No-results icon text */
[data-theme="dark"] .search-no-results h2,
[data-theme="dark"] .snr-icon            { color: var(--text); }

/* Footer copy */
[data-theme="dark"] .footer-copy         { color: #c8b0a0; }


/* ═══════════════════════════════════════════════════════════
   DARK MODE TOGGLE BUTTON
═══════════════════════════════════════════════════════════ */
.dark-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s, transform .2s;
}
.dark-toggle:hover   { background: rgba(255,255,255,.25); transform: rotate(20deg); }
.dark-toggle svg     { display: block; pointer-events: none; }

/* Show sun in dark mode, moon in light mode */
.dark-toggle .icon-sun  { display: none; }
.dark-toggle .icon-moon { display: block; }
[data-theme="dark"] .dark-toggle .icon-sun  { display: block; }
[data-theme="dark"] .dark-toggle .icon-moon { display: none; }


/* ═══════════════════════════════════════════════════════════
   AD ZONES
═══════════════════════════════════════════════════════════ */
.worker-ad-zone {
  text-align: center;
  overflow: hidden;
}

/* Header leaderboard — full width strip below the sticky header */
.worker-ad-header {
  width: 100%;
  padding: 8px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.worker-ad-header ins,
.worker-ad-header iframe { display: block; margin: 0 auto; }

/* After download button — sits below the hero on single posts */
.worker-ad-download {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}
.worker-ad-download ins,
.worker-ad-download iframe { margin: 0 auto; display: block; }

/* In-content rectangle — floats within post body */
.worker-ad-content {
  margin: 1.5rem auto;
  max-width: 336px;
  clear: both;
}
@media (min-width: 640px) {
  .worker-ad-content {
    float: right;
    margin: .5rem 0 1rem 1.5rem;
  }
}

/* Sidebar sticky slot */
.worker-ad-sidebar {
  position: sticky;
  top: 90px;           /* clears the sticky header */
  margin-top: 1.25rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 6px;
}
.worker-ad-sidebar ins,
.worker-ad-sidebar iframe { display: block; margin: 0 auto; }

/* Label shown above each ad (screen-reader friendly) */
.worker-ad-zone::before {
  content: 'Advertisement';
  display: block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 4px;
  opacity: .6;
}


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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ═══════════════════════════════════════════════════════════
   SKIP LINK (accessibility)
═══════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 999;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: .6rem 1.2rem;
  background: var(--c);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  outline: 3px solid #fff;
}

/* ═══════════════════════════════════════════════════════════
   STICKY HEADER
═══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--c);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: .7rem 1.5rem;
  gap: 1.2rem;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-link img,
.logo-link svg { width: 30px; height: 30px; flex-shrink: 0; }
.logo-link .site-name { display: inline; }

/* Header Search */
.header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.15);
  border-radius: 50px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.25);
  transition: background .2s, border-color .2s;
  flex: 1;
  max-width: 440px;
}
.header-search:focus-within {
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.5);
}
.header-search input {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: .9rem;
  outline: none;
  min-width: 0;
}
.header-search input::placeholder { color: rgba(255,255,255,.65); }
.header-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  transition: color .2s;
  flex-shrink: 0;
}
.header-search button:hover { color: #fff; }

/* Primary Navigation */
.primary-nav { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.primary-nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-item > a {
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle svg { display: block; }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  background: var(--cd);
  border-top: 1px solid rgba(255,255,255,.15);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; padding: .5rem 1.5rem 1rem; }
.mobile-nav ul li a {
  display: block;
  color: rgba(255,255,255,.9);
  text-decoration: none;
  padding: .6rem 0;
  font-size: .9rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.1);
  transition: color .2s;
}
.mobile-nav ul li:last-child a { border-bottom: none; }
.mobile-nav ul li a:hover { color: #fff; }

/* Ad banner below header */
.ad-banner {
  text-align: center;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: .5rem 0;
}
.ad-banner:empty { display: none; }

/* ═══════════════════════════════════════════════════════════
   BREADCRUMB
═══════════════════════════════════════════════════════════ */
.breadcrumb { margin-bottom: 1.2rem; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
}
.breadcrumb li { font-size: .8rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; color: #cbd5e1; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--c); text-decoration: underline; }
.breadcrumb li[aria-current="page"] { color: var(--text); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT WRAPPER
═══════════════════════════════════════════════════════════ */
.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.8rem 1.5rem 3rem;
}

/* ═══════════════════════════════════════════════════════════
   HERO BANNER (home page)
═══════════════════════════════════════════════════════════ */
.hero-banner {
  background: linear-gradient(135deg, var(--c) 0%, var(--cd) 55%, #7c2d12 100%);
  padding: 3rem 1.5rem 1.8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50px;
  padding: 6px 18px;
  margin-bottom: 1.4rem;
  color: rgba(255,255,255,.92);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-badge svg { width: 16px; height: 16px; opacity: .85; }
.hero-banner h1 {
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  color: #fff;
  margin-bottom: .9rem;
  letter-spacing: -.03em;
}
.hero-sub {
  color: rgba(255,255,255,.8);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

/* Hero search form */
.hero-search { max-width: 640px; margin: 0 auto 1.3rem; }
.hero-search form {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  border: 2px solid transparent;
  transition: border-color .2s;
}
.hero-search form:focus-within { border-color: rgba(255,255,255,.45); }
.hero-search input {
  flex: 1;
  padding: 15px 22px;
  border: none;
  background: transparent;
  font-size: 1rem;
  outline: none;
  color: var(--text);
  min-width: 0;
}
.hero-search input::placeholder { color: #94a3b8; }
.hero-search button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  margin: 4px 4px 4px 0;
  background: var(--c);
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 700;
  transition: background .2s, transform .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-search button:hover { background: var(--cd); transform: scale(1.02); }
.hero-search button svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Category pill chips */
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.cat-chip {
  padding: 8px 20px;
  background: rgba(255,255,255,.14);
  border: 1.5px solid rgba(255,255,255,.28);
  border-radius: 50px;
  text-decoration: none;
  color: rgba(255,255,255,.92);
  font-size: .875rem;
  font-weight: 500;
  transition: all .2s;
  backdrop-filter: blur(4px);
}
.cat-chip:hover {
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.55);
  color: #fff;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════
   SECTION HEADINGS
═══════════════════════════════════════════════════════════ */
.section-heading {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -.02em;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   TRENDING / POPULAR PILLS
═══════════════════════════════════════════════════════════ */
.trending-section { padding: 1.4rem 0 1.5rem; }
.trending-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}
.trending-grid a {
  display: inline-block;
  padding: 8px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50px;
  text-decoration: none;
  color: #334155;
  font-size: .84rem;
  font-weight: 500;
  transition: all .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.trending-grid a:hover {
  background: var(--c);
  color: #fff;
  border-color: var(--c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234,88,12,.2);
}

/* ═══════════════════════════════════════════════════════════
   USE CASES / CATEGORY CARDS  (emoji + title + desc style)
═══════════════════════════════════════════════════════════ */
.usecases-section { padding: 1rem 0 3.5rem; }

.uc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* Card */
.uc-card {
  display: block;
  padding: 1.5rem 1.4rem 1.6rem;
  border-radius: 18px;
  background: #fff;
  border: 1.5px solid var(--border);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
}
.uc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  border-color: #d1d5db;
}
.uc-card:focus-visible {
  outline: 3px solid var(--c);
  outline-offset: 3px;
}

/* Heading row: emoji + title */
.uc-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .8rem;
}
.uc-emoji {
  font-size: 1.55rem;
  line-height: 1;
  flex-shrink: 0;
}
.uc-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
}

/* Description */
.uc-desc {
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Post count badge */
.uc-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: .75rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--c);
  background: rgba(234,88,12,.08);
  padding: 3px 10px;
  border-radius: 50px;
  border: 1px solid rgba(234,88,12,.15);
}

/* ═══════════════════════════════════════════════════════════
   MASONRY GALLERY GRID
═══════════════════════════════════════════════════════════ */
.gallery-grid {
  columns: 5 200px;
  column-gap: 14px;
  margin-top: 1.5rem;
}
.gallery-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

/* Post / Image Card */
.card {
  display: block;
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.card:focus-visible {
  outline: 3px solid var(--c);
  outline-offset: 2px;
}
.card img { width: 100%; height: auto; display: block; }
.card-label {
  display: block;
  padding: 8px 12px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--border);
}

/* No thumbnail placeholder */
.card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 3/2;
  background: linear-gradient(135deg, var(--cl) 0%, #fde8d8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-thumb-placeholder svg { width: 40px; height: 40px; opacity: .35; }

/* Archive / listing header */
.archive-header {
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}
.archive-header h1 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: .5rem;
}
.archive-header .archive-desc {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
  max-width: 680px;
}
.archive-header .post-count {
  display: inline-block;
  margin-top: .5rem;
  background: var(--cl);
  color: var(--c);
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid rgba(234,88,12,.2);
}

/* ═══════════════════════════════════════════════════════════
   SINGLE POST — DETAIL HERO
═══════════════════════════════════════════════════════════ */
.detail-hero {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  background: var(--card);
  border-radius: 14px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.detail-img-wrap { flex: 0 0 55%; max-width: 55%; }
.detail-img-wrap img { width: 100%; height: auto; border-radius: 8px; display: block; }
.detail-actions { flex: 1; min-width: 0; }
.detail-actions .post-cats { margin-bottom: .8rem; }
.detail-actions .post-cats a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--cl);
  color: var(--c);
  font-size: .75rem;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  border: 1px solid rgba(234,88,12,.2);
  margin-right: 5px;
  transition: all .18s;
}
.detail-actions .post-cats a:hover { background: var(--c); color: #fff; }
.detail-actions h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .7rem;
  color: var(--text);
}
.detail-actions .post-intro {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
  margin-bottom: 1.3rem;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.2rem;
  margin-bottom: 1.2rem;
  font-size: .8rem;
  color: var(--muted);
}
.post-meta time, .post-meta .post-author { display: flex; align-items: center; gap: 5px; }
.post-meta svg { width: 14px; height: 14px; opacity: .6; }

/* Button group */
.btn-group { display: flex; flex-wrap: wrap; gap: 10px; width: fit-content; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn svg { flex-shrink: 0; width: 16px; height: 16px; }
.btn-primary  { background: var(--c); color: #fff; }
.btn-primary:hover  { background: var(--cd); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(234,88,12,.3); color: #fff; }
.btn-outline  { background: transparent; color: var(--c); border: 1.5px solid var(--c); }
.btn-outline:hover  { background: var(--c); color: #fff; }
.btn-secondary { background: #f1f5f9; color: #334155; }
.btn-secondary:hover { background: #e2e8f0; color: var(--text); }

/* Key dates / planning tips box */
.info-box {
  background: var(--cl);
  border: 1px solid rgba(234,88,12,.2);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
}
.info-box h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--cd);
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.info-box ul { list-style: none; padding: 0; }
.info-box ul li {
  font-size: .84rem;
  color: #7c2d12;
  padding: 3px 0;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}
.info-box ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--c);
  font-size: .7rem;
  top: 5px;
}

/* ═══════════════════════════════════════════════════════════
   HOW-TO STEPS
═══════════════════════════════════════════════════════════ */
.howto-section {
  max-width: 760px;
  margin: 2.5rem auto;
  padding: 2rem;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.howto-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.howto-section h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--c);
  border-radius: 2px;
}
.howto-steps { list-style: none; padding: 0; counter-reset: step; }
.howto-steps li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--border);
}
.howto-steps li:last-child { border-bottom: none; }
.howto-steps li::before {
  content: counter(step);
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .1rem;
  box-shadow: 0 2px 6px rgba(234,88,12,.3);
}
.howto-steps li .step-content { flex: 1; }
.howto-steps li strong {
  display: block;
  font-size: .92rem;
  color: var(--text);
  margin-bottom: .25rem;
  font-weight: 700;
}
.howto-steps li span {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   FAQ ACCORDION (details / summary)
═══════════════════════════════════════════════════════════ */
.faq-section {
  max-width: 760px;
  margin: 2.5rem auto;
}
.faq-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-section h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--c);
  border-radius: 2px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 9px;
  margin-bottom: 8px;
  background: var(--card);
  overflow: hidden;
  transition: box-shadow .2s;
}
.faq-item:hover { box-shadow: var(--shadow-md); }
.faq-item[open] {
  border-color: rgba(234,88,12,.3);
  box-shadow: 0 0 0 3px rgba(234,88,12,.06);
}
.faq-item summary {
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--c);
  font-weight: 400;
  flex-shrink: 0;
  transition: transform .25s ease;
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  padding: 0 1.2rem 1rem;
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
}
.faq-item .faq-answer p { margin-top: .7rem; }

/* ═══════════════════════════════════════════════════════════
   RELATED POSTS / TEMPLATES (pill nav)
═══════════════════════════════════════════════════════════ */
.related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.related-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  color: var(--text);
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.related-post-card {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
  box-shadow: var(--shadow);
}
.related-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--c);
}
.related-post-card img { width: 100%; height: 140px; object-fit: cover; display: block; }
.related-post-card .rpc-body { padding: .75rem 1rem; }
.related-post-card .rpc-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-post-card .rpc-cat {
  display: inline-block;
  margin-top: .4rem;
  font-size: .73rem;
  font-weight: 600;
  color: var(--c);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Related search pills */
.related-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.related-pill {
  display: inline-block;
  padding: 7px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  text-decoration: none;
  color: var(--text);
  font-size: .83rem;
  font-weight: 500;
  transition: all .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.related-pill:hover {
  background: var(--c);
  color: #fff;
  border-color: var(--c);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════
   POST CONTENT (single / page body)
═══════════════════════════════════════════════════════════ */
.post-content {
  font-size: .93rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 760px;
}
.post-content h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 .7rem; color: var(--text); }
.post-content h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 .5rem; color: var(--text); }
.post-content p  { margin-bottom: 1rem; }
.post-content a  { color: var(--c); text-decoration: underline; text-underline-offset: 2px; }
.post-content ul, .post-content ol { margin: .8rem 0 .8rem 1.4rem; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: .35rem; }
.post-content blockquote {
  border-left: 4px solid var(--c);
  padding: .75rem 1.2rem;
  margin: 1.2rem 0;
  background: var(--cl);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #7c2d12;
}
.post-content img { border-radius: 8px; margin: 1rem 0; }
.post-content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .88em;
  color: #c2410c;
}
.post-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: .85rem;
  line-height: 1.6;
}
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .87rem; }
.post-content th { background: var(--c); color: #fff; padding: .6rem .9rem; text-align: left; }
.post-content td { padding: .55rem .9rem; border-bottom: 1px solid var(--border); }
.post-content tr:nth-child(even) td { background: #f8fafc; }

/* Tags */
.post-tags { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post-tags .tags-label { font-size: .8rem; color: var(--muted); font-weight: 600; margin-right: 4px; }
.post-tags a {
  display: inline-block;
  padding: 4px 12px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: .78rem;
  color: #475569;
  text-decoration: none;
  transition: all .18s;
}
.post-tags a:hover { background: var(--c); color: #fff; border-color: var(--c); }

/* ═══════════════════════════════════════════════════════════
   STATIC PAGES
═══════════════════════════════════════════════════════════ */
.page-content {
  max-width: 760px;
  margin: 0 auto;
}
.page-content h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text);
  letter-spacing: -.02em;
}
.page-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 .7rem;
  color: var(--text);
}
.page-content p { color: var(--muted); margin-bottom: .9rem; font-size: .93rem; line-height: 1.75; }
.page-content a { color: var(--c); }
.page-content strong { color: var(--text); }
.page-content ul { list-style: disc; margin-left: 1.4rem; margin-bottom: .9rem; }
.page-content ul li { margin-bottom: .4rem; color: var(--muted); font-size: .93rem; }

/* Contact form */
.contact-form { margin-top: 1.5rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: .4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--c);
  box-shadow: 0 0 0 3px rgba(234,88,12,.1);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-submit .btn { padding: 12px 32px; font-size: .95rem; }

/* ═══════════════════════════════════════════════════════════
   SEARCH PAGE  (v1.2.0 redesign)
═══════════════════════════════════════════════════════════ */

/* ── Hero ── */
.search-hero {
  text-align: center;
  padding: 2.8rem 1.5rem 2rem;
  background: linear-gradient(160deg, var(--cl) 0%, #fff 60%);
  border-radius: 18px;
  border: 1px solid rgba(234,88,12,.12);
  margin-bottom: 1.75rem;
}
.search-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c);
  margin-bottom: .6rem;
}
.search-hero-query {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
  margin-bottom: 1.4rem;
  line-height: 1.2;
}

/* Search bar inside hero */
.search-hero-form {
  display: flex;
  max-width: 540px;
  margin: 0 auto 1rem;
  border-radius: 50px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  transition: border-color .2s, box-shadow .2s;
}
.search-hero-form:focus-within {
  border-color: var(--c);
  box-shadow: 0 4px 20px rgba(234,88,12,.14);
}
.search-hero-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 13px 20px;
  font-size: .95rem;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  min-width: 0;
}
.search-hero-form button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 22px;
  background: var(--c);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: .88rem;
  font-family: inherit;
  white-space: nowrap;
  transition: background .2s;
  flex-shrink: 0;
}
.search-hero-form button:hover { background: var(--cd); }

.search-result-count {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
}
.search-result-count strong { color: var(--c); }

/* ── Category filter pills row ── */
.search-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.75rem;
  align-items: center;
}
.filter-pill-active {
  background: var(--c) !important;
  color: #fff !important;
  border-color: var(--c) !important;
}

/* ── No results ── */
.search-no-results {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  max-width: 600px;
  margin: 0 auto;
}
.snr-icon { font-size: 3.5rem; margin-bottom: 1rem; display: block; }
.search-no-results h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .6rem;
  color: var(--text);
}
.search-no-results p {
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}
.snr-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 640px) {
  .search-hero { padding: 2rem 1rem 1.5rem; border-radius: 14px; }
  .search-hero-form { max-width: 100%; }
  .search-hero-form button span { display: none; } /* hide "Search" text, keep icon */
  .search-cat-pills { gap: 6px; }
}

/* ═══════════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
}
.pagination li a,
.pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: .87rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border);
  background: #fff;
  color: #475569;
  transition: all .18s;
}
.pagination li a:hover { background: var(--c); color: #fff; border-color: var(--c); }
.pagination li .current { background: var(--c); color: #fff; border-color: var(--c); }

/* ═══════════════════════════════════════════════════════════
   SINGLE POST WITH SIDEBAR LAYOUT
═══════════════════════════════════════════════════════════ */
.single-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
  margin-top: 1.5rem;
}
.single-main { min-width: 0; }

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: 80px; }

/* Widget box */
.widget {
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 1.4rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.widget-title {
  font-size: .88rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 1rem;
  padding-bottom: .65rem;
  border-bottom: 2px solid var(--c);
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* Generic widget list */
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li {
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
  color: #475569;
  text-decoration: none;
  font-size: .84rem;
  transition: color .18s;
  flex: 1;
}
.widget ul li a:hover { color: var(--c); }
.widget ul li .count,
.widget ul li .post-count {
  font-size: .72rem;
  font-weight: 700;
  background: #f1f5f9;
  border-radius: 50px;
  padding: 2px 8px;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Category Icons Widget (sidebar) ── */
.widget-cat-icons .cat-icon-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.widget-cat-icons .cat-icon-item {
  padding: 0;
  border-bottom: none !important;
}
.widget-cat-icons .cat-icon-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  border-radius: 10px;
  text-decoration: none;
  color: #374151;
  font-size: .86rem;
  font-weight: 500;
  background: #f8fafc;
  border: 1px solid var(--border);
  transition: all .18s;
}
.widget-cat-icons .cat-icon-link:hover {
  background: var(--cl);
  border-color: rgba(234,88,12,.25);
  color: var(--cd);
}
.widget-cat-icons .cat-icon-link:hover .cat-icon-emoji {
  transform: scale(1.15);
}
.cat-icon-emoji {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  transition: transform .18s;
}
.cat-icon-name { flex: 1; }
.cat-icon-count {
  font-size: .72rem;
  font-weight: 700;
  background: rgba(234,88,12,.08);
  color: var(--c);
  border-radius: 50px;
  padding: 2px 8px;
  flex-shrink: 0;
}

/* Recent posts widget */
.widget-recent-posts .recent-post-item {
  display: flex;
  gap: .75rem;
  padding: .6rem 0 !important;
  border-bottom: 1px solid var(--border) !important;
  align-items: flex-start;
}
.widget-recent-posts .recent-post-item:last-child { border-bottom: none !important; }
.rp-thumb {
  width: 56px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
}
.rp-thumb-placeholder {
  width: 56px;
  height: 44px;
  border-radius: 6px;
  background: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rp-info { flex: 1; min-width: 0; }
.rp-title {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rp-title:hover { color: var(--c); }
.rp-date { font-size: .72rem; color: var(--muted); margin-top: 3px; }

/* ═══════════════════════════════════════════════════════════
   BACK-TO-TOP BUTTON
═══════════════════════════════════════════════════════════ */
.btt {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(234,88,12,.4);
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s;
  z-index: 100;
  pointer-events: none;
}
.btt.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.btt:hover { background: var(--cd); transform: translateY(-2px); }
.btt svg { width: 20px; height: 20px; }

/* ═══════════════════════════════════════════════════════════
   FOOTER  (v1.2.2 — dark warm footer)
═══════════════════════════════════════════════════════════ */
.site-footer {
  margin-top: 4rem;
  padding: 2.8rem 1.5rem 2rem;
  background: #1a0a02;          /* deep dark amber-brown               */
  border-top: 3px solid var(--c); /* amber accent line at top           */
  text-align: center;
  color: #c8b0a0;               /* warm off-white for body text        */
}
.footer-inner { max-width: var(--max); margin: 0 auto; }

/* Footer widget columns (if used) */
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}
.footer-widget-col .widget-title {
  color: #fff;
  border-bottom-color: var(--c);
  font-size: .8rem;
}
.footer-widget-col .widget ul li a { color: #c8b0a0; }
.footer-widget-col .widget ul li a:hover { color: var(--c); }
.footer-widget-col .widget ul li { border-bottom-color: rgba(255,255,255,.07); }

/* Divider above copyright row */
.footer-inner hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 1.5rem 0 1.2rem;
}

/* Copyright / copy text */
.footer-copy {
  color: #c8b0a0;
  font-size: .84rem;
  margin-bottom: .6rem;
}

/* Footer nav links */
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem; margin-bottom: .8rem; }
.footer-nav a {
  color: #c8b0a0;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 5px;
  transition: color .18s, background .18s;
}
.footer-nav a:hover {
  color: #fff;
  background: rgba(234,88,12,.25);
}

/* Credit line */
.footer-credit { font-size: .73rem; color: rgba(255,255,255,.25); margin-top: .6rem; }

/* ═══════════════════════════════════════════════════════════
   404 PAGE
═══════════════════════════════════════════════════════════ */
.error-404-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.error-404-inner { max-width: 480px; }
.error-404-number {
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 900;
  color: #e2e8f0;
  line-height: 1;
  letter-spacing: -.05em;
  margin-bottom: 1rem;
}
.error-404-inner h1 { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: .7rem; }
.error-404-inner p { color: var(--muted); font-size: .95rem; margin-bottom: 2rem; line-height: 1.65; }
.error-404-search { max-width: 380px; margin: 0 auto 1.5rem; }
.error-404-search form {
  display: flex;
  border-radius: 50px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}
.error-404-search input {
  flex: 1;
  padding: 11px 18px;
  border: none;
  font-size: .9rem;
  outline: none;
  background: #fff;
  color: var(--text);
  min-width: 0;
}
.error-404-search button {
  padding: 11px 20px;
  background: var(--c);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
  font-family: inherit;
  transition: background .2s;
  flex-shrink: 0;
}
.error-404-search button:hover { background: var(--cd); }
.error-404-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ═══════════════════════════════════════════════════════════
   SCREEN READER TEXT
═══════════════════════════════════════════════════════════ */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   WORDPRESS CORE ALIGNMENTS
═══════════════════════════════════════════════════════════ */
.alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin: 1rem auto; display: block; }
.alignwide  { margin-left: -3rem; margin-right: -3rem; }
.alignfull  { margin-left: calc(-1.5rem - 1px); margin-right: calc(-1.5rem - 1px); }
.wp-block-image img { border-radius: 8px; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
/* ── 1100px ── */
@media (max-width: 1100px) {
  .gallery-grid { columns: 4 170px; }
  .single-wrap { grid-template-columns: 1fr 270px; gap: 2rem; }
  .uc-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

/* ── 900px ── */
@media (max-width: 900px) {
  .gallery-grid { columns: 3 160px; }
  .single-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .detail-hero { flex-direction: column; }
  .detail-img-wrap { flex: none; max-width: 100%; }
  .primary-nav { display: none; }
  .menu-toggle { display: flex; align-items: center; gap: 6px; }
  .uc-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .trending-grid a { padding: 7px 16px; font-size: .82rem; }
}

/* ── 640px ── */
@media (max-width: 640px) {
  /* Layout */
  .gallery-grid { columns: 2 130px; column-gap: 10px; }
  .hdr { padding: .6rem 1rem; gap: .75rem; }
  .site-main { padding: 1rem .9rem 2.5rem; }

  /* Header */
  .header-search { max-width: none; flex: 1; }
  .header-search input { font-size: .84rem; padding: 7px 12px; }
  .logo-link .site-name { display: none; }  /* hide text, keep logo icon */

  /* Hero */
  .hero-banner { padding: 2rem 1rem 1.4rem; }
  .hero-banner h1 { font-size: 1.65rem; letter-spacing: -.02em; }
  .hero-sub { font-size: .9rem; margin-bottom: 1.2rem; }
  .hero-search { margin-bottom: 1rem; }
  .hero-search input { padding: 12px 16px; font-size: .88rem; }
  .hero-search button { padding: 10px 18px; font-size: .85rem; gap: 6px; }
  .section-heading { font-size: 1.25rem; }
  .trending-section { padding: 1.2rem 0 1.2rem; }

  /* Category cards */
  .uc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .uc-card { padding: 1rem 1rem 1.1rem; border-radius: 14px; }
  .uc-head h3 { font-size: .95rem; }
  .uc-emoji { font-size: 1.3rem; }
  .uc-desc { font-size: .82rem; }
  .uc-count { margin-top: .5rem; }

  /* Howto / FAQ */
  .howto-section, .faq-section { margin: 1.5rem 0; padding: 1.3rem; }

  /* Related */
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .related-post-card img { height: 110px; }

  /* Single post */
  .detail-hero { padding: 1.2rem; }
  .detail-actions h1 { font-size: 1.15rem; }
  .btn-group { gap: 8px; }
  .btn { padding: 9px 18px; font-size: .85rem; }

  /* Misc */
  .btt { bottom: 1rem; right: 1rem; width: 42px; height: 42px; }
  .archive-header h1 { font-size: 1.3rem; }
  .error-404-number { font-size: 5rem; }
  .footer-nav { gap: 0; }
  .footer-nav a { padding: 4px 8px; font-size: .8rem; }
}

/* ── 420px ── */
@media (max-width: 420px) {
  .gallery-grid { columns: 1; }
  .related-posts-grid { grid-template-columns: 1fr; }
  .uc-grid { grid-template-columns: 1fr; }
  .hero-banner h1 { font-size: 1.4rem; }
  .section-heading { font-size: 1.15rem; }
  .trending-section { padding: 1rem 0 1rem; }
  .trending-grid a { padding: 6px 14px; font-size: .8rem; }
  .btn-group { flex-direction: column; }
  .btn { justify-content: center; }
}

/* ── Full-width single (no sidebar active) ── */
.single-no-sidebar { grid-template-columns: 1fr; }
.single-no-sidebar .single-main { max-width: 800px; margin: 0 auto; }

/* Post taxonomy row */
.post-tax-row { margin-bottom: 1rem; }

/* Prev / Next post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
}
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: .9rem 1.1rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
  box-shadow: var(--shadow);
}
.post-nav-link:hover {
  border-color: var(--c);
  box-shadow: 0 4px 16px rgba(234,88,12,.1);
  transform: translateY(-1px);
}
.post-nav-next { text-align: right; }
.nav-dir {
  font-size: .72rem;
  font-weight: 700;
  color: var(--c);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.nav-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   ARCHIVE PAGE EXTRAS
═══════════════════════════════════════════════════════════ */
.archive-cat-badge { display: none; } /* reserved for future use */

/* Category icon in archive h1 */
.archive-header h1 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.archive-header h1 span[aria-hidden="true"] { font-size: 1.3em; }

/* Filter pills row */
.archive-filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.5rem;
  padding: .9rem 1.2rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.filter-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  flex-shrink: 0;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 50px;
  text-decoration: none;
  color: #475569;
  font-size: .82rem;
  font-weight: 500;
  transition: all .18s;
}
.filter-pill span {
  font-size: .7rem;
  background: #e2e8f0;
  border-radius: 50px;
  padding: 1px 6px;
  color: var(--muted);
}
.filter-pill:hover {
  background: var(--c);
  color: #fff;
  border-color: var(--c);
}
.filter-pill:hover span { background: rgba(255,255,255,.25); color: #fff; }

/* ── color-mix fallback for older browsers ── */
@supports not (color: color-mix(in srgb, red 10%, transparent)) {
  .uc-count { background: rgba(234,88,12,.1); }
  .uc-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.1); }
}

/* ── Header: hide search bar on homepage ── */
body.is-home-page .site-header .header-search { display: none; }

/* ── Header: site-name always visible (set independently via Customizer) ── */

/* ═══════════════════════════════════════════════════════════
   PRINT STYLES  (basic Ctrl+P / browser print)
═══════════════════════════════════════════════════════════ */
@media print {
  .site-header, .site-footer, .btt, .hero-banner,
  .related-section, .pagination, .sidebar, .post-nav,
  .archive-filter-pills, .btn-group, .comments-area,
  .breadcrumb-nav, #mobile-nav { display: none !important; }

  body { background: #fff; color: #000; font-size: 12pt; line-height: 1.6; }
  .site-main { max-width: 100%; padding: 0; }
  .single-wrap { display: block; }
  .post-content { max-width: 100%; font-size: 11pt; }
  a { color: #000; text-decoration: underline; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  h1, h2, h3 { page-break-after: avoid; }
}


/* ═══════════════════════════════════════════════════════════
   FULL-WIDTH PAGE TEMPLATE  (v1.2.0)
═══════════════════════════════════════════════════════════ */
.full-width-page {
  width: 100%;
}
.full-width-article { width: 100%; }

/* Hero image — truly full width */
.full-width-hero-img {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  max-height: 560px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.full-width-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

/* Inner wrapper — readable width for text, but unlocked */
.full-width-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
.full-width-header { margin-bottom: 1.5rem; }
.full-width-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -.02em;
}

/* Full-width content inherits post-content styles */
.full-width-content { max-width: none; }

/* Wide/full-aligned blocks escape the inner container */
.full-width-content .alignwide {
  margin-left: calc(-1 * ((960px - 100%) / 2));
  margin-right: calc(-1 * ((960px - 100%) / 2));
}
.full-width-content .alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
}

@media (max-width: 640px) {
  .full-width-hero-img { max-height: 260px; }
  .full-width-inner { padding: 0 .9rem 2rem; }
}

/* ═══════════════════════════════════════════════════════════
   SOCIAL LINKS (footer)
═══════════════════════════════════════════════════════════ */
.footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.2rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #c8b0a0;
  border: 1.5px solid rgba(255,255,255,.12);
  text-decoration: none;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.footer-social a:hover {
  background: var(--c);
  color: #fff;
  border-color: var(--c);
  transform: translateY(-2px);
}
.footer-social svg { display: block; }
