/*
Theme Name: Oumomo Hub
Theme URI: https://www.oumomo.ai/
Author: Oumomo
Author URI: https://www.oumomo.ai/
Description: A modern blog theme for Oumomo Hub, designed for AI e-commerce content.
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oumomo-hub
Domain Path: /languages
*/

html, body { overflow-x: hidden; }
    body {
      min-height: 100vh;
      font-family: "Inter", system-ui, sans-serif;
      color: #fff;
      background:
        radial-gradient(circle at 50% -10%, rgba(255, 77, 140, 0.10) 0%, rgba(176, 102, 255, 0.06) 28%, transparent 55%),
        radial-gradient(circle at 80% 50%, rgba(176, 102, 255, 0.03) 0%, transparent 40%),
        #0a0912;
    }
    .top-nav {
      background: rgba(10, 9, 18, 0.75);
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      backdrop-filter: blur(24px) saturate(1.2);
      -webkit-backdrop-filter: blur(24px) saturate(1.2);
    }
    .brand-logo { width: clamp(142px, 13vw, 180px); height: auto; display: block; }
    .lang-btn {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
    }
    .lang-btn::before {
      content: ""; position: absolute; inset: 0;
      background: rgba(255, 255, 255, 0.06); opacity: 0;
      transition: opacity 0.25s ease;
    }
    .lang-btn:hover { border-color: rgba(255, 255, 255, 0.18); transform: translateY(-1px); }
    .lang-btn:hover::before { opacity: 1; }
    .lang-btn.is-disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }
    .lang-btn.is-disabled:hover {
      border-color: rgba(255, 255, 255, 0.08);
      transform: none;
    }
    .lang-btn.is-disabled:hover::before { opacity: 0; }
    .gradient-btn {
      background: linear-gradient(135deg, #FF4D8C 0%, #B066FF 100%);
      position: relative; overflow: hidden;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .gradient-btn::before {
      content: ""; position: absolute; inset: 0;
      background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
      opacity: 0; transition: opacity 0.3s ease;
    }
    .gradient-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 20px 40px rgba(255, 77, 140, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    .gradient-btn:hover::before { opacity: 1; }
    .gradient-btn:active { transform: translateY(0); transition-duration: 0.1s; }
    .page-shell { width: min(calc(100% - 48px), 1160px); margin: 0 auto; }
    .hero-title {
      font-size: clamp(40px, 5.5vw, 72px); line-height: 1.05;
      letter-spacing: -0.03em; font-weight: 800;
      background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.85) 100%);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .hero-subtitle { color: rgba(255, 255, 255, 0.55); font-weight: 400; letter-spacing: 0.01em; }
    .layout {
      display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start;
    }
    .sidebar-wrapper { margin-top: 8px; }
    .sidebar {
      position: sticky; top: 104px; display: grid; gap: 4px;
      padding: 24px 20px 24px 36px; border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(255, 255, 255, 0.025);
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      overflow: hidden; transition: border-color 0.3s ease;
    }
    .sidebar:hover { border-color: rgba(255, 255, 255, 0.1); }
    .sidebar::before {
      content: ""; position: absolute; left: 18px; top: 28px; bottom: 28px;
      width: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.08);
    }
    .category-link {
      position: relative; min-height: 44px; display: flex; align-items: center;
      padding: 0 4px; color: rgba(255, 255, 255, 0.55); font-size: 15px;
      line-height: 1.3; letter-spacing: -0.01em; font-weight: 600;
      border-radius: 10px; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .category-link:hover { color: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.04); }
    .category-link.is-active { color: #ff4d8c; background: rgba(255, 77, 140, 0.08); }
    .category-link.is-active::before {
      content: ""; position: absolute; left: -18px; top: 12px; bottom: 12px;
      width: 4px; border-radius: 999px;
      background: linear-gradient(180deg, #ff4d8c, #b066ff);
      box-shadow: 0 0 16px rgba(255, 77, 140, 0.4);
    }
    .toolbar {
      display: flex; align-items: center; justify-content: space-between;
      gap: 18px; flex-wrap: wrap; margin-bottom: 32px; padding-bottom: 20px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    .toolbar-title {
      font-size: clamp(26px, 3.5vw, 40px); line-height: 1.1;
      letter-spacing: -0.03em; font-weight: 800; color: rgba(255, 255, 255, 0.95);
    }
    .article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
    .article-card {
      min-height: 300px; display: flex; flex-direction: column;
      overflow: hidden; border-radius: 20px;
      background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06);
      transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: pointer; position: relative;
    }
    .article-card::before {
      content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 1px;
      background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent 50%);
      -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor; mask-composite: exclude;
      opacity: 0; transition: opacity 0.35s ease; pointer-events: none;
    }
    .article-card:hover {
      transform: translateY(-6px); background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    }
    .article-card:hover::before { opacity: 1; }
    .article-card:active { transform: translateY(-2px); transition-duration: 0.1s; }
    .article-thumb {
      position: relative; min-height: 176px; overflow: hidden;
      background: var(--thumb-bg);
      transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .article-thumb.has-featured-image {
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
    }
    .article-card:hover .article-thumb { transform: scale(1.03); }
    .article-thumb::before {
      content: ""; position: absolute; inset: 0;
      background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15), transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.08), transparent 35%);
      mix-blend-mode: overlay;
    }
    .article-thumb::after {
      content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 60%;
      background: linear-gradient(to top, rgba(10, 9, 18, 0.6), transparent); pointer-events: none;
    }
    .article-body { padding: 20px 20px 22px; flex: 1; display: flex; flex-direction: column; }
    .article-title {
      color: rgba(255, 255, 255, 0.95); font-size: 17px; line-height: 1.35;
      letter-spacing: -0.01em; font-weight: 700; transition: color 0.25s ease;
    }
    .article-card:hover .article-title { color: #fff; }
    .article-copy {
      margin-top: 10px; color: rgba(255, 255, 255, 0.45); font-size: 13.5px;
      line-height: 1.6; font-weight: 400; flex: 1;
      display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    }
    .article-meta {
      margin-top: 14px; display: flex; align-items: center; gap: 8px;
      font-size: 12px; color: rgba(255, 255, 255, 0.35);
      font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase;
    }
    .article-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
    .footer-link {
      color: rgba(255, 255, 255, 0.4); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      font-size: 14px; font-weight: 500; position: relative; padding: 4px 0;
    }
    .footer-link::after {
      content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 1px;
      background: linear-gradient(90deg, #ff4d8c, #b066ff);
      transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .footer-link:hover { color: rgba(255, 255, 255, 0.85); }
    .footer-link:hover::after { width: 100%; }
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(24px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .animate-in {
      animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; opacity: 0;
    }
    .article-card:nth-child(1) { animation-delay: 0.05s; }
    .article-card:nth-child(2) { animation-delay: 0.1s; }
    .article-card:nth-child(3) { animation-delay: 0.15s; }
    .article-card:nth-child(4) { animation-delay: 0.2s; }
    .article-card:nth-child(5) { animation-delay: 0.25s; }
    .article-card:nth-child(6) { animation-delay: 0.3s; }
    .category-badge {
      display: inline-flex; align-items: center; padding: 3px 10px;
      border-radius: 6px; font-size: 11px; font-weight: 600;
      letter-spacing: 0.03em; text-transform: uppercase;
    }
    .category-badge-guide { background: rgba(0, 196, 221, 0.12); color: #00c8dd; }
    .category-badge-blog { background: rgba(255, 77, 140, 0.12); color: #ff4d8c; }
    .category-badge-insight { background: rgba(176, 102, 255, 0.12); color: #b066ff; }
    .category-badge-alternative { background: rgba(255, 122, 102, 0.12); color: #ff7a66; }
    .article-body > .category-badge {
      display: inline-flex !important;
      align-self: flex-start !important;
      width: auto !important;
      max-width: max-content !important;
      flex: 0 0 auto !important;
    }
    @media (max-width: 980px) {
      .layout { grid-template-columns: 1fr; gap: 32px; }
      .sidebar { position: static; display: flex; gap: 8px; overflow-x: auto; padding: 16px; border-radius: 16px; }
      .sidebar::before, .category-link.is-active::before { display: none; }
      .category-link { white-space: nowrap; padding: 8px 16px; font-size: 14px; min-height: auto; }
      .category-link.is-active { background: rgba(255, 77, 140, 0.12); }
      .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    }
    @media (max-width: 680px) {
      .article-grid { grid-template-columns: 1fr; gap: 16px; }
      .page-shell { width: calc(100% - 32px); }
      .hero-title { font-size: clamp(32px, 9vw, 44px); }
    }
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }
    ::selection { background: rgba(255, 77, 140, 0.3); color: #fff; }

/* WordPress block-theme compatibility */
.wp-site-blocks { min-height: 100vh; }
.wp-block-group { box-sizing: border-box; }
.wp-block-template-part { margin: 0; }
.top-nav { position: sticky; top: 0; z-index: 50; }
.top-nav > .wp-block-group,
.top-nav .nav-inner { max-width: 1440px; margin: 0 auto; }
.header-nav { display: none; }
.wp-block-site-logo img,
.brand-logo img { width: clamp(142px, 13vw, 180px); height: auto; }

/* Override WordPress is-layout-constrained max-width for our custom page-shell elements */
.page-shell,
.page-shell.layout,
.page-shell.archive-header,
.page-shell.search-header {
  max-width: none !important;
  width: min(calc(100% - 48px), 1160px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.page-shell-narrow,
.single-prototype.page-shell {
  max-width: none !important;
  width: min(calc(100% - 48px), 800px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.article-card > .wp-block-group__inner-container,
.article-card > a { display: flex; flex-direction: column; min-height: 100%; color: inherit; }
.article-card .wp-block-post-featured-image { margin: 0; }
.article-card .wp-block-post-featured-image a { display: block; min-height: 176px; background: linear-gradient(135deg, #1a2744, #5a3fd4 48%, #00a8c4); }
.article-card .wp-block-post-featured-image img { display: block; width: 100%; height: 176px; object-fit: cover; }
.article-card .wp-block-post-title { margin: 0; }
.article-card .wp-block-post-title a { color: inherit; }
.article-card .wp-block-post-excerpt { margin: 10px 0 0; }
.article-card .wp-block-post-excerpt__excerpt { margin: 0; }
.wp-block-query.article-grid { display: block; }
.wp-block-query.article-grid > .wp-block-post-template,
.wp-block-query.article-grid .wp-block-post-template,
.wp-block-query.article-grid .wp-block-post-template.is-flex-container,
.wp-block-query.article-grid .wp-block-post-template.is-flex-container.columns-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  max-width: none !important;
}
.wp-block-query.article-grid .wp-block-post-template > li,
.wp-block-query.article-grid .wp-block-post-template.is-flex-container.columns-3 > li {
  width: auto !important;
  margin: 0 !important;
  min-width: 0 !important;
}
.wp-block-query.article-grid .article-card {
  width: 100%;
  height: 100%;
}
.wp-block-query.article-grid .article-body {
  min-height: 300px;
}
.wp-block-query-pagination { margin-top: 3rem; }
.article-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.article-pagination .page-numbers,
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers { padding: 0.5rem 1rem; border-radius: 0.5rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10); color: rgba(255,255,255,.60); font-size: .875rem; font-weight: 500; }
.article-pagination a.page-numbers:hover { color: rgba(255,255,255,.90); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.article-pagination .current,
.wp-block-query-pagination .current { background: linear-gradient(135deg, #FF4D8C 0%, #B066FF 100%); color: #fff; border-color: transparent; }
.category-badge a { color: inherit; }
.category-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.category-list a { position: relative; min-height: 44px; display: flex; align-items: center; padding: 0 4px; color: rgba(255,255,255,.55); font-size: 15px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; border-radius: 10px; transition: all .25s cubic-bezier(.4,0,.2,1); }
.category-list a:hover { color: rgba(255,255,255,.9); background: rgba(255,255,255,.04); }
.category-list .current-cat > a { color: #ff4d8c; background: rgba(255, 77, 140, 0.08); }
.category-list .current-cat > a::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4d8c, #b066ff);
  box-shadow: 0 0 16px rgba(255, 77, 140, 0.4);
}
.footer-links a { color: rgba(255,255,255,.4); transition: all .25s cubic-bezier(.4,0,.2,1); font-size: 14px; font-weight: 500; }
.footer-links a:hover { color: rgba(255,255,255,.85); }
@media (max-width: 980px) {
  .wp-block-query.article-grid > .wp-block-post-template,
  .wp-block-query.article-grid .wp-block-post-template,
  .wp-block-query.article-grid .wp-block-post-template.is-flex-container,
  .wp-block-query.article-grid .wp-block-post-template.is-flex-container.columns-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
}
@media (max-width: 680px) {
  .wp-block-query.article-grid > .wp-block-post-template,
  .wp-block-query.article-grid .wp-block-post-template,
  .wp-block-query.article-grid .wp-block-post-template.is-flex-container,
  .wp-block-query.article-grid .wp-block-post-template.is-flex-container.columns-3 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}


/* Homepage post-card refinements */
.wp-block-query.article-grid .article-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.wp-block-query.article-grid .article-thumb {
  display: block;
  min-height: 176px;
  flex: 0 0 176px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(135deg, #1a2744, #5a3fd4 48%, #00a8c4);
}
.wp-block-query.article-grid .wp-block-post:nth-child(2n) .article-thumb { background: linear-gradient(135deg, #1a2332, #e03d7a 48%, #e8b84d); }
.wp-block-query.article-grid .wp-block-post:nth-child(3n) .article-thumb { background: linear-gradient(135deg, #1e1630, #9a5af0 45%, #e87a3c); }
.wp-block-query.article-grid .wp-block-post:nth-child(4n) .article-thumb { background: linear-gradient(135deg, #24152a, #e03d7a 45%, #6a2dd0); }
.wp-block-query.article-grid .wp-block-post:nth-child(5n) .article-thumb { background: linear-gradient(135deg, #0f2a2e, #00a87a 42%, #9a5af0); }
.wp-block-query.article-grid .wp-block-post:nth-child(6n) .article-thumb { background: linear-gradient(135deg, #16122a, #3cb8e0 38%, #e03d7a); }
.wp-block-query.article-grid .article-body {
  min-height: 0;
  flex: 1;
}
.wp-block-query.article-grid .article-title {
  text-align: left;
}
.wp-block-query.article-grid .article-copy {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wp-block-query.article-grid .category-badge {
  align-self: flex-start;
}
@media (max-width: 980px) {
  .sidebar .category-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
  }
  .sidebar .category-list li { flex: 0 0 auto; }
  .sidebar .category-list a { min-height: auto; padding: 8px 16px; }
  .sidebar-title { display: none; }
}


/* Archive and search page styles */
.archive-header,
.search-header {
  padding-top: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.archive-title,
.search-title {
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.archive-description {
  margin-top: 12px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}
.search-form {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}
.search-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.25s ease;
}
.search-input:focus {
  outline: none;
  border-color: rgba(255, 77, 140, 0.5);
  background: rgba(255, 255, 255, 0.07);
}
.search-input::placeholder { color: rgba(255, 255, 255, 0.3); }
.search-btn {
  padding: 14px 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF4D8C, #B066FF);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}
.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 77, 140, 0.25);
}
.archive-header + main .article-grid,
.search-header + main .article-grid,
main.page-shell > .article-grid {
  margin-top: 40px;
}
@media (max-width: 980px) {
  .search-form { flex-direction: column; }
}

  /* Hide toggle on desktop (created by JS only on mobile) */
  .sidebar-toggle { display: none; }

/* Mobile responsive optimizations */
@media (max-width: 768px) {
  /* Nav */
  .top-nav .flex { padding-left: 16px; padding-right: 16px; }
  .brand-logo { width: clamp(110px, 35vw, 160px) !important; }
  .gradient-btn { min-height: 36px !important; padding: 8px 14px !important; font-size: 13px !important; }
  .lang-btn { padding: 6px 12px !important; font-size: 13px !important; }

  /* Hero / archive / search header */
  .hero-title,
  .archive-title,
  .search-title { font-size: clamp(28px, 8vw, 40px) !important; }
  .hero-subtitle,
  .archive-description { font-size: 15px !important; }
  .archive-header,
  .search-header { padding-top: 32px; padding-bottom: 24px; }

  /* Layout grid: single column */
  .layout { grid-template-columns: 1fr !important; gap: 20px !important; }

  /* Sidebar wrapper: ensure no overflow clipping */
  .sidebar-wrapper {
    display: block !important;
    overflow: visible !important;
  }

  /* Sidebar: simple flex container, NO overflow:hidden, NO max-height, NO sticky */
  .sidebar {
    position: relative !important;
    top: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 12px 16px !important;
    border-radius: 16px !important;
    white-space: normal !important;
  }
  .sidebar::before,
  .category-link.is-active::before,
  .sidebar .category-list .current-cat > a::before { display: none !important; }
  .sidebar-title {
    display: block !important;
    width: 100% !important;
    margin-bottom: 4px !important;
    font-size: 12px !important;
    cursor: pointer !important;
  }
  /* Category list: flex wrap, no max-height or overflow hidden */
  .sidebar .category-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    overflow: visible !important;
    white-space: normal !important;
  }
  .sidebar .category-list li { flex: 0 0 auto !important; }
  .sidebar .category-list a {
    min-height: auto !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
  }
  /* Toggle button: injected by JS inside .sidebar, always visible */
  .sidebar-toggle {
    display: block !important;
    width: 100%;
    margin: 8px 0 0;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-family: inherit;
    text-align: center;
  }
  .sidebar-toggle:hover { color: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.06); }

  /* Article grid: single column */
  .article-grid { grid-template-columns: 1fr !important; gap: 16px !important; }

  /* Article cards: smaller on mobile */
  .article-card { min-height: auto !important; border-radius: 16px !important; }
  .article-thumb { min-height: 140px !important; flex: 0 0 140px !important; }
  .article-body { padding: 16px !important; }
  .article-title { font-size: 16px !important; }
  .article-copy { font-size: 13px !important; -webkit-line-clamp: 2 !important; }
  .article-meta { font-size: 11px !important; margin-top: 10px !important; }

  /* Page shell: narrower on mobile */
  .page-shell,
  .page-shell.layout,
  .page-shell.archive-header,
  .page-shell.search-header { width: calc(100% - 32px) !important; }

  /* Search form */
  .search-form { flex-direction: column !important; }
  .search-input { padding: 12px 16px !important; font-size: 15px !important; }
  .search-btn { padding: 12px 20px !important; }

  /* Footer */
  footer .flex { flex-direction: column !important; text-align: center; }
  .footer-link { font-size: 13px !important; }

  /* Single post */
  .post-header { padding-top: 32px; padding-bottom: 24px; }
  .post-title { font-size: clamp(26px, 7vw, 36px) !important; }
  .post-meta { font-size: 12px !important; gap: 8px !important; flex-wrap: wrap; }
  .post-featured-image { border-radius: 16px !important; margin: 24px 0 !important; }
  .post-content { font-size: 15px !important; }
  .post-content h2 { font-size: 22px !important; margin-top: 32px !important; }
  .post-content h3 { font-size: 18px !important; margin-top: 24px !important; }
  .post-nav { grid-template-columns: 1fr !important; }
  .post-nav-item { padding: 16px !important; border-radius: 12px !important; }
}

/* Tablet (769-980px) specific */
@media (min-width: 769px) and (max-width: 980px) {
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px !important; }
  .layout { grid-template-columns: 1fr !important; gap: 24px !important; }
  .sidebar {
    position: static !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 16px !important;
    border-radius: 16px !important;
  }
  .sidebar::before,
  .category-link.is-active::before,
  .sidebar .category-list .current-cat > a::before { display: none !important; }
  .sidebar-title { display: none !important; }
  .sidebar .category-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    overflow: visible !important;
    white-space: normal !important;
  }
  .sidebar .category-list li { flex: 0 0 auto !important; }
  .sidebar .category-list a { min-height: auto !important; padding: 8px 16px !important; }
}

/* Keep archive/category pages in the same left-sidebar layout on tablet/desktop widths. */
@media (min-width: 769px) {
  body.archive .layout,
  body.category .layout,
  body.tag .layout {
    display: grid !important;
    grid-template-columns: 260px minmax(0, 1fr) !important;
    gap: 40px !important;
    align-items: start !important;
  }
  body.archive .sidebar,
  body.category .sidebar,
  body.tag .sidebar {
    position: sticky !important;
    top: 104px !important;
    display: grid !important;
    gap: 4px !important;
    overflow: hidden !important;
    padding: 24px 20px 24px 36px !important;
    border-radius: 20px !important;
  }
  body.archive .sidebar-title,
  body.category .sidebar-title,
  body.tag .sidebar-title {
    display: block !important;
  }
  body.archive .sidebar .category-list,
  body.category .sidebar .category-list,
  body.tag .sidebar .category-list {
    display: grid !important;
    gap: 4px !important;
    overflow: visible !important;
    white-space: normal !important;
  }
  body.archive .sidebar .category-list li,
  body.category .sidebar .category-list li,
  body.tag .sidebar .category-list li {
    flex: initial !important;
  }
  body.archive .sidebar .category-list a,
  body.category .sidebar .category-list a,
  body.tag .sidebar .category-list a {
    min-height: 44px !important;
    padding: 0 4px !important;
  }
}


/* Single post page styles */
html, body { overflow-x: hidden; }
    body {
      min-height: 100vh;
      font-family: "Inter", system-ui, sans-serif;
      color: #fff;
      background:
        radial-gradient(circle at 50% -10%, rgba(255, 77, 140, 0.10) 0%, rgba(176, 102, 255, 0.06) 28%, transparent 55%),
        radial-gradient(circle at 80% 50%, rgba(176, 102, 255, 0.03) 0%, transparent 40%),
        #0a0912;
    }
    .top-nav {
      background: rgba(10, 9, 18, 0.75);
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      backdrop-filter: blur(24px) saturate(1.2);
      -webkit-backdrop-filter: blur(24px) saturate(1.2);
    }
    .brand-logo { width: clamp(142px, 13vw, 180px); height: auto; display: block; }
    .lang-btn {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
    }
    .lang-btn::before {
      content: ""; position: absolute; inset: 0;
      background: rgba(255, 255, 255, 0.06); opacity: 0;
      transition: opacity 0.25s ease;
    }
    .lang-btn:hover { border-color: rgba(255, 255, 255, 0.18); transform: translateY(-1px); }
    .lang-btn:hover::before { opacity: 1; }
    .lang-btn.is-disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }
    .lang-btn.is-disabled:hover {
      border-color: rgba(255, 255, 255, 0.08);
      transform: none;
    }
    .lang-btn.is-disabled:hover::before { opacity: 0; }
    .gradient-btn {
      background: linear-gradient(135deg, #FF4D8C 0%, #B066FF 100%);
      position: relative; overflow: hidden;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .gradient-btn::before {
      content: ""; position: absolute; inset: 0;
      background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
      opacity: 0; transition: opacity 0.3s ease;
    }
    .gradient-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 20px 40px rgba(255, 77, 140, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    .gradient-btn:hover::before { opacity: 1; }
    .gradient-btn:active { transform: translateY(0); transition-duration: 0.1s; }
    .page-shell { width: min(calc(100% - 48px), 800px); margin: 0 auto; }
    .post-header {
      padding-top: 48px; padding-bottom: 32px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    .post-title {
      font-size: clamp(32px, 4.5vw, 52px); line-height: 1.1;
      letter-spacing: -0.03em; font-weight: 800;
      background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.85) 100%);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .post-meta {
      margin-top: 20px; display: flex; align-items: center; gap: 12px;
      font-size: 14px; color: rgba(255, 255, 255, 0.45); font-weight: 500;
    }
    .post-meta-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
    .category-badge {
      display: inline-flex; align-items: center; padding: 4px 12px;
      border-radius: 6px; font-size: 12px; font-weight: 600;
      letter-spacing: 0.03em; text-transform: uppercase;
    }
    .category-badge-guide { background: rgba(0, 196, 221, 0.12); color: #00c8dd; }
    .post-featured-image {
      width: 100%; aspect-ratio: 16/9; border-radius: 20px; margin: 32px 0;
      background: linear-gradient(135deg, #1a2744, #5a3fd4 48%, #00a8c4);
      position: relative; overflow: hidden;
    }
    .post-featured-image.has-featured-image {
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
    }
    .post-featured-image::before {
      content: ""; position: absolute; inset: 0;
      background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15), transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.08), transparent 35%);
      mix-blend-mode: overlay;
    }
    .post-content {
      font-size: 17px; line-height: 1.8; color: rgba(255, 255, 255, 0.75);
    }
    .post-content h2 {
      font-size: 28px; font-weight: 700; color: rgba(255, 255, 255, 0.95);
      margin-top: 48px; margin-bottom: 20px; letter-spacing: -0.02em;
    }
    .post-content h3 {
      font-size: 22px; font-weight: 700; color: rgba(255, 255, 255, 0.9);
      margin-top: 36px; margin-bottom: 16px; letter-spacing: -0.01em;
    }
    .post-content p { margin-bottom: 20px; }
    .post-content ul, .post-content ol {
      margin-bottom: 24px; padding-left: 24px;
    }
    .post-content li { margin-bottom: 10px; }
    .post-content a {
      color: #ff4d8c; text-decoration: none; font-weight: 500;
      border-bottom: 1px solid rgba(255, 77, 140, 0.3);
      transition: border-color 0.25s ease;
    }
    .post-content a:hover { border-color: #ff4d8c; }
    .post-content blockquote {
      margin: 32px 0; padding: 24px 28px;
      border-left: 3px solid #ff4d8c;
      background: rgba(255, 255, 255, 0.03);
      border-radius: 0 12px 12px 0;
      font-style: italic; color: rgba(255, 255, 255, 0.65);
    }
    .post-content img {
      width: 100%; border-radius: 16px; margin: 32px 0;
    }
    .post-content code {
      background: rgba(255, 255, 255, 0.08); padding: 2px 8px;
      border-radius: 6px; font-size: 15px; font-family: "SF Mono", monospace;
      color: #b066ff;
    }
    .post-content pre {
      background: rgba(255, 255, 255, 0.04); padding: 24px;
      border-radius: 16px; overflow-x: auto; margin: 24px 0;
      border: 1px solid rgba(255, 255, 255, 0.06);
    }
    .post-content pre code { background: none; padding: 0; }
    .post-tags {
      margin-top: 48px; padding-top: 32px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      display: flex; flex-wrap: wrap; gap: 8px;
    }
    .post-tag {
      padding: 6px 14px; border-radius: 8px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      font-size: 13px; color: rgba(255, 255, 255, 0.55);
      transition: all 0.25s ease;
    }
    .post-tag:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.15);
      color: rgba(255, 255, 255, 0.85);
    }
    .post-nav {
      margin-top: 48px; padding-top: 32px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
    }
    .post-nav-item {
      padding: 20px; border-radius: 16px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.06);
      transition: all 0.3s ease;
    }
    .post-nav-item:hover {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.1);
    }
    .post-nav-item-empty { visibility: hidden; min-height: 0; padding: 0; border: none; background: none; }
.post-nav-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.4); margin-bottom: 8px;
}
.post-nav-title {
  font-size: 16px; font-weight: 700; color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}
/* Clean up wpautop paragraph artefacts inside post-nav */
.post-nav > p,
.post-nav-item > p,
.post-nav br { display: none !important; margin: 0 !important; padding: 0 !important; height: 0 !important; }
    .footer-link {
      color: rgba(255, 255, 255, 0.4); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      font-size: 14px; font-weight: 500; position: relative; padding: 4px 0;
    }
    .footer-link::after {
      content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 1px;
      background: linear-gradient(90deg, #ff4d8c, #b066ff);
      transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .footer-link:hover { color: rgba(255, 255, 255, 0.85); }
    .footer-link:hover::after { width: 100%; }
    @media (max-width: 680px) {
      .page-shell { width: calc(100% - 32px); }
      .post-nav { grid-template-columns: 1fr; }
    }
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }
    ::selection { background: rgba(255, 77, 140, 0.3); color: #fff; }
