* {
  box-sizing: border-box;
  font-family: inherit !important;
}

html,
body {
  font-family: 'Times New Roman', Times, serif !important;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: var(--a-color);
  transition: color var(--transition-speed) ease;
}

a:hover {
  color: var(--a-color-hover);
}

.btn:hover {
  color: var(--a-color-hover);
}

/* Body */
body {
  background-color: var(--body-bg);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
  transition: transform var(--transition-speed) ease;
}

iframe {
  width: 100%;
  border-radius: var(--border-radius);
  border: none;
}

/* Navbar */
.navbar {
  background-color: var(--navbar-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar.sticky-top {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  width: 100% !important;
}

.navbar a {
  color: var(--navbar-text) !important;
  transition: color var(--transition-speed) ease;
  font-weight: bold;
}

.navbar-toggler {
  border-color: var(--navbar-text);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-brand span {
  font-size: 18px;
}


.offcanvas {
  background-color: var(--navbar-bg);
}

.nav-link.active {
  font-weight: bold;
  color: var(--navbar-text-hover) !important;
  border-bottom: 2px solid var(--navbar-text);
}

.nav-link:hover {
  color: var(--navbar-text-hover) !important;
  border-bottom: 2px solid var(--navbar-text);
}

.dropdown-menu {
  background-color: var(--posts-list-bg);
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-menu .dropdown-item {
  color: #222 !important;
  transition: all var(--transition-speed) ease;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background-color: #0056b3;
  color: #fff !important;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
}

.dropdown-menu-end[data-bs-popper] {
  right: auto !important
}

/* Search form */
.search-form {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-width var(--transition-speed) ease,
    opacity var(--transition-speed) ease,
    visibility var(--transition-speed) ease;
}

.search-form .form-control {
  margin-right: 10px;
}

.search-form.show {
  max-width: 200px;
  opacity: 1;
  visibility: visible;
}

/* Header */
header {
  position: relative;
}

/* Banner */
.banner {
  height: var(--banner-height);
  margin-top: 59px;
  margin-bottom: 5px;
  object-fit: cover;
  border-radius: 0px 0px 10px 10px;
}

/* Main */
main {
  background-color: var(--main-bg);
  border-radius: var(--bs-border-radius) !important;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-block {
  margin: auto;
  margin-bottom: 15px;
  padding: 15px;
  border-radius: var(--border-radius);
  background-color: var(--sidebar-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-block .title,
.sidebar-block .date {
  color: var(--sidebar-title) !important;
}

.sidebar-block .title:hover,
.sidebar-block .date:hover {
  color: var(--sidebar-title-hover) !important;
}

/* Post */
.post-detail {
  background-color: var(--posts-detail-bg);
  margin-bottom: 10px;
  border-radius: var(--border-radius) !important;
  color: var(--posts-detail-text);
}

.posts-related {
  background-color: var(--posts-related-bg);
  padding: 10px;
  margin-bottom: 10px;
  border-radius: var(--border-radius);
}

.article-list {
  background-color: var(--article-list-bg);
}

.title {
  font-weight: bold;
  font-size: 22px;
  line-height: 1.4;
  color: var(--article-title);
}

.title:hover {
  color: var(--article-title-hover);
}

.excerpt {
  text-align: justify;
}

.sidebar-block article,
.main-posts-list article,
.posts-related article,
.article-list article {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  transition: transform var(--transition-speed) ease;
}

.sidebar-block article:hover,
.main-posts-list article:hover,
.posts-related article:hover,
.article-list article:hover {
  transform: translateY(-2px);
}

.sidebar-block article:hover .thumbnail img,
.main-posts-list article:hover .thumbnail img,
.posts-related article:hover .thumbnail img,
.article-list article:hover .thumbnail img {
  transform: scale(1.05);
}

.main-posts-list article:hover .post-content .title,
.posts-related article:hover .post-content .title,
.article-list article:hover .post-content .title {
  color: var(--article-title-hover);
}

.sidebar-block article:last-child,
.main-posts-list article:last-child,
.posts-related article:last-child,
.article-list article:last-child {
  margin-bottom: 0 !important;
}

.sidebar-block .thumbnail,
.main-posts-list .thumbnail,
.posts-related .thumbnail,
.article-list .thumbnail {
  overflow: hidden;
  position: relative;
  border-radius: var(--border-radius);
  flex-shrink: 0;
}

.sidebar-block .thumbnail img,
.main-posts-list .thumbnail img,
.posts-related .thumbnail img,
.article-list .thumbnail img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  transition: transform var(--transition-speed) ease;
}

.sidebar-block .post-content,
.main-posts-list .post-content,
.posts-related .post-content,
.article-list .post-content {
  flex: 1;
  min-width: 0;
}

.sticky_posts {
  background-color: var(--sticky-posts-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 5px;
  border-radius: var(--border-radius);
  color: var(--sticky-posts-text);
}

.sticky_posts .title {
  color: var(--sticky-posts-text);
}

.sticky_posts time {
  color: var(--sticky-posts-text) !important;
}

/* Pagination */
.pagination {
  margin-top: 20px;
  margin-bottom: 0;
  justify-content: center;
}

.pagination .page-link {
  color: var(--pagination-text);
  background-color: var(--pagination-bg);
  border-color: var(--pagination-bg);
  border-radius: var(--border-radius);
  margin: 0 2px;
  transition: all var(--transition-speed) ease;
}

.pagination .page-link:hover {
  background-color: var(--posts-list-bg);
  border-color: var(--posts-list-bg);
  color: var(--pagination-text);
  transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
  background-color: var(--posts-list-bg);
  border-color: var(--posts-list-bg);
  color: var(--pagination-text);
  font-weight: bold;
}

.pagination .page-item.disabled .page-link {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #6c757d;
}

/* Load More */
.load-more-container {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}

.load-more-btn {
  /* transition: all var(--transition-speed) ease; */
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 25px;
  background-color: var(--load-more-btn-bg) !important;
  border-color: var(--load-more-btn-bg) !important;
  color: var(--load-more-btn-text) !important;
}

.load-more-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.load-more-btn.no-more {
  background-color: var(--no-more-btn-bg) !important;
  border-color: var(--no-more-btn-bg) !important;
  cursor: not-allowed;
}

.load-more-btn .btn-icon {
  margin-right: 8px;
}

.load-more-btn .spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Breadcrumb */
.breadcrumb-wrapper {
  background-color: var(--breadcrumb-bg);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.breadcrumb {
  margin: 0;
  padding: 0;
  background-color: transparent;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.breadcrumb-item+.breadcrumb-item::before {
  content: "›";
  color: #6c757d;
  padding: 0 0.5rem;
}

.breadcrumb a {
  color: var(--breadcrumb-text);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: var(--breadcrumb-text-hover);
}

.breadcrumb-item.active {
  color: #6c757d;
  font-weight: 500;
}

/* Footer */

.footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
}

@media (max-width: 767px) {

  .sidebar-block .thumbnail img,
  .main-posts-list .thumbnail img,
  .posts-related .thumbnail img,
  .article-list .thumbnail img {
    width: 120px;
    height: 80px;
  }

  .sidebar-block .title,
  .main-posts-list .title,
  .posts-related .title,
  .article-list .title {
    font-size: 16px;
  }

  .search-form.show {
    max-width: 150px;
  }

  .load-more-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

@media (min-width: 992px) {
  #main {
    padding-right: 10px !important;
  }

  .main-posts-list .thumbnail img,
  .article-list .thumbnail img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
  }

  iframe {
    height: 450px;
  }

  .sidebar-block article,
  .main-posts-list article,
  .posts-related article,
  .article-list article {
    gap: 20px;
  }

  .banner {
    height: calc(var(--banner-height) + 300px);
    margin-bottom: 20px;
  }
}

@media print {

  .navbar,
  .sidebar,
  .pagination,
  .search-form,
  .load-more-container {
    display: none !important;
  }

  body {
    background: white !important;
  }
}