/* ============================================
   ROOM IPTV - BLOG STYLES
   ============================================ */

/* --- Base (no global * reset — let homepage.css handle nav/footer) --- */
.rb-hero,
.rb-hero *,
.rb-toolbar,
.rb-toolbar *,
.rb-section,
.rb-section *,
.rb-article,
.rb-article * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ra-blog-page {
  background: #050a15;
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Solid dark navbar background on blog pages */
.ra-blog-page .rh-nav {
  background: rgba(5, 10, 21, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ---- Hero ---- */
.rb-hero {
  position: relative;
  padding: 180px 24px 60px;
  text-align: center;
  overflow: hidden;
}

.rb-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.rb-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.rb-hero-orb--1 {
  width: 500px;
  height: 500px;
  background: rgba(99, 102, 241, 0.3);
  top: -100px;
  left: 20%;
}

.rb-hero-orb--2 {
  width: 400px;
  height: 400px;
  background: rgba(139, 92, 246, 0.2);
  bottom: -50px;
  right: 15%;
}

.rb-hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.rb-hero-badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #a78bfa;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 50px;
  margin-bottom: 20px;
}

.rb-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 60%, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rb-hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  max-width: 480px;
  margin: 0 auto;
}

/* ---- Search & Filters ---- */
.rb-toolbar {
  max-width: 1100px;
  margin: 0 auto 36px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rb-search {
  position: relative;
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
}

.rb-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.3);
  pointer-events: none;
}

.rb-search-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  outline: none;
  transition: all 0.25s ease;
}

.rb-search-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.rb-search-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.rb-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 50%;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s;
}

.rb-search-clear.is-visible { display: flex; }
.rb-search-clear:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Category filters */
.rb-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rb-filter-btn {
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.rb-filter-btn:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

.rb-filter-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.rb-filter-count {
  font-size: 11px;
  opacity: 0.6;
  margin-left: 3px;
}

/* Loading spinner */
.rb-loading {
  display: none;
  text-align: center;
  padding: 60px 20px;
}

.rb-loading.is-visible { display: block; }

.rb-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: rb-spin 0.7s linear infinite;
  margin: 0 auto 12px;
}

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

.rb-loading-text {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* No results */
.rb-no-results {
  display: none;
  text-align: center;
  padding: 60px 20px;
}

.rb-no-results.is-visible { display: block; }

.rb-no-results svg { margin-bottom: 16px; opacity: 0.3; }

.rb-no-results h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.rb-no-results p {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
}

/* ---- Section & Container ---- */
.rb-section {
  padding: 0 24px 80px;
}

.rb-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ---- Blog Grid ---- */
.rb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---- Blog Card ---- */
.rb-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.rb-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.rb-card-img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.rb-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rb-card:hover .rb-card-img { transform: scale(1.05); }

.rb-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.08);
  color: rgba(255,255,255,0.2);
}

.rb-card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: rgba(99, 102, 241, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  text-decoration: none;
}

.rb-card-body {
  padding: 20px;
}

.rb-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 10px;
}

.rb-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.rb-card-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}

.rb-card-title a:hover { color: #a78bfa; }

.rb-card-excerpt {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-bottom: 14px;
}

.rb-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #6366f1;
  text-decoration: none;
  transition: all 0.2s;
}

.rb-card-link:hover {
  color: #a78bfa;
  gap: 10px;
}

/* ---- Pagination ---- */
.rb-pagination {
  margin-top: 48px;
  text-align: center;
}

.rb-pagination ul {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
}

.rb-pagination li a,
.rb-pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
}

.rb-pagination li a:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #fff;
}

.rb-pagination li span.current {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* ---- Empty State ---- */
.rb-empty {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255,255,255,0.4);
}

.rb-empty svg { margin-bottom: 20px; opacity: 0.3; }

.rb-empty h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.rb-empty p { font-size: 14px; }

/* ============================================
   SINGLE POST STYLES
   ============================================ */

.rb-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 160px 24px 60px;
}

.rb-article-header { margin-bottom: 32px; }

.rb-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.rb-back:hover { color: #a78bfa; }

.rb-article-cat {
  display: inline-block;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #a78bfa;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 6px;
  margin-bottom: 16px;
}

.rb-article-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
  color: #fff;
}

.rb-article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

.rb-article-cover {
  margin-bottom: 36px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

.rb-article-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Article Content — force white text on dark bg */
.rb-article-content {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
}

.rb-article-content h1,
.rb-article-content h2,
.rb-article-content h3,
.rb-article-content h4,
.rb-article-content h5,
.rb-article-content h6 {
  color: #fff !important;
  font-weight: 700;
  margin: 32px 0 12px;
  letter-spacing: -0.3px;
}

.rb-article-content h2 { font-size: 24px; }
.rb-article-content h3 { font-size: 20px; }
.rb-article-content h4 { font-size: 17px; }

.rb-article-content p {
  margin-bottom: 18px;
  color: rgba(255,255,255,0.8) !important;
}

.rb-article-content a { color: #6366f1 !important; text-decoration: underline; text-underline-offset: 2px; }
.rb-article-content a:hover { color: #a78bfa !important; }

.rb-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 20px 0;
  border: 1px solid rgba(255,255,255,0.06);
}

.rb-article-content blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid #6366f1;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: rgba(255,255,255,0.7) !important;
}

.rb-article-content ul,
.rb-article-content ol { margin: 16px 0; padding-left: 24px; color: rgba(255,255,255,0.8) !important; }
.rb-article-content li { margin-bottom: 8px; color: rgba(255,255,255,0.8) !important; }

.rb-article-content pre,
.rb-article-content code {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-size: 14px;
  color: #e2e8f0 !important;
}

.rb-article-content code { padding: 2px 6px; border-radius: 4px; }

.rb-article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.rb-article-content th,
.rb-article-content td { padding: 10px 14px; border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.8) !important; text-align: left; }
.rb-article-content th { background: rgba(255,255,255,0.04); font-weight: 600; color: #fff !important; }

.rb-article-content *:not(a) { color: rgba(255,255,255,0.8) !important; }
.rb-article-content strong,
.rb-article-content b { color: #fff !important; }

/* Tags */
.rb-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.rb-tag {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px;
}

/* Related Posts */
.rb-related {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.rb-related h3 { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: #fff; }

.rb-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.rb-related-card {
  display: block;
  text-decoration: none;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.rb-related-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.rb-related-img { width: 100%; height: 120px; object-fit: cover; }
.rb-related-body { padding: 14px; }
.rb-related-date { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 6px; display: block; }
.rb-related-body h4 { font-size: 14px; font-weight: 600; color: #fff; line-height: 1.4; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .rb-grid { grid-template-columns: repeat(2, 1fr); }
  .rb-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .rb-hero { padding: 140px 20px 40px; }
  .rb-grid { grid-template-columns: 1fr; }
  .rb-section { padding: 0 16px 50px; }
  .rb-toolbar { padding: 0 16px; }
  .rb-article { padding: 130px 16px 40px; }
  .rb-related-grid { grid-template-columns: 1fr; }
  .rb-article-meta { flex-wrap: wrap; }
  .rb-filters { justify-content: flex-start; }
}
