/* Blog Detail Page Styles */
:root {
  --primary-dark-blue: #1d3e61;
  --primary-green: #70b236;
  --secondary-green: #70b236e6;
  --primary-yellow: #e7cd04;
  --text-gray: #6b7280;
  --text-dark: #374151;
  --border-gray: #e5e7eb;
  --bg-light: #f9fafb;
  --ra-primary-dark-blue: #1d3e61;
  --ra-primary-green: #70b236;
  --ra-text-gray: #6b7280;
  --ra-text-dark: #374151;
  --ra-border-gray: #e5e7eb;
  --ra-bg-light: #f9fafb;
}

@media (max-width: 575px) {
  .breadcrumbs .breadcrumb-item.active {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: bottom;
  }
}

.blog-detail-page {
  background: var(--bg-light);
  min-height: 100vh;
}

/* Blog Article */
.blog-article {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Featured Image */
.blog-featured-image {
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.blog-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article Content */
.blog-article-content {
  padding: 1.5rem 2.5rem;
}

.blog-category-badge {
  margin-bottom: 1.25rem;
}

.category-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(112, 178, 54, 0.1);
  color: var(--primary-green);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.blog-article-title {
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--primary-dark-blue);
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

/* Meta Information */
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-gray);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-gray);
  font-size: 0.9375rem;
}

.meta-item i {
  font-size: 1.25rem;
}

/* Blog Content - Scoped styles for backend HTML */
.blog-content-wrapper {
  margin-bottom: 2.5rem;
}

.blog-content-wrapper h2 {
  color: var(--primary-dark-blue);
  font-size: 1.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-content-wrapper h2:first-child {
  margin-top: 0;
}

.blog-content-wrapper h3 {
  color: var(--primary-dark-blue);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-content-wrapper h4 {
  color: var(--primary-dark-blue);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.blog-content-wrapper p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: var(--text-dark);
  font-size: 1.0625rem;
}

.blog-content-wrapper ul,
.blog-content-wrapper ol {
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.blog-content-wrapper ul {
  list-style-type: disc;
}

.blog-content-wrapper ol {
  list-style-type: decimal;
}

.blog-content-wrapper li {
  margin-bottom: 0.625rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.blog-content-wrapper blockquote {
  border-left: 4px solid var(--primary-green);
  padding: 1.5rem 2rem;
  font-style: italic;
  color: var(--text-gray);
  background-color: var(--bg-light);
  border-radius: 0.5rem;
  line-height: 1.8;
}

.blog-content-wrapper a {
  color: var(--primary-green);
  text-decoration: underline;
  transition: opacity 0.3s;
}

.blog-content-wrapper a:hover {
  opacity: 0.8;
}

.blog-content-wrapper strong,
.blog-content-wrapper b {
  color: var(--primary-dark-blue);
  font-weight: 600;
}

.blog-content-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

/* Tags Section */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}

.tags-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-gray);
  margin-top: 0.5rem;
}

.tags-label i {
  font-size: 1.25rem;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-item {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--border-gray);
  border-radius: 0.375rem;
  color: var(--text-gray);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s;
}

.tag-item:hover {
  background: var(--bg-light);
  border-color: var(--primary-green);
  color: var(--primary-green);
}

/* Share Section */
.blog-share-section {
  margin-bottom: 2.5rem;
}

.share-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-dark-blue);
  margin-bottom: 1rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.share-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s;
  font-size: 1.25rem;
  color: white;
}

.share-btn:hover {
  opacity: 0.8;
}

.share-facebook {
  background: #1877f2;
}

.share-twitter {
  background: #1da1f2;
}

.share-linkedin {
  background: #0077b5;
}

.share-link {
  background: white;
  border: 1px solid var(--border-gray);
  color: var(--text-gray);
}

/* Related Articles */
.related-title {
  font-size: 2rem;
  font-weight: 500;
  color: var(--primary-dark-blue);
  margin-bottom: 1rem;
  text-align: center;
}

.related-article-card {
  display: block;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s;
}

.related-article-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.related-article-image {
  height: 12rem;
  overflow: hidden;
}

.related-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.related-article-card:hover .related-article-image img {
  transform: scale(1.05);
}

.related-article-content {
  padding: 1.25rem;
}

.related-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(112, 178, 54, 0.1);
  color: var(--primary-green);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.related-article-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-dark-blue);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-article-card:hover .related-article-title {
  /* opacity: 0.7; */
}

.related-excerpt {
  color: var(--text-gray);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-gray);
  font-size: 0.875rem;
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 1.5rem;
}

.sidebar-widget {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark-blue);
  margin-bottom: 1rem;
}

/* Category List */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 0.25rem;
}

.category-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.9375rem;
}

.category-link:hover {
  color: var(--primary-green);
  padding-left: 0.5rem;
}

.category-link.active {
  color: var(--primary-green);
  font-weight: 600;
}

.category-link i {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Recent Posts */
.recent-posts-list {
  display: flex;
  flex-direction: column;
}

.recent-post-item {
  display: block;
  text-decoration: none;
  transition: opacity 0.3s;
}

.recent-post-item:hover {
  opacity: 0.8;
}

.recent-post-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.recent-post-date {
  font-size: 0.875rem;
  color: var(--text-gray);
}

/* Responsive */
@media (max-width: 991px) {
  .blog-featured-image {
    height: 400px;
  }

  .blog-article-title {
    font-size: 1.875rem;
  }

  .related-title {
    font-size: 1.75rem;
  }

  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .blog-featured-image {
    height: 300px;
  }

  .blog-article-content {
    padding: 1.5rem 1.5rem;
  }

  .blog-article-title {
    font-size: 1.5rem;
  }

  .blog-content-wrapper h2 {
    font-size: 1.5rem;
  }

  .blog-content-wrapper h3 {
    font-size: 1.25rem;
  }

  .related-title {
    font-size: 1.5rem;
  }

  .tags-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 576px) {
  .blog-article-content {
    padding: 1.5rem 1rem;
  }

  .blog-article-title {
    font-size: 1.375rem;
  }

  .blog-content-wrapper {
    font-size: 0.9375rem;
  }

  .blog-content-wrapper h2 {
    font-size: 1.375rem;
    margin-top: 2rem;
  }

  .blog-content-wrapper h3 {
    font-size: 1.125rem;
  }

  .blog-content-wrapper blockquote {
    padding: 1rem 1.25rem;
  }

  .related-article-image {
    height: 10rem;
  }
}

/* Section Container */
.related-articles-section {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .related-articles-section {
    padding: 2rem 0;
  }
}

/* Header */
.related-articles-section .ra-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.related-articles-section .ra-header-content {
  flex: 1;
}

.related-articles-section .ra-title {
  color: var(--ra-primary-dark-blue);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .related-articles-section .ra-title {
    font-size: 2rem;
  }
}

/* Navigation Buttons */
.related-articles-section .ra-nav {
  display: flex;
  gap: 0.5rem;
}

.related-articles-section .ra-scroll-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--ra-border-gray);
  background-color: white;
  color: var(--ra-text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.related-articles-section .ra-scroll-btn:hover {
  background-color: var(--ra-primary-dark-blue);
  border-color: var(--ra-primary-dark-blue);
  color: white;
}

.related-articles-section .ra-scroll-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Scroll Container */
.related-articles-section .ra-scroll-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1rem 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.related-articles-section .ra-scroll-container::-webkit-scrollbar {
  display: none;
}

/* Article Card */
.related-articles-section .ra-article-card {
  flex: 0 0 auto;
  width: 280px;
  background-color: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .related-articles-section .ra-article-card {
    width: 320px;
  }
}

.related-articles-section .ra-article-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
}

.related-articles-section .ra-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Card Image */
.related-articles-section .ra-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.related-articles-section .ra-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-articles-section .ra-article-card:hover .ra-card-image img {
  transform: scale(1.05);
}

/* Card Content */
.related-articles-section .ra-card-content {
  padding: 1.25rem;
}

.related-articles-section .ra-category {
  display: inline-block;
  background-color: var(--ra-primary-green);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.related-articles-section .ra-article-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.related-articles-section .ra-article-card:hover .ra-article-title {
  color: var(--ra-primary-dark-blue);
}

.related-articles-section .ra-article-excerpt {
  color: var(--ra-text-gray);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article Meta */
.related-articles-section .ra-article-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--ra-text-gray);
  font-size: 0.75rem;
}

.related-articles-section .ra-article-meta svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
  .related-articles-section .ra-header {
    flex-direction: column;
    /* align-items: flex-start; */
    gap: 1rem;
  }

  .related-articles-section .ra-title {
    font-size: 1.5rem;
  }

  .related-articles-section .ra-article-card {
    width: 260px;
  }
}

/* Hide scrollbar for mobile */
@media (max-width: 767.98px) {
  .related-articles-section .ra-scroll-container {
    -webkit-overflow-scrolling: touch;
  }
}
