/* ==========================================================================
   RentRevive Theme - Core Stylesheet (Normal Document Flow Header)
   Design Palette: Warm Cream, Sage Green, Terracotta & Dark Charcoal
   ========================================================================== */

/* Fonts Import with font-display swap */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,400;1,600&display=swap');

:root {
  /* Color Tokens */
  --rr-bg: #F7F4EE;
  --rr-text: #252525;
  --rr-text-muted: #666666;
  --rr-text-light: #888888;
  --rr-accent-sage: #8A9A83;
  --rr-accent-sage-dark: #6F7F68;
  --rr-accent-sage-light: #EBF0E9;
  --rr-accent-terracotta: #C98268;
  --rr-accent-terracotta-dark: #B06950;
  --rr-accent-terracotta-light: #FAF0EC;
  --rr-white: #FFFFFF;
  --rr-border: #E8E5DE;
  --rr-border-dark: #D6D2C8;
  --rr-shadow-sm: 0 2px 8px rgba(37, 37, 37, 0.04);
  --rr-shadow-md: 0 8px 24px rgba(37, 37, 37, 0.08);
  --rr-shadow-lg: 0 16px 40px rgba(37, 37, 37, 0.12);
  --rr-radius-sm: 6px;
  --rr-radius-md: 12px;
  --rr-radius-lg: 20px;
  --rr-radius-full: 9999px;
  --rr-transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease;
  --rr-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --rr-font-serif: 'Playfair Display', Georgia, Cambria, serif;
  --rr-container-max: 1240px;
  --rr-content-max: 760px;
}

/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--rr-font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--rr-text);
  background-color: var(--rr-bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  background-color: var(--rr-bg);
  color: var(--rr-text);
}

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

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

button, input, select, textarea {
  font: inherit;
}

ul, ol {
  list-style: none !important;
  padding: 0;
  margin: 0;
}

/* Container Utility */
.rr-container {
  width: 100%;
  max-width: var(--rr-container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.rr-content-container {
  width: 100%;
  max-width: var(--rr-content-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: var(--rr-font-serif);
  color: var(--rr-text);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: 2.75rem; letter-spacing: -0.02em; }
h2 { font-size: 2.15rem; letter-spacing: -0.015em; }
h3 { font-size: 1.65rem; }
h4 { font-size: 1.35rem; }

@media (max-width: 768px) {
  h1 { font-size: 2.15rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.4rem; }
}

/* Section Spacing */
.rr-section {
  padding: 80px 0;
}

.rr-section-sm {
  padding: 48px 0;
}

@media (max-width: 768px) {
  .rr-section { padding: 48px 0; }
  .rr-section-sm { padding: 32px 0; }
}

.rr-section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px auto;
}

.rr-section-subtitle {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rr-accent-sage-dark);
  margin-bottom: 10px;
  display: block;
}

.rr-section-title {
  margin-bottom: 12px;
}

.rr-section-desc {
  color: var(--rr-text-muted);
  font-size: 1.05rem;
}

/* Buttons */
.rr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--rr-radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--rr-transition);
  white-space: nowrap;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.rr-btn-primary {
  background-color: var(--rr-accent-sage);
  color: var(--rr-white);
}

.rr-btn-primary:hover {
  background-color: var(--rr-accent-sage-dark);
  box-shadow: 0 6px 18px rgba(138, 154, 131, 0.35);
  transform: translate3d(0, -3px, 0);
}

.rr-btn-secondary {
  background-color: transparent;
  color: var(--rr-text);
  border-color: var(--rr-border-dark);
}

.rr-btn-secondary:hover {
  background-color: var(--rr-white);
  border-color: var(--rr-text);
  transform: translate3d(0, -3px, 0);
}

.rr-btn-terracotta {
  background-color: var(--rr-accent-terracotta);
  color: var(--rr-white);
}

.rr-btn-terracotta:hover {
  background-color: var(--rr-accent-terracotta-dark);
  box-shadow: 0 6px 18px rgba(201, 130, 104, 0.35);
  transform: translate3d(0, -3px, 0);
}

/* Header Component (Normal Document Flow - NOT STICKY, NOT FIXED) */
.rr-site-header {
  position: relative; /* Normal document flow: scrolls away naturally */
  z-index: 1000;
  background-color: var(--rr-bg);
  border-bottom: 1px solid var(--rr-border);
}

.rr-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.rr-logo-wrapper img {
  height: 48px;
  width: auto;
  display: block;
}

.rr-main-nav {
  display: flex;
  align-items: center;
}

.rr-nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none !important;
}

.rr-nav-menu li {
  list-style: none !important;
}

.rr-nav-menu a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--rr-text);
  position: relative;
  padding: 6px 0;
}

.rr-nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--rr-accent-sage);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.rr-nav-menu a:hover::after {
  width: 100%;
}

.rr-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rr-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--rr-text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--rr-transition);
}

.rr-icon-btn:hover {
  background-color: var(--rr-border);
  color: var(--rr-accent-sage);
}

.rr-mobile-toggle {
  display: none;
}

@media (max-width: 1024px) {
  .rr-main-nav {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--rr-bg);
    flex-direction: column;
    padding: 32px 24px;
    display: none;
    z-index: 999;
    border-bottom: 1px solid var(--rr-border);
    box-shadow: var(--rr-shadow-md);
  }

  .rr-main-nav.is-open {
    display: flex !important;
  }

  .rr-nav-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 20px;
  }

  .rr-mobile-toggle {
    display: flex;
  }
}

/* Search Modal Overlay */
.rr-search-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(37, 37, 37, 0.65);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rr-search-modal.is-open {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.rr-search-modal-box {
  background-color: var(--rr-bg);
  width: 90%;
  max-width: 680px;
  padding: 40px;
  border-radius: var(--rr-radius-lg);
  box-shadow: var(--rr-shadow-lg);
  position: relative;
  transform: translate3d(0, -20px, 0);
  transition: transform 0.3s ease;
}

.rr-search-modal.is-open .rr-search-modal-box {
  transform: translate3d(0, 0, 0);
}

.rr-search-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
}

.rr-search-form-wrap input[type="search"] {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.25rem;
  border: 2px solid var(--rr-border-dark);
  border-radius: var(--rr-radius-md);
  background-color: var(--rr-white);
  color: var(--rr-text);
  outline: none;
}

/* Hero Section Component */
.rr-hero {
  padding: 60px 0 80px 0;
  background: linear-gradient(180deg, var(--rr-bg) 0%, #EFECE5 100%);
}

.rr-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 992px) {
  .rr-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.rr-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--rr-radius-full);
  background-color: var(--rr-accent-sage-light);
  color: var(--rr-accent-sage-dark);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.rr-hero-title {
  font-size: 3.25rem;
  margin-bottom: 20px;
  line-height: 1.15;
}

@media (max-width: 768px) {
  .rr-hero-title { font-size: 2.25rem; }
}

.rr-hero-desc {
  font-size: 1.15rem;
  color: var(--rr-text-muted);
  margin-bottom: 32px;
  max-width: 520px;
}

.rr-hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.rr-hero-image-wrap {
  position: relative;
  border-radius: var(--rr-radius-lg);
  overflow: hidden;
  box-shadow: var(--rr-shadow-lg);
  aspect-ratio: 4 / 3;
}

.rr-hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.rr-hero-image-wrap:hover img {
  transform: scale(1.04);
}

/* Dynamic Category Grid Component */
.rr-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 992px) {
  .rr-categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .rr-categories-grid { grid-template-columns: 1fr; }
}

.rr-category-card {
  background-color: var(--rr-white);
  border-radius: var(--rr-radius-md);
  overflow: hidden;
  box-shadow: var(--rr-shadow-sm);
  border: 1px solid var(--rr-border);
  transition: var(--rr-transition);
  display: flex;
  flex-direction: column;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.rr-category-card:hover {
  transform: translate3d(0, -6px, 0);
  box-shadow: var(--rr-shadow-md);
  border-color: var(--rr-accent-sage);
}

.rr-cat-card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #ECE8DF;
}

.rr-cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.rr-category-card:hover .rr-cat-card-img img {
  transform: scale(1.06);
}

.rr-cat-card-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.rr-cat-card-title {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.rr-cat-card-desc {
  font-size: 0.92rem;
  color: var(--rr-text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.rr-cat-card-link {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--rr-accent-sage-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Article Cards & Grid */
.rr-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 992px) {
  .rr-articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .rr-articles-grid { grid-template-columns: 1fr; }
}

.rr-article-card {
  background-color: var(--rr-white);
  border-radius: var(--rr-radius-md);
  overflow: hidden;
  border: 1px solid var(--rr-border);
  box-shadow: var(--rr-shadow-sm);
  transition: var(--rr-transition);
  display: flex;
  flex-direction: column;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.rr-article-card:hover {
  transform: translate3d(0, -6px, 0);
  box-shadow: var(--rr-shadow-md);
}

.rr-article-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #ECE8DF;
}

.rr-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.rr-article-card:hover .rr-article-thumb img {
  transform: scale(1.05);
}

.rr-article-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.rr-article-meta {
  font-size: 0.82rem;
  color: var(--rr-text-light);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rr-article-title {
  font-size: 1.28rem;
  margin-bottom: 12px;
  line-height: 1.35;
}

.rr-article-excerpt {
  font-size: 0.92rem;
  color: var(--rr-text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

/* Popular Topics Section */
.rr-topics-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.rr-topic-pill {
  padding: 10px 22px;
  background-color: var(--rr-white);
  border: 1px solid var(--rr-border-dark);
  border-radius: var(--rr-radius-full);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--rr-text);
  transition: var(--rr-transition);
}

.rr-topic-pill:hover {
  background-color: var(--rr-accent-sage);
  color: var(--rr-white);
  border-color: var(--rr-accent-sage);
  transform: translate3d(0, -2px, 0);
}

/* Editorial Feature Banner */
.rr-editorial-banner {
  background: linear-gradient(135deg, #252525 0%, #3D443B 100%);
  color: var(--rr-white);
  border-radius: var(--rr-radius-lg);
  padding: 60px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--rr-shadow-lg);
}

.rr-banner-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

@media (max-width: 992px) {
  .rr-editorial-banner { padding: 40px 24px; }
  .rr-banner-grid { grid-template-columns: 1fr; gap: 32px; }
}

.rr-banner-subtitle {
  color: var(--rr-accent-terracotta);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.rr-banner-title {
  color: var(--rr-white);
  font-size: 2.75rem;
  margin-bottom: 16px;
}

.rr-banner-desc {
  color: #D6D2C8;
  font-size: 1.1rem;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Pinterest Section Styling */
.rr-pinterest-section {
  background-color: #F3EFE7;
  padding: 80px 0;
  border-top: 1px solid var(--rr-border);
  border-bottom: 1px solid var(--rr-border);
}

.rr-pinterest-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #E60023;
  color: white;
  padding: 4px 12px;
  border-radius: var(--rr-radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.rr-pinterest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Mobile: swipeable left/right carousel showing the latest 4 Pins,
   one at a time. Works via native scroll-snap in all mobile browsers
   (Chrome, Safari, Firefox, Samsung Internet) - no JS required. */
@media (max-width: 768px) {
  .rr-pinterest-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 16px;
    padding: 4px 2px 14px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .rr-pinterest-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .rr-pinterest-grid .rr-pin-card {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
}

.rr-pin-card {
  background-color: var(--rr-white);
  border-radius: var(--rr-radius-md);
  overflow: hidden;
  box-shadow: var(--rr-shadow-sm);
  border: 1px solid var(--rr-border);
  transition: var(--rr-transition);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rr-pin-card:hover {
  transform: translate3d(0, -6px, 0);
  box-shadow: var(--rr-shadow-md);
}

.rr-pin-image-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #E8E5DE;
}

.rr-pin-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.rr-pin-card:hover .rr-pin-image-wrap img {
  transform: scale(1.04);
}

.rr-pin-overlay {
  position: absolute;
  inset: 0;
  background: rgba(37, 37, 37, 0.4);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--rr-transition);
}

.rr-pin-card:hover .rr-pin-overlay {
  opacity: 1;
}

.rr-pin-save-btn {
  background-color: #E60023;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: var(--rr-radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rr-pin-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rr-pin-title {
  font-family: var(--rr-font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rr-text);
  line-height: 1.35;
}

.rr-pin-desc {
  font-size: 0.82rem;
  color: var(--rr-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Newsletter Section */
.rr-newsletter {
  background-color: var(--rr-accent-sage-light);
  border-radius: var(--rr-radius-lg);
  padding: 60px 40px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid rgba(138, 154, 131, 0.3);
}

.rr-newsletter-title {
  font-size: 2.25rem;
  margin-bottom: 12px;
}

.rr-newsletter-desc {
  color: var(--rr-text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.rr-newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

@media (max-width: 576px) {
  .rr-newsletter-form { flex-direction: column; }
}

.rr-newsletter-form input[type="email"] {
  flex-grow: 1;
  padding: 14px 20px;
  border-radius: var(--rr-radius-full);
  border: 1px solid var(--rr-border-dark);
  outline: none;
  background-color: var(--rr-white);
}

/* Footer Component */
.rr-site-footer {
  background-color: #1E221D;
  color: #E2E6E0;
  padding: 80px 0 40px 0;
  margin-top: auto;
}

.rr-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

@media (max-width: 992px) {
  .rr-footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 576px) {
  .rr-footer-grid { grid-template-columns: 1fr; }
}

.rr-footer-brand p {
  color: #A5B0A2;
  font-size: 0.95rem;
  margin: 16px 0 24px 0;
  max-width: 320px;
}

.rr-footer-title {
  color: var(--rr-white);
  font-size: 1.15rem;
  margin-bottom: 20px;
  font-family: var(--rr-font-sans);
  font-weight: 700;
}

.rr-footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rr-footer-links a {
  color: #B5BFB2;
  font-size: 0.92rem;
}

.rr-footer-links a:hover {
  color: var(--rr-accent-terracotta);
}

.rr-footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #8C9989;
}

@media (max-width: 768px) {
  .rr-footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

.rr-social-links {
  display: flex;
  gap: 14px;
}

.rr-social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rr-white);
  transition: var(--rr-transition);
}

.rr-social-links a:hover {
  background-color: var(--rr-accent-sage);
  transform: translate3d(0, -2px, 0);
}

/* ============================================================================
   RentRevive Article Layout Fixes
   Scoped to single-post content, TOC and comments only.
   ============================================================================ */
.rr-entry-content {
  width: 100%; max-width: 100%; min-width: 0;
  font-size: 1.06rem; line-height: 1.78;
  overflow-wrap: anywhere; word-break: normal;
}
.rr-entry-content > * { max-width: 100%; }
.rr-entry-content p { margin: 0 0 1.25rem; }
.rr-entry-content p:last-child { margin-bottom: 0; }
.rr-entry-content h2, .rr-entry-content h3, .rr-entry-content h4 { scroll-margin-top: 24px; }
.rr-entry-content h2 { margin: 2.25rem 0 .9rem; font-size: clamp(1.65rem,3vw,2.15rem); line-height: 1.25; }
.rr-entry-content h3 { margin: 1.75rem 0 .7rem; font-size: clamp(1.3rem,2.5vw,1.65rem); line-height: 1.3; }
.rr-entry-content h4 { margin: 1.5rem 0 .6rem; font-size: 1.3rem; }
.rr-entry-content > h2:first-child, .rr-entry-content > h3:first-child, .rr-entry-content > h4:first-child { margin-top: 0; }
.rr-entry-content ul, .rr-entry-content ol { margin: 0 0 1.35rem 1.5rem; padding-left: 1rem; list-style-position: outside !important; }
.rr-entry-content ul { list-style: disc !important; }
.rr-entry-content ol { list-style: decimal !important; }
.rr-entry-content li { margin: 0 0 .45rem; padding-left: .15rem; }
.rr-entry-content li:last-child { margin-bottom: 0; }
.rr-entry-content img, .rr-entry-content video, .rr-entry-content iframe { max-width: 100%; }
.rr-entry-content img { height: auto; margin: 1.5rem auto; }
.rr-entry-content figure { max-width: 100%; margin: 1.75rem 0; }
.rr-entry-content figure img { margin: 0; }
.rr-entry-content figcaption { margin-top: .55rem; color: var(--rr-text-muted); font-size: .88rem; line-height: 1.5; text-align: center; }
.rr-entry-content blockquote { margin: 1.75rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--rr-accent-sage); background: var(--rr-accent-sage-light); color: var(--rr-text); }
.rr-entry-content blockquote p:last-child { margin-bottom: 0; }
.rr-entry-content table { width: 100%; max-width: 100%; border-collapse: collapse; margin: 1.5rem 0; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rr-entry-content table th, .rr-entry-content table td { min-width: 120px; padding: .7rem .8rem; border: 1px solid var(--rr-border); text-align: left; vertical-align: top; }
.rr-entry-content table th { background: var(--rr-accent-sage-light); font-weight: 700; }
.rr-entry-content pre { max-width: 100%; overflow-x: auto; padding: 1rem; margin: 1.5rem 0; border-radius: var(--rr-radius-sm); background: #eeeae2; }
.rr-entry-content code { overflow-wrap: anywhere; }
.rr-entry-content a { color: var(--rr-accent-sage-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.rr-entry-content .wp-block-image, .rr-entry-content .wp-block-table, .rr-entry-content .wp-block-embed { max-width: 100%; }

/* Table of Contents */
#rr-toc-container { width: 100%; max-width: 100%; margin: 0 0 2rem; }
.rr-toc-box { width: 100%; margin: 0; padding: 0; border: 1px solid var(--rr-border); border-radius: var(--rr-radius-md); background: var(--rr-white); overflow: hidden; }
.rr-toc-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; cursor: pointer; border-bottom: 1px solid var(--rr-border); }
.rr-toc-title { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 700; }
.rr-toc-list { display: flex; flex-direction: column; gap: 0; padding: 8px 16px 12px; }
.rr-toc-item { display: block; width: 100%; padding: 5px 0; line-height: 1.45; }
.rr-toc-item a { display: block; color: var(--rr-text-muted); text-decoration: none; overflow-wrap: anywhere; }
.rr-toc-item a:hover { color: var(--rr-accent-sage-dark); }

/* Article header / media */
.rr-article-header { width: 100%; max-width: var(--rr-content-max); margin: 0 auto 2rem; }
.rr-article-header .entry-title { margin: 0 0 1.1rem; }
/* Article byline: compact avatar + author/date stack, matching the article header design. */
.rr-article-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.rr-author-avatar-sm {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  flex: 0 0 44px;
  display: block;
  object-fit: cover;
  border-radius: 0 !important;
}
.rr-article-byline > div {
  min-width: 0;
  line-height: 1.35;
}
.rr-article-byline .byline {
  display: block;
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}
.rr-article-byline .byline a {
  text-decoration: none;
}
.rr-article-byline > div > div {
  font-size: .82rem !important;
  line-height: 1.4;
}
.rr-featured-media-frame { width: 100%; max-width: 1000px; margin: 0 auto 2.25rem; overflow: hidden; border-radius: var(--rr-radius-lg); }
.rr-featured-media-frame img { width: 100%; height: auto; margin: 0; }

/* Author box / comments */
.rr-author-box { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 20px; align-items: start; margin-top: 2.5rem; padding: 24px; border: 1px solid var(--rr-border); border-radius: var(--rr-radius-md); background: var(--rr-white); }
.rr-author-img { width: 90px; height: 90px; border-radius: 50%; }
.rr-author-name { margin: 0 0 .45rem; }
.rr-author-bio { margin: 0; color: var(--rr-text-muted); line-height: 1.65; }
.comments-area { width: 100%; max-width: var(--rr-content-max); margin-left: auto !important; margin-right: auto !important; }
.comments-area .comment-form p { margin: 0 0 14px; }
.comments-area .comment-form label { display: block; margin-bottom: 6px; font-weight: 600; }
.comments-area .comment-form input[type="text"], .comments-area .comment-form input[type="email"], .comments-area .comment-form input[type="url"], .comments-area .comment-form textarea { display: block; width: 100%; max-width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid var(--rr-border-dark); border-radius: var(--rr-radius-sm); background: var(--rr-white); color: var(--rr-text); }
.comments-area .comment-form textarea { min-height: 150px; resize: vertical; }
.comments-area .comment-form input:focus, .comments-area .comment-form textarea:focus { outline: 2px solid rgba(138,154,131,.25); border-color: var(--rr-accent-sage); }

@media (max-width: 768px) {
  .rr-content-container { padding-left: 16px; padding-right: 16px; }
  .rr-entry-content { font-size: 1rem; line-height: 1.72; }
  .rr-entry-content p { margin-bottom: 1.1rem; }
  .rr-entry-content h2 { margin-top: 1.9rem; margin-bottom: .75rem; }
  .rr-entry-content h3 { margin-top: 1.5rem; margin-bottom: .6rem; }
  .rr-entry-content ul, .rr-entry-content ol { margin-left: 1.1rem; padding-left: .8rem; }
  .rr-entry-content table { font-size: .92rem; }
  .rr-toc-list { padding-left: 13px; padding-right: 13px; }
  .rr-article-byline { gap: 10px; }
  .rr-author-avatar-sm { width: 44px !important; height: 44px !important; min-width: 44px; flex-basis: 44px; }
  .rr-author-box { grid-template-columns: 64px minmax(0,1fr); gap: 14px; padding: 18px; }
  .rr-author-img { width: 64px; height: 64px; }
}
@media (max-width: 480px) {
  .rr-container { padding-left: 14px; padding-right: 14px; }
  .rr-content-container { padding-left: 12px; padding-right: 12px; }
  .rr-article-header { margin-bottom: 1.5rem; }
  .rr-featured-media-frame { border-radius: var(--rr-radius-md); margin-bottom: 1.5rem; }
  .rr-author-box { grid-template-columns: 1fr; }
}

/* ======================================================================
   Category / Archive mobile-only layout fix
   Scoped strictly to archive views so the homepage and single posts stay
   unchanged.
   ====================================================================== */
@media (max-width: 768px) {
  body.category .rr-section,
  body.archive .rr-section {
    padding-top: 34px;
    padding-bottom: 40px;
  }

  body.category .rr-section > .rr-container,
  body.archive .rr-section > .rr-container {
    width: 100%;
    min-width: 0;
    padding-left: 14px;
    padding-right: 14px;
  }

  body.category .rr-section-header,
  body.archive .rr-section-header {
    width: 100%;
    max-width: 100%;
    margin-bottom: 28px;
  }

  body.category .rr-section-subtitle,
  body.archive .rr-section-subtitle {
    margin-bottom: 7px;
    font-size: .72rem;
    line-height: 1.35;
  }

  body.category .rr-section-title,
  body.archive .rr-section-title {
    margin-bottom: 10px;
    font-size: clamp(1.75rem, 8vw, 2.15rem);
    line-height: 1.18;
    overflow-wrap: anywhere;
  }

  body.category .rr-section-desc,
  body.archive .rr-section-desc {
    max-width: 100%;
    font-size: .94rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  /* Keep the featured category post inside the viewport. */
  body.category .rr-article-card-featured {
    width: 100%;
    min-width: 0;
  }

  body.category .rr-article-card-featured .rr-article-thumb {
    aspect-ratio: 16 / 9 !important;
  }

  body.category .rr-article-card-featured .rr-article-body {
    padding: 18px !important;
  }

  body.category .rr-article-card-featured .rr-article-title {
    font-size: 1.3rem !important;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  body.category .rr-article-card-featured .rr-article-excerpt {
    font-size: .92rem !important;
    line-height: 1.55;
  }

  /* Category + archive cards: one clean card per row on phones. */
  body.category .rr-articles-grid,
  body.archive .rr-articles-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    width: 100%;
    min-width: 0;
  }

  body.category .rr-article-card,
  body.archive .rr-article-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.category .rr-article-thumb,
  body.archive .rr-article-thumb {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 10;
  }

  body.category .rr-article-thumb img,
  body.archive .rr-article-thumb img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.category .rr-article-body,
  body.archive .rr-article-body {
    min-width: 0;
    padding: 17px 18px 19px;
  }

  body.category .rr-article-meta,
  body.archive .rr-article-meta {
    flex-wrap: wrap;
    gap: 5px 8px;
    margin-bottom: 8px;
    font-size: .76rem;
    line-height: 1.45;
  }

  body.category .rr-article-title,
  body.archive .rr-article-title {
    margin-bottom: 8px;
    font-size: 1.16rem;
    line-height: 1.32;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  body.category .rr-article-excerpt,
  body.archive .rr-article-excerpt {
    margin-bottom: 0;
    font-size: .9rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  /* Remove accidental horizontal overflow from long category names,
     archive titles, badges or metadata. */
  body.category .rr-section,
  body.archive .rr-section,
  body.category .rr-section * ,
  body.archive .rr-section * {
    min-width: 0;
  }

  body.category .rr-article-badge-pos,
  body.archive .rr-article-badge-pos {
    max-width: calc(100% - 20px);
  }

  body.category .rr-article-badge-pos a,
  body.archive .rr-article-badge-pos a {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Pagination stays inside the viewport. */
  body.category .rr-section .nav-links,
  body.archive .rr-section .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    max-width: 100%;
  }

  body.category .rr-section .page-numbers,
  body.archive .rr-section .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 7px 10px;
  }
}

@media (max-width: 480px) {
  body.category .rr-section > .rr-container,
  body.archive .rr-section > .rr-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  body.category .rr-section-header,
  body.archive .rr-section-header {
    margin-bottom: 24px;
  }

  body.category .rr-article-card-featured .rr-article-body {
    padding: 16px !important;
  }

  body.category .rr-article-card-featured .rr-article-title {
    font-size: 1.2rem !important;
  }

  body.category .rr-article-body,
  body.archive .rr-article-body {
    padding: 16px;
  }
}
