/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.rl-topbar {
  background: var(--rl-ink);
  color: #cfd6e2;
  font-size: 12px;
}

.rl-topbar .rl-container {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  height: 32px;
  align-items: center;
}

.rl-header {
  background: #ffffff;
  border-bottom: 1px solid var(--rl-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.rl-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  position: relative;
}

.rl-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  color: var(--rl-ink);
  margin-right: 8px;
  flex-shrink: 0;
  text-decoration: none;
}

.rl-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--rl-blue);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Навігація */
.rl-nav {
  flex: 1;
}

.rl-nav .rl-menu-list {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rl-nav .rl-menu-list > li {
  position: relative;
}

.rl-nav a {
  text-decoration: none;
  color: var(--rl-text);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.rl-nav a:hover,
.rl-nav a.current-menu-item {
  color: var(--rl-blue);
}

.rl-arrow {
  transition: transform 0.2s ease;
}

/* --- Випадаюче меню (Sub-menu) --- */
.rl-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--rl-border);
  padding: 8px 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.rl-nav .sub-menu li a {
  padding: 8px 18px;
  font-size: 14px;
  color: #333333;
  width: 100%;
  box-sizing: border-box;
}

.rl-nav .sub-menu li a:hover {
  background-color: var(--rl-bg);
  color: var(--rl-blue);
}

@media (min-width: 992px) {
  .rl-nav .menu-item-has-children:hover > .sub-menu,
  .rl-nav .sub-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .rl-nav .menu-item-has-children:hover .rl-arrow {
    transform: rotate(180deg);
  }
}

/* Кнопки дій та пошук */
.rl-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

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

.rl-icon-btn:hover {
  background: var(--rl-bg);
}

.rl-burger {
  display: none;
}

.rl-search-form {
  display: none;
  border-top: 1px solid var(--rl-border);
  background: #ffffff;
}

.rl-search-form.is-open {
  display: block;
}

/* --- Мобільна навігація (< 992px) --- */
@media (max-width: 991px) {
  .rl-burger {
    display: flex;
  }

  .rl-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: #ffffff;
    border-bottom: 1px solid var(--rl-border);
    padding: 12px 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }

  .rl-nav.is-open {
    display: block;
  }

  .rl-nav .rl-menu-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .rl-nav .rl-menu-list > li {
    width: 100%;
    border-bottom: 1px solid var(--rl-border);
  }

  .rl-nav .rl-menu-list > li:last-child {
    border-bottom: none;
  }

  .rl-nav a {
    justify-content: space-between;
    padding: 12px 0;
  }

  .rl-nav .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 8px 16px;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .rl-nav .menu-item-has-children.is-open > .sub-menu {
    display: block;
  }

  .rl-nav .menu-item-has-children.is-open .rl-arrow {
    transform: rotate(180deg);
  }
}

/* ==========================================================================
   Hero Section (Swiper)
   ========================================================================== */
.rl-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 30px;
  margin-top: 20px;
}

@media (min-width: 992px) {
  .rl-hero {
    grid-template-columns: 2fr 1fr;
    height: 400px;
  }
}

/* Головний слайдер */
.rl-hero-main-swiper {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.rl-hero-main {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.rl-hero-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.rl-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rl-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 100%);
  z-index: 2;
  pointer-events: none;
}

.rl-hero-content {
  position: relative;
  z-index: 3;
  padding: 24px;
  color: #ffffff;
}

.rl-hero-content h1 {
  font-size: 22px;
  line-height: 1.3;
  margin: 8px 0 6px 0;
  font-weight: 700;
}

.rl-hero-content h1 a {
  color: #ffffff;
  text-decoration: none;
}

.rl-hero-content .rl-meta {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

.rl-hero-main-swiper .swiper-pagination {
  bottom: 10px !important;
  z-index: 5;
}

.rl-hero-main-swiper .swiper-pagination-bullet {
  background: #ffffff;
  opacity: 0.5;
}

.rl-hero-main-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--rl-blue);
}

/* Бічний слайдер */
.rl-hero-side-swiper {
  width: 100%;
  height: 100%;
}

.rl-hero-side-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  height: 100%;
  box-sizing: border-box;
}

.rl-hero-side-item:hover {
  background-color: var(--rl-border);
}

.swiper-slide-thumb-active .rl-hero-side-item {
  background-color: var(--rl-border);
}

.swiper-slide-thumb-active .rl-hero-side-body h3 {
  color: var(--rl-blue);
}

.rl-hero-side-thumb {
  width: 90px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--rl-border);
}

.rl-hero-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rl-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
}

.rl-hero-side-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rl-hero-side-body h3 {
  font-size: 14px;
  line-height: 1.3;
  margin: 2px 0;
  font-weight: 600;
  color: var(--rl-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rl-hero-side-body .rl-meta {
  font-size: 11px;
  color: var(--rl-muted);
}

/* ==========================================================================
   Services
   ========================================================================== */
.rl-services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.rl-service-card {
  background: var(--rl-card);
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius);
  padding: 20px 14px;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rl-service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--rl-shadow);
}

.rl-service-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 10px;
  background: #eaf0fe;
  color: var(--rl-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rl-service-card span {
  font-size: 13px;
  font-weight: 600;
  color: var(--rl-ink);
}

@media (max-width: 900px) {
  .rl-services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .rl-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   News Grid (Останні новини)
   ========================================================================== */
.rl-news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.rl-news-card {
  background: var(--rl-card);
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rl-news-media {
  position: relative !important;
  width: 100%;
  overflow: hidden;
  border-radius: var(--rl-radius) var(--rl-radius) 0 0;
}

.rl-news-thumb {
  position: relative;
	display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--rl-border);
}

.rl-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
	display: block;
}

.rl-news-thumb .rl-badge,
.rl-card .rl-badge {
position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  
  /* Гарантуємо, що він НЕ розтягується на всю ширину */
  display: inline-block;
  width: auto;
  max-width: calc(100% - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  
  /* Закруглення та відступи */
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.rl-news-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.rl-news-body h3 {
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 8px 0;
}

.rl-news-body h3 a {
  color: var(--rl-ink);
  text-decoration: none;
}

.rl-news-body h3 a:hover {
  color: var(--rl-blue);
}

.rl-news-body .rl-meta {
  margin-top: auto;
  font-size: 12px;
  color: var(--rl-muted);
}

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

@media (max-width: 560px) {
  .rl-news-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Bottom Row: Popular / Library / Poll
   ========================================================================== */
.rl-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.rl-panel {
  padding: 20px;
  background: var(--rl-card);
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius);
}

.rl-panel h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

.rl-popular-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rl-popular-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.rl-popular-rank {
  font-size: 18px;
  font-weight: 800;
  color: #c7cfdb;
  width: 24px;
  flex-shrink: 0;
}

.rl-popular-body a {
  font-size: 13px;
  font-weight: 600;
  color: var(--rl-ink);
  text-decoration: none;
}

.rl-popular-body a:hover {
  color: var(--rl-blue);
}

.rl-popular-body .rl-meta {
  margin-top: 2px;
  font-size: 11px;
}

.rl-doc-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rl-doc-item {
  display: flex;
  gap: 10px;
  align-items: center;
}

.rl-doc-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fdeceb;
  color: #c0392b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rl-doc-body a {
  font-size: 13px;
  font-weight: 600;
  color: var(--rl-ink);
  text-decoration: none;
}

.rl-doc-body a:hover {
  color: var(--rl-blue);
}

.rl-doc-meta {
  font-size: 11px;
  color: var(--rl-muted);
}

.rl-poll-question {
  font-size: 13px;
  font-weight: 600;
  color: var(--rl-ink);
  margin-bottom: 12px;
}

.rl-poll-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.rl-poll-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.rl-poll-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--rl-blue);
}

.rl-poll-submit {
  background: var(--rl-blue);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.rl-poll-submit:hover {
  background: var(--rl-blue-dark);
}

.rl-panel-foot {
  margin-top: 12px;
  font-size: 12px;
}

.rl-panel-foot a {
  color: var(--rl-blue);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 900px) {
  .rl-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Gallery Strip (Актуальне)
   ========================================================================== */
.rl-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.rl-gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: var(--rl-radius);
  overflow: hidden;
  background: var(--rl-border);
}

.rl-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rl-gallery-item:hover img {
  transform: scale(1.05);
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
.rl-footer {
  margin-top: 64px;
  background: var(--rl-ink);
  color: #a9b3c4;
  padding: 48px 0 24px;
}

.rl-footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
}

.rl-footer h4 {
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 14px;
}

.rl-footer .rl-logo {
  color: #ffffff;
}

.rl-footer-desc {
margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
}

.rl-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rl-footer-links li {
  margin-bottom: 10px;
}

.rl-footer-links a {
  font-size: 14px;
  color: var(--rl-muted, #6c757d);
  text-decoration: none;
	transition: color 0.2s ease;
}

.rl-footer-links a:hover {
  color: var(--rl-border);
}

.rl-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 36px;
  padding-top: 20px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
	color: var(--rl-muted, #6c757d);
}

@media (max-width: 900px) {
  .rl-footer-grid {
    grid-template-columns: 1fr 1fr;
	  gap:28px;
  }
	.rl-footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ==========================================================================
   Inner Pages (Single / Post / TOC)
   ========================================================================== */

/* Біла картка для всієї статті */
.rl-single-card {
  background: var(--rl-card, #ffffff);
  border: 1px solid var(--rl-border, #e9ecef);
  border-radius: var(--rl-radius, 16px);
  padding: 32px;
  margin-top: 24px;
}

/* Заголовок та мета-дані */
.rl-page-head {
  margin-bottom: 20px;
}

.rl-page-head .rl-entry-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--rl-ink);
  margin: 12px 0 10px 0;
}

.rl-breadcrumbs {
  font-size: 12px;
  color: var(--rl-muted);
  margin-bottom: 10px;
}

.rl-breadcrumbs a {
  color: var(--rl-blue);
  text-decoration: none;
}

.rl-breadcrumbs .rl-sep {
  margin: 0 4px;
  color: var(--rl-muted);
}

/* Головна картинка */
.rl-post-thumbnail {
  margin: 20px 0 28px 0;
  border-radius: var(--rl-radius, 12px);
  overflow: hidden;
  max-height: 480px;
  background: var(--rl-bg);
  display: flex;
  justify-content: center;
  align-items: center;
}

.rl-post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Сітка контенту та змісту */
.rl-single-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Основний текст */
.rl-entry-content {
  font-size: 16px;
  line-height: 1.7;
  color: #2b3036;
}

.rl-entry-content p {
  margin-bottom: 20px;
}

.rl-entry-content h2, 
.rl-entry-content h3 {
  margin: 32px 0 16px 0;
  font-weight: 700;
  color: var(--rl-ink);
}

/* Блок змісту (Table of Contents) */
.rl-toc {
  background: var(--rl-bg, #f8f9fa);
  border: 1px solid var(--rl-border, #e9ecef);
  border-radius: var(--rl-radius, 12px);
  padding: 16px 20px;
}

.rl-toc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--rl-ink);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rl-border);
}

.rl-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rl-toc-item a {
  font-size: 14px;
  color: var(--rl-text);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s ease;
  display: block;
}

.rl-toc-item a:hover {
  color: var(--rl-blue);
}

.rl-toc-h3 {
  padding-left: 14px;
  font-size: 13px;
}

/* Мобільні пристрої (< 992px) */
@media (max-width: 991px) {
  .rl-single-card {
    padding: 20px;
  }

  .rl-single-sidebar {
    order: 1;
  }
  
  .rl-entry-content {
    order: 2;
  }
}

/* Десктопи (>= 992px) */
@media (min-width: 992px) {
  .rl-single-layout {
    grid-template-columns: 1fr 280px;
    gap: 32px;
  }

  .rl-entry-content {
    order: 1;
  }

  .rl-single-sidebar {
    order: 2;
  }

  .rl-sticky-toc {
    position: sticky;
    top: 84px;
  }
}

/* Коментарі */
.rl-comments-wrapper {
  margin-top: 24px;
}

/* ==========================================================================
   Blockquotes & Callouts
   ========================================================================== */
.rl-entry-content blockquote {
  position: relative;
  margin: 28px 0;
  /* Збільшили правий відступ (padding-right: 48px), щоб текст ніколи не заходив на лапки */
  padding: 20px 48px 20px 24px;
  background: var(--rl-bg, #f8f9fa);
  border-left: 4px solid var(--rl-blue, #0056b3);
  border-radius: 0 var(--rl-radius, 12px) var(--rl-radius, 12px) 0;
  font-style: italic;
  color: var(--rl-ink, #1a1d20);
  overflow: hidden; /* Запобігає випаданню елементів за межі картки */
}

/* Декоративні лапки на фоні */
.rl-entry-content blockquote::before {
  content: "“";
  position: absolute;
  right: 12px;
  bottom: -22px; /* Опустили лапки трохи нижче, щоб вони були акуратно в кутку */
  font-size: 70px;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--rl-blue, #0056b3);
  opacity: 0.08; /* Зробили прозорість ще ніжнішою (8% замість 12%) */
  pointer-events: none;
  user-select: none;
}

/* Відступи для абзаців усередині цитати */
.rl-entry-content blockquote p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  z-index: 2; /* Текст завжди знаходиться вище за декоративну лапку */
}

.rl-entry-content blockquote p + p {
  margin-top: 10px;
}

/* Стиль для автора цитати (cite) */
.rl-entry-content blockquote cite,
.rl-entry-content blockquote footer {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--rl-muted, #6c757d);
  position: relative;
  z-index: 2;
}

.rl-entry-content blockquote cite::before,
.rl-entry-content blockquote footer::before {
  content: "— ";
}

/* ==========================================================================
   Lists inside Post Content (ul, ol, li)
   ========================================================================== */

.rl-entry-content ul,
.rl-entry-content ol {
  margin: 20px 0;
  padding: 0;
  list-style: none !important;
}

.rl-entry-content li {
  position: relative;
  font-size: 16px;
  line-height: 1.6;
  color: #2b3036;
  margin-bottom: 8px;
}

/* --- Маркований список 1-го рівня --- */
.rl-entry-content ul {
  padding-left: 20px;
}

.rl-entry-content ul > li::before {
  content: "" !important;
  position: absolute;
  left: -16px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--rl-muted, #6c757d);
  display: block;
}

/* --- Вкладений маркований список 2-го рівня --- */
.rl-entry-content ul ul,
.rl-entry-content ol ul,
.rl-entry-content ul ol {
  margin: 6px 0 6px 0;
  padding-left: 20px;
}

.rl-entry-content ul > li > ul > li::before {
  background-color: transparent !important;
  border: 1px solid var(--rl-muted, #6c757d);
  width: 5px;
  height: 5px;
}

/* --- Нумерований список (OL) --- */
.rl-entry-content ol {
  counter-reset: rl-list-counter;
  padding-left: 32px;
}

.rl-entry-content ol > li {
  counter-increment: rl-list-counter;
}

.rl-entry-content ol > li::before {
  content: counter(rl-list-counter) !important;
  position: absolute;
  left: -32px;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background-color: #eaf0fe;
  color: var(--rl-blue, #0056b3);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   WordPress Pagination
   ========================================================================== */
.rl-pagination-wrapper .navigation.pagination {
  display: flex;
  justify-content: center;
}

.rl-pagination-wrapper .nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rl-pagination-wrapper .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--rl-card);
  border: 1px solid var(--rl-border);
  color: var(--rl-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.rl-pagination-wrapper .page-numbers:hover {
  border-color: var(--rl-blue);
  color: var(--rl-blue);
}

.rl-pagination-wrapper .page-numbers.current {
  background: var(--rl-blue);
  color: #ffffff;
  border-color: var(--rl-blue);
}

/* ==========================================================================
   Search Form Styles
   ========================================================================== */

.rl-search-form-inline {
  width: 100%;
}

.rl-search-input-group {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.rl-search-input-group input[type="search"] {
  width: 100%;
  height: 46px;
  padding: 10px 110px 10px 16px; /* Відступ праворуч під кнопку */
  font-size: 15px;
  color: var(--rl-ink, #1a1d20);
  background-color: var(--rl-card, #ffffff);
  border: 1px solid var(--rl-border, #e9ecef);
  border-radius: var(--rl-radius, 10px);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rl-search-input-group input[type="search"]:focus {
  border-color: var(--rl-blue, #0056b3);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.12);
}

.rl-search-input-group button[type="submit"] {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  background-color: var(--rl-blue, #0056b3);
  color: #ffffff;
  border: none;
  border-radius: calc(var(--rl-radius, 10px) - 3px);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.rl-search-input-group button[type="submit"]:hover {
  background-color: #004494;
}

.rl-search-input-group button[type="submit"] svg {
  flex-shrink: 0;
}

/* Адаптив: на мобільних приховуємо текст кнопочки, залишаємо лише іконку лупи */
@media (max-width: 480px) {
  .rl-search-input-group input[type="search"] {
    padding-right: 54px;
  }
  
  .rl-search-input-group button[type="submit"] span {
    display: none;
  }
  
  .rl-search-input-group button[type="submit"] {
    padding: 0 12px;
  }
}

/* ==========================================================================
   RailLog Comments Section
   ========================================================================== */

.rl-comments-area {
	padding-top: 2rem;
	border-top: 1px solid #e5e7eb;
}

.rl-comments-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #111827;
	margin-bottom: 2rem;
}

/* Список коментарів */
.rl-comment-list, 
.rl-comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rl-comment-list .children {
	margin-left: 2.5rem; /* Відступ для відповідей */
	border-left: 2px solid #f3f4f6;
	padding-left: 1.25rem;
}

.rl-comment-item {
	margin-bottom: 1.75rem;
}

.rl-comment-body {
	background-color: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.25rem;
	transition: border-color 0.2s ease;
	margin-bottom: 8px;
}

.rl-comment-body:hover {
	border-color: #cbd5e1;
}

/* Метадані (Аватар, Автор, Дата) */
.rl-comment-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75rem;
}

.rl-comment-author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.rl-comment-author .rl-avatar {
	border-radius: 50%;
	object-fit: cover;
}

.rl-comment-author .fn {
	font-style: normal;
	font-weight: 600;
	color: #1f2937;
	font-size: 0.95rem;
}

.rl-comment-author .fn a {
	color: inherit;
	text-decoration: none;
}

.rl-comment-metadata a {
	font-size: 0.825rem;
	color: #6b7280;
	text-decoration: none;
}

.rl-comment-metadata a:hover {
	color: #2563eb;
}

/* Контент коментаря */
.rl-comment-content {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #374151;
	margin-bottom: 0.75rem;
}

.rl-comment-content p:last-child {
	margin-bottom: 0;
}

/* Кнопка "Відповісти" */
.rl-comment-reply a {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	color: #2563eb;
	text-decoration: none;
	transition: color 0.15s ease;
}

.rl-comment-reply a:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

/* ==========================================================================
   Форма відправки коментаря (Comment Form)
   ========================================================================== */

.rl-comment-form {
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.5rem;
	margin-top: 2.5rem;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.comment-reply-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #111827;
	margin-bottom: 1.25rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

#cancel-comment-reply-link {
	font-size: 0.85rem;
	font-weight: 500;
	color: #ef4444;
	text-decoration: none;
}

.rl-comment-form p {
	margin-bottom: 1rem;
}

.rl-comment-form label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
	margin-bottom: 0.375rem;
}

.rl-comment-form input[type="text"],
.rl-comment-form input[type="email"],
.rl-comment-form textarea {
	width: 100%;
	padding: 0.625rem 0.875rem;
	font-size: 0.95rem;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background-color: #fff;
	color: #111827;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rl-comment-form input:focus,
.rl-comment-form textarea:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.rl-comment-form .required {
	color: #ef4444;
}

/* Кнопка відправки */
.rl-btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.625rem 1.25rem;
	background-color: #2563eb;
	color: #ffffff;
	font-weight: 600;
	font-size: 0.9rem;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.rl-btn-primary:hover {
	background-color: #1d4ed8;
}

/* Адаптивність для мобільних пристроїв */
@media (max-width: 640px) {
	.rl-comment-list .children {
		margin-left: 1rem;
		padding-left: 0.75rem;
	}
	
	.rl-comment-body {
		padding: 1rem;
	}
}