/* ============================================================
 * BI4IVE Custom CSS
 * Multi-mode: data-theme="dark" (default) / data-theme="light"
 * ============================================================ */

/* ----------------------------------------------------------
 * 0. Semantic Variables — Dark (default)
 * ---------------------------------------------------------- */
:root,
[data-theme="dark"] {
  --bi4ive-body-bg:       #0f172a;
  --bi4ive-card-bg:       #1e293b;
  --bi4ive-card-bg-hover: #253349;
  --bi4ive-border-color:  #334155;
  --bi4ive-text-primary:  #e2e8f0;
  --bi4ive-text-secondary:#94a3b8;
  --bi4ive-text-muted:    #64748b;
  --bi4ive-accent:        var(--bi4ive-theme-color, #06b6d4);
  --bi4ive-accent-blue:   #3b82f6;
  --bi4ive-accent-purple: #8b5cf6;
  --bi4ive-success:       #10b981;
  --bi4ive-warning:       #f59e0b;
  --bi4ive-error:         #ef4444;
  --bi4ive-radius:        12px;
  --bi4ive-radius-sm:     calc(var(--bi4ive-radius) * 0.67);
  --bi4ive-shadow:        0 1px 3px rgba(0, 0, 0, 0.3);
  --bi4ive-shadow-hover:  0 12px 32px rgba(0, 0, 0, 0.4);
  --bi4ive-shadow-accent: 0 8px 30px var(--bi4ive-accent-opacity-1);
  --bi4ive-transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --bi4ive-bg-image:      none;
  --bi4ive-bg-repeat:     no-repeat;
  --bi4ive-bg-size:       cover;
  --bi4ive-bg-position:   center top;
  --bi4ive-bg-attachment: fixed;
}

/* ----------------------------------------------------------
 * 1. Light Mode Overrides
 * ---------------------------------------------------------- */
[data-theme="light"] {
  --bi4ive-body-bg:       #f8fafc;
  --bi4ive-card-bg:       #ffffff;
  --bi4ive-card-bg-hover: #f1f5f9;
  --bi4ive-border-color:  #e2e8f0;
  --bi4ive-text-primary:  #1e293b;
  --bi4ive-text-secondary:#475569;
  --bi4ive-text-muted:    #94a3b8;
  --bi4ive-accent:        var(--bi4ive-theme-color, #06b6d4);
  --bi4ive-shadow:        0 1px 3px rgba(0, 0, 0, 0.06);
  --bi4ive-shadow-hover:  0 8px 24px rgba(0, 0, 0, 0.1);
  --bi4ive-shadow-accent: 0 4px 16px rgba(6, 182, 212, 0.1);
}

/* ----------------------------------------------------------
 * 2. Body with Background Image
 * ---------------------------------------------------------- */
body {
  background-color: var(--bi4ive-body-bg);
  color: var(--bi4ive-text-primary);
  background-image: var(--bi4ive-bg-image);
  background-repeat: var(--bi4ive-bg-repeat);
  background-size: var(--bi4ive-bg-size);
  background-position: var(--bi4ive-bg-position);
  background-attachment: var(--bi4ive-bg-attachment);
}

/* ----------------------------------------------------------
 * 3. Skeleton Loading (shimmer)
 * ---------------------------------------------------------- */
@keyframes bi4ive-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.bi4ive-skeleton {
  background: linear-gradient(90deg, var(--bi4ive-card-bg) 25%, var(--bi4ive-card-bg-hover) 50%, var(--bi4ive-card-bg) 75%);
  background-size: 200% 100%;
  animation: bi4ive-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--bi4ive-radius);
  overflow: hidden;
}

/* ----------------------------------------------------------
 * 4. Card Design (shadow-based, Zibll style)
 * ---------------------------------------------------------- */
.bi4ive-card,
.wp-block-post {
  background: var(--bi4ive-card-bg);
  border-radius: var(--bi4ive-radius);
  box-shadow: var(--bi4ive-shadow);
  transition: transform var(--bi4ive-transition),
              box-shadow var(--bi4ive-transition),
              border-color var(--bi4ive-transition);
  border: 1px solid transparent;
}
.bi4ive-card:hover,
.wp-block-post:hover {
  transform: translateY(-3px);
  box-shadow: var(--bi4ive-shadow-hover);
  border-color: rgba(6, 182, 212, 0.15);
}

/* ----------------------------------------------------------
 * 5. Scroll-Reveal Animations
 * ---------------------------------------------------------- */
.bi4ive-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.bi4ive-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.bi4ive-reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.bi4ive-reveal-stagger > *:nth-child(2) { transition-delay: 0.10s; }
.bi4ive-reveal-stagger > *:nth-child(3) { transition-delay: 0.15s; }
.bi4ive-reveal-stagger > *:nth-child(4) { transition-delay: 0.20s; }
.bi4ive-reveal-stagger > *:nth-child(5) { transition-delay: 0.25s; }

/* ----------------------------------------------------------
 * 6. Accent Gradient Text
 * ---------------------------------------------------------- */
.bi4ive-gradient-text {
  background: linear-gradient(135deg, var(--bi4ive-accent) 0%, var(--bi4ive-accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----------------------------------------------------------
 * 7. TOC Sidebar
 * ---------------------------------------------------------- */
.bi4ive-toc {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.bi4ive-toc a {
  display: block;
  padding: 6px 12px;
  color: var(--bi4ive-text-secondary);
  border-left: 2px solid transparent;
  font-size: 0.875rem;
  transition: all 0.2s;
  text-decoration: none;
  border-radius: 0 6px 6px 0;
}
.bi4ive-toc a:hover,
.bi4ive-toc a.active {
  color: var(--bi4ive-accent);
  border-left-color: var(--bi4ive-accent);
  background: rgba(6, 182, 212, 0.08);
}
.bi4ive-toc a.toc-h3 { padding-left: 28px; font-size: 0.8rem; }
.bi4ive-toc a.toc-h4 { padding-left: 44px; font-size: 0.75rem; }

/* ----------------------------------------------------------
 * 8. Lightbox
 * ---------------------------------------------------------- */
.bi4ive-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.bi4ive-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
.bi4ive-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--bi4ive-radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.bi4ive-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s, transform 0.3s;
  z-index: 10;
}
.bi4ive-lightbox-close:hover {
  color: var(--bi4ive-accent);
  transform: rotate(90deg);
}

/* ----------------------------------------------------------
 * 9. Hero Section
 * ---------------------------------------------------------- */
.bi4ive-hero {
  margin-bottom: 3rem;
}
.bi4ive-hero-query ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 360px;
  gap: 4px;
}
.bi4ive-hero-query li:first-child  { grid-column: 1; grid-row: 1; }
.bi4ive-hero-query li:nth-child(2) { grid-column: 2; grid-row: 1; }
.bi4ive-hero-query li:nth-child(3) { grid-column: 3; grid-row: 1; }
.bi4ive-hero-slide {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  height: 100%;
}
.bi4ive-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.4s ease;
}
.bi4ive-hero-slide:hover img {
  transform: scale(1.03);
}
.bi4ive-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.96));
}
.bi4ive-hero-overlay h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  line-height: 1.3;
}
.bi4ive-hero-overlay h2 a {
  color: var(--bi4ive-text-primary) !important;
  text-decoration: none;
}
.bi4ive-hero-overlay time {
  font-size: 0.8rem;
  color: var(--bi4ive-text-muted);
}

/* ----------------------------------------------------------
 * 10. Hero Responsive
 * ---------------------------------------------------------- */
@media (max-width: 768px) {
  .bi4ive-hero-query ul {
    grid-template-columns: 1fr;
    grid-template-rows: 240px auto auto;
  }
  .bi4ive-hero-query li:nth-child(2),
  .bi4ive-hero-query li:nth-child(3) {
    grid-column: 1;
    grid-row: auto;
  }
  .bi4ive-hero-slide { height: 200px; }
  .bi4ive-hero-overlay h2 { font-size: 1rem; }
}

/* ----------------------------------------------------------
 * 11. Like Button
 * ---------------------------------------------------------- */
.bi4ive-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  background: var(--bi4ive-card-bg);
  border: 1px solid var(--bi4ive-border-color);
  border-radius: 50px;
  color: var(--bi4ive-text-secondary);
  cursor: pointer;
  transition: all var(--bi4ive-transition);
  font-size: 0.875rem;
  font-weight: 500;
}
.bi4ive-like-btn:hover {
  border-color: var(--bi4ive-error);
  color: var(--bi4ive-error);
  box-shadow: var(--bi4ive-shadow);
}
.bi4ive-like-btn.liked {
  border-color: var(--bi4ive-error);
  color: var(--bi4ive-error);
  background: rgba(239, 68, 68, 0.1);
}

/* ----------------------------------------------------------
 * 12. Search Highlight
 * ---------------------------------------------------------- */
mark.bi4ive-search-highlight {
  background: rgba(6, 182, 212, 0.25);
  color: var(--bi4ive-accent);
  padding: 1px 4px;
  border-radius: 3px;
}

/* ----------------------------------------------------------
 * 13. Post Meta Row
 * ---------------------------------------------------------- */
.bi4ive-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.825rem;
  color: var(--bi4ive-text-muted);
  align-items: center;
}
.bi4ive-post-meta a { color: var(--bi4ive-text-secondary); }
.bi4ive-post-meta .meta-sep { color: var(--bi4ive-border-color); }

/* ----------------------------------------------------------
 * 14. Scrollbar
 * ---------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bi4ive-body-bg); }
::-webkit-scrollbar-thumb {
  background: var(--bi4ive-border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--bi4ive-text-muted); }

/* ----------------------------------------------------------
 * 15. Inline Code
 * ---------------------------------------------------------- */
:not(pre) > code {
  background: rgba(59, 130, 246, 0.12);
  color: var(--bi4ive-accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: var(--wp--preset--font-family--mono, 'JetBrains Mono', monospace);
}

/* ----------------------------------------------------------
 * 16. Blockquote
 * ---------------------------------------------------------- */
.wp-block-quote {
  background: var(--bi4ive-card-bg);
  border-radius: 0 var(--bi4ive-radius) var(--bi4ive-radius) 0;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--bi4ive-shadow);
}

/* ----------------------------------------------------------
 * 17. Table
 * ---------------------------------------------------------- */
.wp-block-table table {
  border-collapse: collapse;
  width: 100%;
  border-radius: var(--bi4ive-radius);
  overflow: hidden;
}
.wp-block-table th {
  background: var(--bi4ive-card-bg);
  color: var(--bi4ive-accent);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
}
.wp-block-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--bi4ive-border-color);
}
.wp-block-table tr:last-child td { border-bottom: none; }

/* ----------------------------------------------------------
 * 18. Focus Ring
 * ---------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--bi4ive-accent);
  outline-offset: 2px;
  outline-color: var(--bi4ive-focus-shadow);
}

/* ----------------------------------------------------------
 * 19. Smooth Scroll
 * ---------------------------------------------------------- */
html { scroll-behavior: smooth; }

/* ----------------------------------------------------------
 * 20. Theme Toggle Button
 * ---------------------------------------------------------- */
.bi4ive-dark-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--bi4ive-border-color);
  background: var(--bi4ive-card-bg);
  color: var(--bi4ive-text-secondary);
  cursor: pointer;
  transition: all var(--bi4ive-transition);
  font-size: 1rem;
}
.bi4ive-dark-toggle:hover {
  border-color: var(--bi4ive-accent);
  color: var(--bi4ive-accent);
}

/* ----------------------------------------------------------
 * 21. Responsive
 * ---------------------------------------------------------- */
@media (max-width: 768px) {
  .bi4ive-toc { display: none; }
}

/* ----------------------------------------------------------
 * 22. Breadcrumbs
 * ---------------------------------------------------------- */
.bi4ive-breadcrumbs {
  padding: 0.5rem 0 1rem;
  font-size: 0.85rem;
  color: var(--bi4ive-text-muted);
}
.bi4ive-breadcrumbs a {
  color: var(--bi4ive-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.bi4ive-breadcrumbs a:hover { color: var(--bi4ive-accent); }
.bi4ive-breadcrumbs .sep { margin: 0 6px; color: var(--bi4ive-border-color); }
.bi4ive-breadcrumbs .current { color: var(--bi4ive-accent); }

/* ----------------------------------------------------------
 * 23. Post Navigation (prev/next)
 * ---------------------------------------------------------- */
.bi4ive-post-nav {
  margin: 2.5rem 0 1.5rem;
}
.bi4ive-post-nav-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.bi4ive-post-nav-prev,
.bi4ive-post-nav-next {
  display: block;
  background: var(--bi4ive-card-bg);
  border-radius: var(--bi4ive-radius);
  padding: 1.25rem;
  box-shadow: var(--bi4ive-shadow);
  text-decoration: none;
  transition: all var(--bi4ive-transition);
  border: 1px solid transparent;
}
.bi4ive-post-nav-prev:hover,
.bi4ive-post-nav-next:hover {
  border-color: rgba(6, 182, 212, 0.2);
  box-shadow: var(--bi4ive-shadow-hover);
  transform: translateY(-2px);
}
.bi4ive-post-nav-prev.empty,
.bi4ive-post-nav-next.empty {
  display: none;
}
.bi4ive-post-nav-prev .label,
.bi4ive-post-nav-next .label {
  display: block;
  font-size: 0.75rem;
  color: var(--bi4ive-text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bi4ive-post-nav-prev .title,
.bi4ive-post-nav-next .title {
  display: block;
  font-size: 0.95rem;
  color: var(--bi4ive-text-primary);
  font-weight: 500;
  line-height: 1.4;
}
.bi4ive-post-nav-next { text-align: right; }

@media (max-width: 600px) {
  .bi4ive-post-nav-inner {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------
 * 24. Related Posts
 * ---------------------------------------------------------- */
.bi4ive-related {
  margin: 2rem 0;
}
.bi4ive-related-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--bi4ive-text-primary);
  position: relative;
  padding-left: 1rem;
}
.bi4ive-related-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1em;
  background: var(--bi4ive-accent);
  border-radius: 2px;
}
.bi4ive-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.bi4ive-related-item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
}
.bi4ive-related-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.bi4ive-related-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.bi4ive-related-item:hover .bi4ive-related-img { transform: scale(1.04); }
.bi4ive-related-body {
  padding: 0.75rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.bi4ive-related-body h4 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--bi4ive-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bi4ive-related-body time {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--bi4ive-text-muted);
}

/* ----------------------------------------------------------
 * 25. Enhanced Card List (Zibll-style scale)
 * ---------------------------------------------------------- */
:root {
  --bi4ive-posts-card-scale: 60%;
  --bi4ive-layout-width: 1200px;
}
.wp-block-post-template,
.bi4ive-posts-grid {
  --card-scale: var(--bi4ive-posts-card-scale, 60%);
}

.bi4ive-post-card {
  display: flex;
  flex-direction: column;
  background: var(--bi4ive-card-bg);
  border-radius: var(--bi4ive-radius);
  box-shadow: var(--bi4ive-shadow);
  overflow: hidden;
  transition: all var(--bi4ive-transition);
  border: 1px solid transparent;
}
.bi4ive-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--bi4ive-shadow-hover);
  border-color: rgba(6, 182, 212, 0.15);
}
.bi4ive-post-card .card-thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.bi4ive-post-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.bi4ive-post-card:hover .card-thumb img {
  transform: scale(1.04);
}
.bi4ive-post-card .card-body {
  padding: 1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.bi4ive-post-card .card-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.4;
}
.bi4ive-post-card .card-body .meta {
  font-size: 0.8rem;
  color: var(--bi4ive-text-muted);
  margin-top: auto;
}

/* ----------------------------------------------------------
 * 26. Toast Notification
 * ---------------------------------------------------------- */
.bi4ive-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bi4ive-card-bg);
  color: var(--bi4ive-text-primary);
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: var(--bi4ive-shadow-hover);
  font-size: 0.9rem;
  z-index: 10000;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  border: 1px solid var(--bi4ive-border-color);
}
.bi4ive-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.bi4ive-toast.success { border-color: var(--bi4ive-success); }
.bi4ive-toast.error   { border-color: var(--bi4ive-error); }

/* ----------------------------------------------------------
 * 27. Layout Max Width
 * ---------------------------------------------------------- */
.wp-site-blocks > * {
  max-width: var(--bi4ive-layout-width, 1200px);
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------------------------------------------
 * 28. Time-Ago Display
 * ---------------------------------------------------------- */
.bi4ive-time-ago {
  color: var(--bi4ive-text-muted);
  font-size: 0.825rem;
}

/* ----------------------------------------------------------
 * 29. Comment Form Enhancements
 * ---------------------------------------------------------- */
.bi4ive-comment-form-wrap {
  background: var(--bi4ive-card-bg);
  border-radius: var(--bi4ive-radius);
  padding: 1.5rem;
  box-shadow: var(--bi4ive-shadow);
  margin-bottom: 2rem;
}
.bi4ive-comment-form-wrap .comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bi4ive-comment-form-wrap textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 16px;
  background: var(--bi4ive-body-bg);
  border: 1px solid var(--bi4ive-border-color);
  border-radius: calc(var(--bi4ive-radius) * 0.67);
  color: var(--bi4ive-text-primary);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s;
  font-family: inherit;
}
.bi4ive-comment-form-wrap textarea:focus {
  border-color: var(--bi4ive-accent);
  box-shadow: 0 0 0 3px var(--bi4ive-focus-shadow);
}
.bi4ive-comment-form-wrap input[type="text"],
.bi4ive-comment-form-wrap input[type="email"],
.bi4ive-comment-form-wrap input[type="url"] {
  padding: 10px 14px;
  background: var(--bi4ive-body-bg);
  border: 1px solid var(--bi4ive-border-color);
  border-radius: calc(var(--bi4ive-radius) * 0.67);
  color: var(--bi4ive-text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  font-family: inherit;
}
.bi4ive-comment-form-wrap input:focus {
  border-color: var(--bi4ive-accent);
  box-shadow: 0 0 0 3px var(--bi4ive-focus-shadow);
}
.bi4ive-comment-form-wrap .submit {
  padding: 10px 28px;
  background: var(--bi4ive-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  font-weight: 500;
  align-self: flex-start;
}
.bi4ive-comment-form-wrap .submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.bi4ive-comment-form-wrap .submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ----------------------------------------------------------
 * 30. Comment List
 * ---------------------------------------------------------- */
.bi4ive-comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bi4ive-comment-list > li {
  margin-bottom: 1rem;
}
.bi4ive-comment-list .comment-body {
  background: var(--bi4ive-card-bg);
  border-radius: var(--bi4ive-radius);
  padding: 1.25rem;
  box-shadow: var(--bi4ive-shadow);
  transition: box-shadow var(--bi4ive-transition);
}
.bi4ive-comment-list .comment-body:hover {
  box-shadow: var(--bi4ive-shadow-hover);
}
.bi4ive-comment-list .comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
}
.bi4ive-comment-list .comment-author img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
}
.bi4ive-comment-list .comment-author .fn {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bi4ive-text-primary);
}
.bi4ive-comment-list .comment-metadata {
  font-size: 0.8rem;
  color: var(--bi4ive-text-muted);
}
.bi4ive-comment-list .comment-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--bi4ive-text-secondary);
}

/* ----------------------------------------------------------
 * 31. Index Layout — Two-Column System
 * ---------------------------------------------------------- */
.bi4ive-index-layout {
  gap: 2rem;
}

/* ----------------------------------------------------------
 * 32. Post Card List — Horizontal Card (Zibll-inspired)
 * ---------------------------------------------------------- */
.bi4ive-post-card-list .wp-block-post-template {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Individual card wrapper */
.bi4ive-post-card-list .bi4ive-post-card {
  background: var(--bi4ive-card-bg);
  border-radius: var(--bi4ive-radius);
  box-shadow: var(--bi4ive-shadow);
  overflow: hidden;
  transition: transform var(--bi4ive-transition),
              box-shadow var(--bi4ive-transition),
              border-color var(--bi4ive-transition);
  border: 1px solid transparent;
}

.bi4ive-post-card-list .bi4ive-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--bi4ive-shadow-hover);
  border-color: rgba(6, 182, 212, 0.2);
}

/* Card inner: horizontal columns */
.bi4ive-post-card-inner {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
}

/* Thumbnail column */
.bi4ive-post-card-thumb {
  position: relative;
  overflow: hidden;
  min-height: 180px;
}

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

.bi4ive-post-card:hover .bi4ive-post-card-thumb img {
  transform: scale(1.06);
}

.bi4ive-post-card-thumb .wp-block-post-featured-image {
  height: 100%;
  margin: 0;
}

.bi4ive-post-card-thumb .wp-block-post-featured-image a,
.bi4ive-post-card-thumb .wp-block-post-featured-image img {
  display: block;
  height: 100%;
}

/* Body column */
.bi4ive-post-card-body {
  padding: 1.25rem 1.5rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bi4ive-post-card-body .wp-block-post-title {
  margin-bottom: 0.5rem;
}

.bi4ive-post-card-body .wp-block-post-title a {
  color: var(--bi4ive-text-primary);
  text-decoration: none;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bi4ive-post-card-body .wp-block-post-title a:hover {
  color: var(--bi4ive-accent);
}

.bi4ive-post-card-body .wp-block-post-excerpt {
  color: var(--bi4ive-text-secondary);
  margin-bottom: 0.75rem;
}

.bi4ive-post-card-body .wp-block-post-excerpt__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row: category tags + date */
.bi4ive-post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  margin-top: auto;
}

/* Category tag pills (Zibll but/capsule style) */
.bi4ive-cat-tag {
  font-size: 0.75rem;
}

.bi4ive-cat-tag a {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--bi4ive-accent);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.bi4ive-cat-tag a:hover {
  background: var(--bi4ive-accent);
  color: #fff;
  border-color: var(--bi4ive-accent);
}

/* Date */
.bi4ive-post-card-meta .wp-block-post-date {
  color: var(--bi4ive-text-muted);
}

.bi4ive-post-card-meta .wp-block-post-date time {
  color: var(--bi4ive-text-muted);
}

/* ----------------------------------------------------------
 * 33. Pagination — Zibll-inspired
 * ---------------------------------------------------------- */
.bi4ive-pagination {
  margin-top: 2rem;
}

.bi4ive-pagination .wp-block-query-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.bi4ive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--bi4ive-card-bg);
  color: var(--bi4ive-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.bi4ive-pagination .page-numbers:hover {
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--bi4ive-accent);
}

.bi4ive-pagination .page-numbers.current {
  background: var(--bi4ive-accent);
  color: #fff;
  border-color: var(--bi4ive-accent);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.bi4ive-pagination .page-numbers.dots {
  background: transparent;
  border: none;
  color: var(--bi4ive-text-muted);
}

.bi4ive-pagination .page-numbers.dots:hover {
  color: var(--bi4ive-text-muted);
  border-color: transparent;
}

.bi4ive-pagination .wp-block-query-pagination-previous,
.bi4ive-pagination .wp-block-query-pagination-next {
  margin: 0;
}

/* ----------------------------------------------------------
 * 34. Index Sidebar
 * ---------------------------------------------------------- */
.bi4ive-index-sidebar {
  position: sticky;
  top: 24px;
  align-self: flex-start;
}

/* ----------------------------------------------------------
 * 35. Index Responsive — Mobile (<768px)
 * ---------------------------------------------------------- */
@media (max-width: 768px) {
  .bi4ive-index-layout {
    flex-direction: column !important;
  }

  .bi4ive-index-layout > .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  /* Sidebar collapses below */
  .bi4ive-index-sidebar {
    position: static;
  }

  /* Cards become vertical (stacked) */
  .bi4ive-post-card-inner {
    flex-direction: column !important;
  }

  .bi4ive-post-card-thumb {
    flex-basis: auto !important;
    width: 100% !important;
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .bi4ive-post-card-body {
    flex-basis: auto !important;
    width: 100% !important;
    padding: 1rem 1.25rem 1.25rem;
  }
}

/* ----------------------------------------------------------
 * 36. Mobile Fixed Comment Button
 * ---------------------------------------------------------- */
.bi4ive-comment-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bi4ive-accent);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
  cursor: pointer;
  z-index: 999;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.bi4ive-comment-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.5);
}
.bi4ive-comment-fab svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

@media (max-width: 768px) {
  .bi4ive-comment-fab { display: flex; }
}

/* ============================================================
 * 37. Floating Action Buttons
 * ============================================================ */
.bi4ive-fab-container {
  position: fixed;
  bottom: 32px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}
.bi4ive-fab-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bi4ive-card-bg);
  border: 1px solid var(--bi4ive-border-color);
  color: var(--bi4ive-text-secondary);
  cursor: pointer;
  box-shadow: var(--bi4ive-shadow);
  transition: all var(--bi4ive-transition);
  text-decoration: none;
}
.bi4ive-fab-btn:hover {
  border-color: var(--bi4ive-accent);
  color: var(--bi4ive-accent);
  box-shadow: var(--bi4ive-shadow-hover);
  transform: translateY(-2px);
}
.bi4ive-fab-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.bi4ive-fab-btn.scroll-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

/* ----------------------------------------------------------
 * 38. Reading Progress Bar
 * ---------------------------------------------------------- */
.bi4ive-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 10001;
}
.bi4ive-reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--bi4ive-accent), var(--bi4ive-accent-blue));
  width: 0%;
  transition: width 0.1s linear;
}

/* ----------------------------------------------------------
 * 39. Single Post Meta Row
 * ---------------------------------------------------------- */
.bi4ive-single-meta {
  color: var(--bi4ive-text-muted);
  font-size: 0.9rem;
  align-items: center;
}
.bi4ive-meta-sep {
  color: var(--bi4ive-border-color);
  user-select: none;
}
.bi4ive-meta-reading-time,
.bi4ive-meta-word-count {
  color: var(--bi4ive-text-muted);
  font-size: 0.85rem;
}

/* ----------------------------------------------------------
 * 40. Single Category Tags
 * ---------------------------------------------------------- */
.bi4ive-single-cats {
  margin-bottom: 0.25rem;
}
.bi4ive-single-cats a {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--bi4ive-accent);
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 6px;
  transition: all 0.2s;
  border: 1px solid rgba(6, 182, 212, 0.18);
}
.bi4ive-single-cats a:hover {
  background: var(--bi4ive-accent);
  color: #fff;
}

/* ----------------------------------------------------------
 * 41. Entry Content Typography (Zibll-style)
 * ---------------------------------------------------------- */
.bi4ive-entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
}
.bi4ive-entry-content h2 {
  font-size: 1.6rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bi4ive-border-color);
}
.bi4ive-entry-content h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.bi4ive-entry-content p {
  margin-bottom: 1.25rem;
}
.bi4ive-entry-content a {
  color: var(--bi4ive-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.bi4ive-entry-content a:hover {
  color: var(--bi4ive-accent-blue);
}
.bi4ive-entry-content img {
  border-radius: var(--bi4ive-radius);
  margin: 1.5rem 0;
}
.bi4ive-entry-content ul,
.bi4ive-entry-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.bi4ive-entry-content li {
  margin-bottom: 0.5rem;
}
.bi4ive-entry-content hr {
  border: none;
  border-top: 1px solid var(--bi4ive-border-color);
  margin: 2rem 0;
}

/* ----------------------------------------------------------
 * 42. Author Card
 * ---------------------------------------------------------- */
.bi4ive-author-card {
  margin-top: 2rem;
}
.bi4ive-author-card-inner {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: var(--bi4ive-card-bg);
  border-radius: var(--bi4ive-radius);
  padding: 1.5rem;
  box-shadow: var(--bi4ive-shadow);
  border: 1px solid var(--bi4ive-border-color);
}
.bi4ive-author-avatar-link img {
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.bi4ive-author-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--bi4ive-text-primary);
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}
.bi4ive-author-name:hover { color: var(--bi4ive-accent); }
.bi4ive-author-bio {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: var(--bi4ive-text-secondary);
  line-height: 1.5;
}
.bi4ive-author-stats {
  font-size: 0.8rem;
  color: var(--bi4ive-text-muted);
}

/* ----------------------------------------------------------
 * 43. Share Buttons
 * ---------------------------------------------------------- */
.bi4ive-share-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bi4ive-share-label {
  font-size: 0.85rem;
  color: var(--bi4ive-text-muted);
  margin-right: 4px;
}
.bi4ive-share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bi4ive-body-bg);
  border: 1px solid var(--bi4ive-border-color);
  color: var(--bi4ive-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.bi4ive-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--bi4ive-shadow);
}
.bi4ive-share-twitter:hover  { background: #000; color: #fff; border-color: #000; }
.bi4ive-share-facebook:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.bi4ive-share-telegram:hover { background: #26a5e4; color: #fff; border-color: #26a5e4; }
.bi4ive-share-whatsapp:hover { background: #25d366; color: #fff; border-color: #25d366; }
.bi4ive-share-copy:hover     { background: var(--bi4ive-accent); color: #fff; border-color: var(--bi4ive-accent); }

/* ----------------------------------------------------------
 * 44. Archive Header
 * ---------------------------------------------------------- */
.bi4ive-archive-header {
  margin-bottom: 1.5rem;
}
.bi4ive-archive-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--bi4ive-text-primary);
}
.bi4ive-archive-desc {
  color: var(--bi4ive-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* ----------------------------------------------------------
 * 45. Footer Widgets
 * ---------------------------------------------------------- */
.bi4ive-footer {
  margin-top: 3rem;
}
.bi4ive-footer-widgets .wp-block-heading {
  color: var(--bi4ive-text-primary);
}
.bi4ive-footer-col .wp-block-navigation a {
  color: var(--bi4ive-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.bi4ive-footer-col .wp-block-navigation a:hover {
  color: var(--bi4ive-accent);
}
.bi4ive-footer-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.bi4ive-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bi4ive-body-bg);
  border: 1px solid var(--bi4ive-border-color);
  color: var(--bi4ive-text-secondary);
  transition: all 0.2s;
}
.bi4ive-social-link:hover {
  border-color: var(--bi4ive-accent);
  color: var(--bi4ive-accent);
  transform: translateY(-2px);
  box-shadow: var(--bi4ive-shadow);
}

/* ----------------------------------------------------------
 * 46. Mobile Bottom Navigation
 * ---------------------------------------------------------- */
.bi4ive-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: var(--bi4ive-card-bg);
  border-top: 1px solid var(--bi4ive-border-color);
  padding: 6px 0 env(safe-area-inset-bottom, 0);
  backdrop-filter: blur(12px);
}
.bi4ive-mobile-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}
.bi4ive-mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  color: var(--bi4ive-text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  transition: color 0.2s;
}
.bi4ive-mobile-nav-item.active,
.bi4ive-mobile-nav-item:hover {
  color: var(--bi4ive-accent);
}
.bi4ive-mobile-nav-item svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  .bi4ive-mobile-nav { display: block; }
  body { padding-bottom: 70px; }
  .bi4ive-fab-container { bottom: 80px; }
}

/* ----------------------------------------------------------
 * 47. Grid Layout Mode
 * ---------------------------------------------------------- */
.bi4ive-list-grid .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.bi4ive-list-grid .bi4ive-post-card-inner {
  flex-direction: column !important;
}
.bi4ive-list-grid .bi4ive-post-card-thumb {
  flex-basis: auto !important;
  width: 100% !important;
  aspect-ratio: 3 / 2;
}
.bi4ive-list-grid .bi4ive-post-card-body {
  flex-basis: auto !important;
  width: 100% !important;
  padding: 1rem 1.25rem 1.25rem;
}
.bi4ive-list-grid .bi4ive-post-card-thumb img {
  border-radius: 8px 8px 0 0 !important;
}

/* Layout toggle button */
.bi4ive-layout-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bi4ive-card-bg);
  border: 1px solid var(--bi4ive-border-color);
  border-radius: 8px;
  color: var(--bi4ive-text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.bi4ive-layout-toggle:hover {
  border-color: var(--bi4ive-accent);
  color: var(--bi4ive-accent);
}

@media (max-width: 1024px) {
  .bi4ive-list-grid .wp-block-post-template {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .bi4ive-list-grid .wp-block-post-template {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------
 * 48. Lightbox Mouse Wheel
 * ---------------------------------------------------------- */
.bi4ive-lightbox img {
  cursor: zoom-out;
}

/* ----------------------------------------------------------
 * 49. Single Sidebar Sticky
 * ---------------------------------------------------------- */
.bi4ive-single-sidebar {
  position: sticky;
  top: 24px;
  align-self: flex-start;
}

/* ----------------------------------------------------------
 * 50. List Date Hidden Class
 * ---------------------------------------------------------- */
.bi4ive-hide-date .wp-block-post-date { display: none; }

/* ----------------------------------------------------------
 * 51. Low Performance Mode
 * ---------------------------------------------------------- */
.bi4ive-low-perf .bi4ive-card,
.bi4ive-low-perf .bi4ive-post-card,
.bi4ive-low-perf .bi4ive-reveal {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}
.bi4ive-low-perf .bi4ive-reading-progress-bar {
  transition: none !important;
}

/* ============================================================
 * 52. Hero Redesign — Single Featured Post
 * ============================================================ */
.bi4ive-hero-wrap {
  margin-bottom: 3rem;
}
.bi4ive-hero-main-query .wp-block-post-template {
  display: block;
}
.bi4ive-hero-main {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 1.25rem;
}
.bi4ive-hero-main-img {
  margin: 0 !important;
}
.bi4ive-hero-main-img img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.6s ease;
}
.bi4ive-hero-main:hover .bi4ive-hero-main-img img {
  transform: scale(1.03);
}
.bi4ive-hero-main-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 2.5rem 2.5rem;
  background: linear-gradient(transparent 0%, rgba(15, 23, 42, 0.75) 40%, rgba(15, 23, 42, 0.96) 100%);
  border-radius: 0 0 16px 16px;
}
.bi4ive-hero-cat {
  margin-bottom: 0.75rem;
}
.bi4ive-hero-cat a {
  display: inline-block;
  padding: 4px 14px;
  background: var(--bi4ive-accent);
  color: #fff !important;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bi4ive-hero-main-meta {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}
.bi4ive-hero-main-meta a {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Hero Sub Cards (2 side-by-side below main) */
.bi4ive-hero-sub-query .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.bi4ive-hero-sub-query .wp-block-post-template li {
  margin: 0;
}
.bi4ive-hero-sub-card {
  background: var(--bi4ive-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--bi4ive-shadow);
  transition: all var(--bi4ive-transition);
  border: 1px solid transparent;
}
.bi4ive-hero-sub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--bi4ive-shadow-hover);
  border-color: rgba(6, 182, 212, 0.18);
}
.bi4ive-hero-sub-thumb {
  margin: 0 !important;
}
.bi4ive-hero-sub-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px 12px 0 0 !important;
  transition: transform 0.4s ease;
}
.bi4ive-hero-sub-card:hover .bi4ive-hero-sub-thumb img {
  transform: scale(1.04);
}
.bi4ive-hero-sub-body h3 a {
  color: var(--bi4ive-text-primary);
  text-decoration: none;
}
.bi4ive-hero-sub-body h3 a:hover {
  color: var(--bi4ive-accent);
}

/* Hero Responsive */
@media (max-width: 768px) {
  .bi4ive-hero-main-img img { height: 280px; }
  .bi4ive-hero-main-overlay { padding: 1.5rem; }
  .bi4ive-hero-sub-query .wp-block-post-template {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* ----------------------------------------------------------
 * 53. Category Navigation Strip
 * ---------------------------------------------------------- */
.bi4ive-cat-strip-wrap {
  margin-bottom: 2rem;
  overflow: hidden;
}
.bi4ive-cat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.bi4ive-cat-strip li {
  margin: 0;
}
.bi4ive-cat-strip a {
  display: inline-block;
  padding: 7px 18px;
  background: var(--bi4ive-card-bg);
  border: 1px solid var(--bi4ive-border-color);
  border-radius: 50px;
  color: var(--bi4ive-text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.bi4ive-cat-strip a:hover,
.bi4ive-cat-strip .current-cat a {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--bi4ive-accent);
  color: var(--bi4ive-accent);
}

/* ----------------------------------------------------------
 * 54. Section Header with Title
 * ---------------------------------------------------------- */
.bi4ive-section-header {
  margin-bottom: 1.25rem;
}
.bi4ive-section-title {
  position: relative;
  padding-left: 1rem;
  color: var(--bi4ive-text-primary);
  margin: 0;
}
.bi4ive-section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: linear-gradient(180deg, var(--bi4ive-accent), var(--bi4ive-accent-blue));
  border-radius: 2px;
}

/* ----------------------------------------------------------
 * 55. Post Card Grid — Magazine Style (Zibll Multi-Thumb)
 * ---------------------------------------------------------- */
.bi4ive-list-grid .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.bi4ive-list-grid .bi4ive-post-card {
  background: var(--bi4ive-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--bi4ive-shadow);
  transition: all var(--bi4ive-transition);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}
.bi4ive-list-grid .bi4ive-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.2);
}
.bi4ive-post-card-img {
  margin: 0 !important;
  overflow: hidden;
}
.bi4ive-post-card-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px 12px 0 0 !important;
  transition: transform 0.5s ease;
}
.bi4ive-post-card:hover .bi4ive-post-card-img img {
  transform: scale(1.05);
}
.bi4ive-post-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.bi4ive-post-card-body .wp-block-post-title {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.bi4ive-post-card-body .wp-block-post-title a {
  color: var(--bi4ive-text-primary);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.bi4ive-post-card-body .wp-block-post-title a:hover {
  color: var(--bi4ive-accent);
}
.bi4ive-card-footer-meta {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--bi4ive-text-muted);
}
.bi4ive-meta-dot {
  color: var(--bi4ive-border-color);
}
.bi4ive-card-reading-time {
  color: var(--bi4ive-text-muted);
}

/* List mode override */
.bi4ive-post-card-list:not(.bi4ive-list-grid) .wp-block-post-template {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.25rem;
}
.bi4ive-post-card-list:not(.bi4ive-list-grid) .bi4ive-post-card {
  flex-direction: row;
  display: flex;
}
.bi4ive-post-card-list:not(.bi4ive-list-grid) .bi4ive-post-card-img {
  width: 40%;
  flex-shrink: 0;
  min-height: 180px;
}
.bi4ive-post-card-list:not(.bi4ive-list-grid) .bi4ive-post-card-img img {
  height: 100%;
  border-radius: 12px 0 0 12px !important;
}
.bi4ive-post-card-list:not(.bi4ive-list-grid) .bi4ive-post-card-body {
  padding: 1.25rem 1.5rem;
  justify-content: center;
}
@media (max-width: 768px) {
  .bi4ive-post-card-list:not(.bi4ive-list-grid) .bi4ive-post-card {
    flex-direction: column;
  }
  .bi4ive-post-card-list:not(.bi4ive-list-grid) .bi4ive-post-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  .bi4ive-post-card-list:not(.bi4ive-list-grid) .bi4ive-post-card-img img {
    border-radius: 12px 12px 0 0 !important;
  }
}

/* Category pill on cards */
.bi4ive-cat-tag {
  margin-bottom: 0.25rem;
}
.bi4ive-cat-tag a {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--bi4ive-accent);
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.2s;
}
.bi4ive-cat-tag a:hover {
  background: var(--bi4ive-accent);
  color: #fff;
}

/* Layout toggle button in index */
.bi4ive-layout-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bi4ive-card-bg);
  border: 1px solid var(--bi4ive-border-color);
  border-radius: 8px;
  color: var(--bi4ive-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.bi4ive-layout-toggle:hover {
  border-color: var(--bi4ive-accent);
  color: var(--bi4ive-accent);
}
.bi4ive-layout-toggle .bi4ive-toggle-icon-list { display: none; }
.bi4ive-list-grid ~ .bi4ive-layout-toggle .bi4ive-toggle-icon-grid,
.bi4ive-list-grid + .bi4ive-layout-toggle .bi4ive-toggle-icon-grid { display: none; }
.bi4ive-list-grid ~ .bi4ive-layout-toggle .bi4ive-toggle-icon-list,
.bi4ive-list-grid + .bi4ive-layout-toggle .bi4ive-toggle-icon-list { display: block; }

/* Responsive grid */
@media (max-width: 1024px) {
  .bi4ive-list-grid .wp-block-post-template {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .bi4ive-list-grid .wp-block-post-template {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------
 * 56. Sidebar Widget Titles
 * ---------------------------------------------------------- */
.bi4ive-widget-title {
  position: relative;
  padding-left: 14px;
  margin-top: 0;
  color: var(--bi4ive-text-primary);
}
.bi4ive-widget-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: var(--bi4ive-accent);
  border-radius: 2px;
}
.bi4ive-widget-sep {
  margin: 1.25rem 0 !important;
  opacity: 0.4;
}

/* Sidebar category list */
.bi4ive-sidebar-cats {
  list-style: none;
  padding: 0;
}
.bi4ive-sidebar-cats li {
  margin-bottom: 4px;
}
.bi4ive-sidebar-cats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bi4ive-body-bg);
  border-radius: 8px;
  color: var(--bi4ive-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.bi4ive-sidebar-cats a:hover {
  background: rgba(6, 182, 212, 0.08);
  color: var(--bi4ive-accent);
}
.bi4ive-sidebar-cats .post-count {
  background: var(--bi4ive-card-bg);
  color: var(--bi4ive-text-muted);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
}

/* Sidebar tag cloud */
.bi4ive-sidebar-tags .tag-cloud-link {
  display: inline-block;
  padding: 5px 12px;
  background: var(--bi4ive-body-bg);
  border: 1px solid var(--bi4ive-border-color);
  border-radius: 6px;
  color: var(--bi4ive-text-secondary);
  text-decoration: none;
  font-size: 0.8rem !important;
  margin: 0 6px 8px 0;
  transition: all 0.2s;
}
.bi4ive-sidebar-tags .tag-cloud-link:hover {
  border-color: var(--bi4ive-accent);
  color: var(--bi4ive-accent);
  background: rgba(6, 182, 212, 0.05);
}

/* ----------------------------------------------------------
 * 57. First Post in Grid — Larger (first-child spotlight)
 * ---------------------------------------------------------- */
.bi4ive-list-grid .wp-block-post-template > li:first-child {
  grid-column: 1 / -1;
}
.bi4ive-list-grid .wp-block-post-template > li:first-child .bi4ive-post-card {
  flex-direction: row;
}
.bi4ive-list-grid .wp-block-post-template > li:first-child .bi4ive-post-card-img {
  width: 50%;
  flex-shrink: 0;
}
.bi4ive-list-grid .wp-block-post-template > li:first-child .bi4ive-post-card-img img {
  height: 100%;
  border-radius: 12px 0 0 12px !important;
  min-height: 240px;
}
.bi4ive-list-grid .wp-block-post-template > li:first-child .bi4ive-post-card-body {
  padding: 1.5rem 2rem;
  justify-content: center;
}
.bi4ive-list-grid .wp-block-post-template > li:first-child .wp-block-post-title a {
  font-size: 1.35rem;
}
@media (max-width: 768px) {
  .bi4ive-list-grid .wp-block-post-template > li:first-child .bi4ive-post-card {
    flex-direction: column;
  }
  .bi4ive-list-grid .wp-block-post-template > li:first-child .bi4ive-post-card-img {
    width: 100%;
  }
  .bi4ive-list-grid .wp-block-post-template > li:first-child .bi4ive-post-card-img img {
    border-radius: 12px 12px 0 0 !important;
    height: 200px;
  }
}
