/**
 * Reflect Blog – Frontend Stylesheet
 * File: assets/css/frontend.css
 *
 * Uses CSS custom properties (set dynamically via RB_Assets::dynamic_css)
 * for all brand tokens: colors, fonts, radii, spacing.
 */

/* ─── Reset & Box Sizing ─────────────────────────────────────────────────── */
.rb-listing *,
.rb-listing *::before,
.rb-listing *::after,
.rb-single-wrap *,
.rb-single-wrap *::before,
.rb-single-wrap *::after,
.rb-archive-wrap *,
.rb-archive-wrap *::before,
.rb-archive-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Listing Wrapper ────────────────────────────────────────────────────── */
.rb-listing {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  background: var(--rb-bg, #fff);
}

/* ─── Section Header ─────────────────────────────────────────────────────── */
.rb-listing__header {
  margin-bottom: 40px;
}

.rb-listing__title {
  font-family: var(--rb-section-family, 'Darker Grotesque', sans-serif);
  font-size: var(--rb-section-size, 30px);
  font-weight: var(--rb-section-weight, 800);
  text-transform: var(--rb-section-transform, capitalize);
  color: var(--rb-primary, #8B1A1A);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.rb-listing__title-arrow {
  font-size: 1.3em;
  color: var(--rb-secondary, #C8831A);
}

/* ─── Controls Row ───────────────────────────────────────────────────────── */
.rb-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Search */
.rb-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.rb-search__input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1.5px solid var(--rb-card-border, #eee);
  border-radius: 50px;
  font-family: var(--rb-body-family, 'Montserrat', sans-serif);
  font-size: 14px;
  color: var(--rb-text, #1a1a1a);
  background: var(--rb-card-bg, #fff);
  outline: none;
  transition: border-color 0.2s;
}

.rb-search__input:focus {
  border-color: var(--rb-primary, #8B1A1A);
}

.rb-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rb-text-light, #666);
  pointer-events: none;
  display: flex;
}

/* Sort */
.rb-sort__select {
  padding: 10px 36px 10px 16px;
  border: 1.5px solid var(--rb-card-border, #eee);
  border-radius: 50px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 14px;
  font-weight: var(--rb-meta-weight, 600);
  text-transform: var(--rb-meta-transform, capitalize);
  color: var(--rb-text, #1a1a1a);
  background: var(--rb-card-bg, #fff);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.2s;
}

.rb-sort__select:focus {
  border-color: var(--rb-primary, #8B1A1A);
}

/* ─── Category Filter Tabs ───────────────────────────────────────────────── */
.rb-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.rb-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: 1.5px solid var(--rb-card-border, #eee);
  border-radius: 50px;
  background: transparent;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 14px;
  font-weight: var(--rb-meta-weight, 600);
  text-transform: var(--rb-meta-transform, capitalize);
  color: var(--rb-text-light, #666);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.rb-filter__btn:hover,
.rb-filter__btn--active {
  background: var(--rb-primary, #8B1A1A);
  border-color: var(--rb-primary, #8B1A1A);
  color: #fff;
}

.rb-filter__count {
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 12px;
}

.rb-filter__btn--active .rb-filter__count {
  background: rgba(255,255,255,0.3);
}

/* ─── Grid ───────────────────────────────────────────────────────────────── */
.rb-grid {
  display: grid;
  grid-template-columns: repeat(var(--rb-col-desktop, 3), 1fr);
  gap: var(--rb-gap, 30px);
  align-items: start;
  transition: opacity 0.25s;
}

.rb-grid--loading {
  opacity: 0.4;
  pointer-events: none;
}

/* ─── Card Base ──────────────────────────────────────────────────────────── */
.rb-card {
  background: var(--rb-card-bg, #fff);
  border-radius: var(--rb-radius, 12px);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1.5px solid var(--rb-card-border, #eee);
  display: flex;
  flex-direction: column;
}

.rb-card--default {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.rb-card--default:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.rb-card--minimal {
  box-shadow: none;
  border: 1.5px solid var(--rb-card-border, #eee);
}

.rb-card--minimal:hover {
  border-color: var(--rb-primary, #8B1A1A);
}

.rb-card--overlay {
  position: relative;
  border: none;
}

/* Card Image */
.rb-card__image-wrap {
  display: block;
  overflow: hidden;
  text-decoration: none;
}

.rb-card__image {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
  position: relative;
}

.rb-card:hover .rb-card__image {
  transform: scale(1.04);
}

.rb-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(139,26,26,0.7) 100%);
}

/* Card Body */
.rb-card__body {
  padding: var(--rb-padding, 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* Categories */
.rb-card__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Tags */
.rb-tag {
  display: inline-block;
  background: var(--rb-tag-bg, #f5f0ea);
  color: var(--rb-tag-text, #8B1A1A);
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 50px;
  text-decoration: none;
}

a.rb-tag:hover {
  background: var(--rb-primary, #8B1A1A);
  color: #fff;
}

/* Card Title */
.rb-card__title {
  font-family: var(--rb-card-title-family, 'Montserrat', sans-serif);
  font-size: var(--rb-card-title-size, 20px);
  font-weight: var(--rb-card-title-weight, 700);
  line-height: 1.3;
  margin: 0;
}

.rb-card__title a {
  color: var(--rb-text, #1a1a1a);
  text-decoration: none;
  transition: color 0.2s;
}

.rb-card__title a:hover {
  color: var(--rb-primary, #8B1A1A);
}

/* Excerpt */
.rb-card__excerpt {
  font-family: var(--rb-body-family, 'Montserrat', sans-serif);
  font-size: var(--rb-body-size, 16px);
  font-weight: var(--rb-body-weight, 400);
  line-height: var(--rb-body-lh, 1.7);
  color: var(--rb-text-light, #666);
  margin: 0;
  flex: 1;
}

/* Meta */
.rb-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: var(--rb-meta-size, 14px);
  font-weight: var(--rb-meta-weight, 600);
  text-transform: var(--rb-meta-transform, capitalize);
  color: var(--rb-text-light, #666);
}

.rb-card__author,
.rb-card__date,
.rb-card__read-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rb-card__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* Read More */
.rb-card__readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--rb-primary, #8B1A1A);
  text-decoration: none;
  margin-top: auto;
  transition: gap 0.2s, color 0.2s;
}

.rb-card__readmore:hover {
  color: var(--rb-secondary, #C8831A);
  gap: 10px;
}

/* ─── Loading State ──────────────────────────────────────────────────────── */
.rb-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.6);
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--rb-radius, 12px);
}

.rb-loading.is-active {
  display: flex;
}

.rb-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--rb-card-border, #eee);
  border-top-color: var(--rb-primary, #8B1A1A);
  border-radius: 50%;
  animation: rb-spin 0.6s linear infinite;
}

@keyframes rb-spin {
  to { transform: rotate(360deg); }
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.rb-pagination-wrap {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.rb-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.rb-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--rb-card-border, #eee);
  border-radius: 8px;
  background: var(--rb-card-bg, #fff);
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--rb-text, #1a1a1a);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}

.rb-page-btn:hover:not(:disabled):not(.rb-page-btn--active) {
  border-color: var(--rb-primary, #8B1A1A);
  color: var(--rb-primary, #8B1A1A);
}

.rb-page-btn--active {
  background: var(--rb-primary, #8B1A1A);
  border-color: var(--rb-primary, #8B1A1A);
  color: #fff;
}

.rb-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.rb-page-dots {
  padding: 0 4px;
  color: var(--rb-text-light, #666);
  font-size: 15px;
}

/* ─── No Posts ───────────────────────────────────────────────────────────── */
.rb-no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--rb-text-light, #666);
  font-family: var(--rb-body-family, 'Montserrat', sans-serif);
  font-size: var(--rb-body-size, 16px);
}

/* ─── Button ─────────────────────────────────────────────────────────────── */
.rb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--rb-btn-bg, #8B1A1A);
  color: var(--rb-btn-text, #fff) !important;
  border-radius: 50px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.rb-btn:hover {
  background: var(--rb-btn-hover, #C8831A);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/*  SINGLE POST                                                                */
/* ─────────────────────────────────────────────────────────────────────────── */

.rb-single-wrap {
  font-family: var(--rb-body-family, 'Montserrat', sans-serif);
  color: var(--rb-text, #1a1a1a);
}

/* Hero */
.rb-single__hero {
  position: relative;
  min-height: 420px;
  background: linear-gradient(135deg, var(--rb-accent, #4A0E0E) 0%, var(--rb-primary, #8B1A1A) 50%, var(--rb-secondary, #C8831A) 100%);
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  overflow: hidden;
}

.rb-single__hero--has-image {
  background-size: cover;
  background-position: center;
}

.rb-single__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.65) 100%);
}

.rb-single__hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

/* Breadcrumb */
.rb-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 13px;
  font-weight: 600;
  text-transform: var(--rb-meta-transform, capitalize);
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
}

.rb-breadcrumb a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.rb-breadcrumb a:hover {
  color: #fff;
}

.rb-breadcrumb__sep {
  color: rgba(255,255,255,0.4);
}

.rb-breadcrumb__current {
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* Hero title */
.rb-single__cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rb-single__title {
  font-family: var(--rb-title-family, 'Montserrat', sans-serif);
  font-size: clamp(28px, 5vw, var(--rb-title-size, 48px));
  font-weight: var(--rb-title-weight, 800);
  line-height: var(--rb-title-lh, 1.15);
  letter-spacing: var(--rb-title-ls, 0);
  text-transform: var(--rb-title-transform, none);
  color: #fff;
  margin-bottom: 12px;
}

.rb-single__subtitle {
  font-family: var(--rb-body-family, 'Montserrat', sans-serif);
  font-size: 20px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  margin-bottom: 20px;
}

.rb-single__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}

.rb-single__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.5);
}

.rb-single__sep {
  color: rgba(255,255,255,0.4);
}

/* Content area */
.rb-single__content-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px;
}

.rb-single__content {
  font-family: var(--rb-body-family, 'Montserrat', sans-serif);
  font-size: var(--rb-body-size, 16px);
  font-weight: var(--rb-body-weight, 400);
  line-height: var(--rb-body-lh, 1.8);
  color: var(--rb-text, #1a1a1a);
}

/* Prose styles */
.rb-single__content h1,
.rb-single__content h2,
.rb-single__content h3,
.rb-single__content h4 {
  font-family: var(--rb-title-family, 'Montserrat', sans-serif);
  font-weight: 700;
  color: var(--rb-accent, #4A0E0E);
  margin: 1.6em 0 0.6em;
  line-height: 1.3;
}

.rb-single__content h2 { font-size: 1.6em; }
.rb-single__content h3 { font-size: 1.3em; }
.rb-single__content h4 { font-size: 1.1em; }

.rb-single__content p { margin-bottom: 1.2em; }

.rb-single__content a {
  color: var(--rb-primary, #8B1A1A);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.rb-single__content blockquote {
  border-left: 4px solid var(--rb-primary, #8B1A1A);
  margin: 1.5em 0;
  padding: 12px 24px;
  background: var(--rb-tag-bg, #f5f0ea);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--rb-accent, #4A0E0E);
}

.rb-single__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1em 0;
}

.rb-single__content ul,
.rb-single__content ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.rb-single__content li {
  margin-bottom: 0.4em;
}

/* CTA */
.rb-single__cta {
  margin: 40px 0;
  text-align: center;
}

/* Tags row */
.rb-single__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 40px 0 24px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--rb-text-light, #666);
}

/* Share row */
.rb-single__share {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--rb-text-light, #666);
  border-top: 1px solid var(--rb-card-border, #eee);
  padding-top: 24px;
  margin-top: 24px;
}

.rb-share__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--rb-card-border, #eee);
  color: var(--rb-text-light, #666);
  text-decoration: none;
  transition: all 0.2s;
}

.rb-share__link:hover {
  background: var(--rb-primary, #8B1A1A);
  border-color: var(--rb-primary, #8B1A1A);
  color: #fff;
}

/* Author Box */
.rb-author-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--rb-tag-bg, #f5f0ea);
  border-radius: var(--rb-radius, 12px);
  padding: 28px;
  margin-top: 48px;
  border: 1px solid var(--rb-card-border, #eee);
}

.rb-author-box__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.rb-author-box__name {
  font-family: var(--rb-card-title-family, 'Montserrat', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--rb-accent, #4A0E0E);
  margin-bottom: 8px;
}

.rb-author-box__bio {
  font-family: var(--rb-body-family, 'Montserrat', sans-serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--rb-text-light, #666);
}

/* ─── Related Posts ──────────────────────────────────────────────────────── */
.rb-related {
  background: var(--rb-tag-bg, #f5f0ea);
  padding: 60px 0;
}

.rb-related__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.rb-related__heading {
  font-family: var(--rb-section-family, 'Darker Grotesque', sans-serif);
  font-size: var(--rb-section-size, 30px);
  font-weight: var(--rb-section-weight, 800);
  text-transform: var(--rb-section-transform, capitalize);
  color: var(--rb-primary, #8B1A1A);
  margin-bottom: 32px;
}

/* ─── Archive Page ───────────────────────────────────────────────────────── */
.rb-archive-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.rb-archive__header {
  margin-bottom: 0;
}

.rb-archive__page-title {
  font-family: var(--rb-section-family, 'Darker Grotesque', sans-serif);
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 800;
  color: var(--rb-primary, #8B1A1A);
  text-transform: var(--rb-section-transform, capitalize);
  margin-bottom: 8px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

/* Tablet: ≤ 900px */
@media (max-width: 900px) {
  .rb-grid {
    grid-template-columns: repeat(var(--rb-col-tablet, 2), 1fr);
  }

  .rb-listing {
    padding: 40px 16px;
  }

  .rb-single__hero {
    min-height: 340px;
  }

  .rb-single__title {
    font-size: clamp(24px, 5vw, 40px);
  }

  .rb-author-box {
    flex-direction: column;
  }

  .rb-related {
    padding: 40px 0;
  }
}

/* Mobile: ≤ 600px */
@media (max-width: 600px) {
  .rb-grid {
    grid-template-columns: repeat(var(--rb-col-mobile, 1), 1fr);
  }

  .rb-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .rb-search,
  .rb-sort__select {
    width: 100%;
    max-width: 100%;
  }

  .rb-filter {
    gap: 8px;
  }

  .rb-filter__btn {
    padding: 7px 14px;
    font-size: 13px;
  }

  .rb-single__hero {
    min-height: 280px;
    padding-bottom: 40px;
  }

  .rb-single__content-wrap {
    padding: 36px 16px;
  }

  .rb-breadcrumb__current {
    max-width: 160px;
  }

  .rb-pagination {
    gap: 4px;
  }

  .rb-page-btn {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
    padding: 0 8px;
  }
}

/* ─── Card v2 Enhancements ───────────────────────────────────────────────── */

/* Aspect-ratio image container */
.rb-card__image-ratio {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.rb-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}

.rb-card:hover .rb-card__image {
  transform: scale(1.06);
}

/* Subtle gradient at image bottom for all card styles */
.rb-card__image-gradient {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.08));
  pointer-events: none;
}

/* Placeholder when no image */
.rb-card__image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  background: var(--rb-tag-bg, #f5f0ea);
}

/* Accent bar – animates in on hover */
.rb-card__accent-bar {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--rb-primary, #8B1A1A), var(--rb-secondary, #C8831A));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  margin-bottom: 2px;
}

.rb-card:hover .rb-card__accent-bar {
  transform: scaleX(1);
}

/* ── Hover Effects ──────────────────────────────────────────────────────── */
.rb-card--hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.13);
}

.rb-card--hover-border:hover {
  border-color: var(--rb-primary, #8B1A1A);
  box-shadow: none;
  transform: none;
}

.rb-card--hover-glow:hover {
  box-shadow: 0 0 0 3px var(--rb-primary, #8B1A1A), 0 8px 30px rgba(139,26,26,0.18);
  transform: none;
}

.rb-card--hover-scale:hover {
  transform: scale(1.025);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.rb-card--hover-none:hover {
  transform: none;
  box-shadow: inherit;
}

/* Flat card style */
.rb-card--flat {
  border: none;
  box-shadow: none;
  background: transparent;
}

.rb-card--flat:hover {
  background: var(--rb-card-bg, #fff);
}

/* Meta row dot separators */
.rb-card__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--rb-card-border, #ddd);
  flex-shrink: 0;
}

/* Read More Button v2 */
.rb-card__readmore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--rb-primary, #8B1A1A);
  text-decoration: none;
  margin-top: auto;
  padding: 10px 0;
  border-top: 1px solid var(--rb-card-border, #eee);
  width: 100%;
  transition: color 0.2s, gap 0.2s;
}

.rb-card__readmore:hover {
  color: var(--rb-secondary, #C8831A);
  gap: 12px;
}

.rb-card__readmore-arrow {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rb-tag-bg, #f5f0ea);
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.rb-card__readmore:hover .rb-card__readmore-arrow {
  background: var(--rb-primary, #8B1A1A);
  color: #fff;
  transform: translateX(2px);
}

/* ─── Single Post – Tab Navigation ──────────────────────────────────────── */
.rb-single__tabs-wrap {
  padding-top: 0 !important;
}

.rb-single__tab-nav {
  display: flex;
  gap: 4px;
  padding: 24px 0 0;
  border-bottom: 2px solid var(--rb-card-border, #eee);
  margin-bottom: 32px;
}

.rb-single__tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  border: none;
  background: transparent;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--rb-text-light, #666);
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  position: relative;
  bottom: -2px;
  border: 2px solid transparent;
  border-bottom: none;
  transition: all 0.2s;
}

.rb-single__tab-btn:hover {
  color: var(--rb-primary, #8B1A1A);
  background: var(--rb-tag-bg, #f5f0ea);
}

.rb-single__tab-btn--active {
  color: var(--rb-primary, #8B1A1A);
  background: var(--rb-card-bg, #fff);
  border-color: var(--rb-card-border, #eee);
  border-bottom-color: var(--rb-card-bg, #fff);
}

.rb-single__tab-panel {
  display: none;
}

.rb-single__tab-panel--active {
  display: block;
}

/* Inline meta (non-hero layouts) */
.rb-single__meta--inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--rb-text-light, #666);
  padding: 16px 0;
  border-top: 1px solid var(--rb-card-border, #eee);
  border-bottom: 1px solid var(--rb-card-border, #eee);
  margin: 12px 0 24px;
}

.rb-single__title--inline {
  color: var(--rb-accent, #4A0E0E);
  margin-top: 16px;
}

.rb-single__subtitle--inline {
  color: var(--rb-text-light, #666);
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 0;
}

/* Tab 2 custom text */
.rb-single__tab2-custom {
  padding: 20px 24px;
  background: var(--rb-tag-bg, #f5f0ea);
  border-radius: 12px;
  margin-bottom: 28px;
  font-family: var(--rb-body-family, 'Montserrat', sans-serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--rb-text, #1a1a1a);
}

/* Related inline (inside tab 2) */
.rb-related--inline {
  background: transparent;
  padding: 32px 0 0;
}

.rb-related--inline .rb-related__heading {
  font-size: 22px;
  margin-bottom: 20px;
}

/* Featured image for hero:none */
.rb-single__featured-image {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}

.rb-single__featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hero styles */
.rb-single__hero--gradient {
  background: linear-gradient(135deg,
    var(--rb-accent, #4A0E0E) 0%,
    var(--rb-primary, #8B1A1A) 50%,
    var(--rb-secondary, #C8831A) 100%
  );
}

.rb-single__hero--minimal {
  background: var(--rb-tag-bg, #f5f0ea);
  min-height: auto;
  padding-bottom: 32px;
}

.rb-single__hero--minimal .rb-single__hero-overlay {
  display: none;
}

.rb-single__hero--minimal .rb-single__title,
.rb-single__hero--minimal .rb-single__subtitle {
  color: var(--rb-accent, #4A0E0E);
}

.rb-single__hero--minimal .rb-breadcrumb,
.rb-single__hero--minimal .rb-breadcrumb a {
  color: var(--rb-text-light, #666);
}

.rb-single__hero--minimal .rb-single__meta {
  color: var(--rb-text-light, #666);
}

/* Layout widths */
.rb-single--centered .rb-single__content-wrap,
.rb-single--centered .rb-single__tabs-wrap {
  max-width: var(--rb-single-max-width, 860px);
  margin-left: auto;
  margin-right: auto;
}

.rb-single--wide .rb-single__content-wrap,
.rb-single--wide .rb-single__tabs-wrap {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.rb-single--full .rb-single__content-wrap,
.rb-single--full .rb-single__tabs-wrap {
  max-width: 100%;
}

/* ─── Card Title Clamp ────────────────────────────────────────────────── */
[style*="--rb-title-clamp"] .rb-card__title,
.rb-card__title {
  display: -webkit-box;
  -webkit-line-clamp: var(--rb-title-clamp, 2);
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Card Letter Spacing ────────────────────────────────────────────── */
.rb-card__title a {
  letter-spacing: var(--rb-card-title-ls, 0);
}

/* ─── Transition Speed ───────────────────────────────────────────────── */
.rb-card { transition: transform var(--rb-speed, 300ms) ease, box-shadow var(--rb-speed, 300ms) ease; }
.rb-card__image { transition: transform calc(var(--rb-speed, 300ms) * 1.5) cubic-bezier(0.25,0.46,0.45,0.94); }

/* ─── Shadow Depth ───────────────────────────────────────────────────── */
.rb-card--default { box-shadow: 0 2px var(--rb-shadow-d,6px) rgba(0,0,0,0.06); }
.rb-card--default:hover { box-shadow: 0 calc(var(--rb-shadow-d,6px) * 2.5) calc(var(--rb-shadow-d,6px) * 5) rgba(0,0,0,0.12); }

/* ─── Featured First Post ─────────────────────────────────────────────── */
.rb-grid--featured .rb-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.rb-grid--featured .rb-card:first-child .rb-card__image-ratio {
  padding-top: 0 !important;
  min-height: 300px;
}
.rb-grid--featured .rb-card:first-child .rb-card__image {
  position: absolute;
  height: 100%;
}

/* ─── Table of Contents ──────────────────────────────────────────────── */
.rb-toc {
  background: var(--rb-tag-bg, #f5f0ea);
  border: 1px solid var(--rb-card-border, #eee);
  border-left: 4px solid var(--rb-primary, #8B1A1A);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 32px 0;
}
.rb-toc__title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 14px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--rb-primary, #8B1A1A); margin-bottom: 14px;
}
.rb-toc__list {
  padding-left: 0; margin: 0; list-style: none;
  display: flex; flex-direction: column; gap: 6px; counter-reset: toc;
}
.rb-toc__item { counter-increment: toc; }
.rb-toc__item--h3 { padding-left: 18px; }
.rb-toc__link {
  font-family: var(--rb-body-family, 'Montserrat', sans-serif);
  font-size: 14px; font-weight: 500; color: var(--rb-text, #1a1a1a);
  text-decoration: none; display: flex; align-items: center; gap: 8px;
  padding: 4px 0; transition: color 0.2s;
}
.rb-toc__link::before {
  content: counter(toc);
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--rb-primary, #8B1A1A); color: #fff;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.rb-toc__link:hover, .rb-toc__link.is-active { color: var(--rb-primary, #8B1A1A); }
.rb-toc__link.is-active::before { background: var(--rb-secondary, #C8831A); }

/* ─── Float Share Bar ────────────────────────────────────────────────── */
#rb-float-share {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0;
  z-index: 9990; background: var(--rb-card-bg, #fff);
  border-radius: 0 12px 12px 0; border: 1px solid var(--rb-card-border, #eee);
  border-left: none; box-shadow: 4px 0 20px rgba(0,0,0,0.08);
  padding: 4px;
}
.rb-float-share__label {
  writing-mode: vertical-rl; text-orientation: mixed;
  font-family: var(--rb-meta-family, 'Darker Grotesque', sans-serif);
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--rb-text-light, #666);
  padding: 10px 4px;
}
#rb-float-share a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  color: var(--rb-text-light, #666); text-decoration: none;
  transition: all 0.2s;
}
#rb-float-share a:hover {
  background: var(--rb-primary, #8B1A1A); color: #fff;
  transform: translateX(2px);
}

/* ─── Back to Top ────────────────────────────────────────────────────── */
#rb-back-top:hover {
  background: var(--rb-secondary, #C8831A) !important;
  transform: translateY(-3px) !important;
}

/* ─── Reading Progress ───────────────────────────────────────────────── */
#rb-progress-bar { will-change: width; }

/* ─── Sticky Controls ────────────────────────────────────────────────── */
.rb-controls--sticky {
  position: sticky; top: 0; z-index: 100;
  background: var(--rb-bg, #fff);
  padding-top: 12px; padding-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-left: -20px; margin-right: -20px;
  padding-left: 20px; padding-right: 20px;
}

/* ─── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  #rb-float-share { display: none; }
  .rb-toc { border-radius: 10px; border-left-width: 3px; }
}
