/* ================================================================
   BLOG — blog.css
   Shared styles for blogs.aspx (listing) and blog.aspx (detail).
   ================================================================ */

/* === Blog card (BlogCardUC) ====================================== */
.blog-card-img {
  width: 240px;
  height: 165px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.blog-card:hover .blog-card-img {
  transform: scale(1.04);
}
.blog-card-body {
  min-width: 0;
}
.blog-card-title a:hover {
  color: var(--red);
}
.blog-card-readmore {
  letter-spacing: 0.05em;
}
@media (max-width: 575.98px) {
  .blog-card {
    flex-direction: column;
  }
  .blog-card-img {
    width: 100%;
    height: 200px;
  }
}

/* === Blog list (blogs.aspx) ====================================== */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* === Pagination ================================================== */
.blog-pager a,
.blog-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}
.blog-pager a:hover {
  border-color: var(--red);
  color: var(--red);
}
.blog-pager span.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* === Sidebar (shared both pages) ================================= */
.blog-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.blog-sidebar-widget {
  padding: 1.5rem;
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.blog-sidebar-title {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dark);
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--red);
}

/* Popular Posts */
.blog-sidebar-post {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--dark);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--gray-light);
}
.blog-sidebar-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.blog-sidebar-post img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.blog-sidebar-post-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.25rem;
  color: var(--dark);
  transition: color 0.2s ease;
}
.blog-sidebar-post:hover .blog-sidebar-post-title {
  color: var(--red);
}
.blog-sidebar-post-date {
  font-size: 0.7rem;
  color: var(--gray);
}
.blog-sidebar-post-date i {
  color: var(--red);
}

/* Categories */
.blog-sidebar-cats {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-sidebar-cats li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--dark);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-light);
  transition: color 0.2s ease;
}
.blog-sidebar-cats li:last-child a {
  border-bottom: none;
  padding-bottom: 0;
}
.blog-sidebar-cats li a::after {
  content: "\f054";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.6rem;
  color: var(--red);
  opacity: 0.6;
}
.blog-sidebar-cats li a:hover {
  color: var(--red);
}

/* Tags */
.blog-sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.blog-sidebar-tags a {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border: 1.5px solid var(--gray-light);
  border-radius: 50px;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}
.blog-sidebar-tags a:hover {
  border-color: var(--red);
  color: var(--red);
}

/* === Blog detail (blog.aspx) ===================================== */

/* Hero image */
.blog-hero-img {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.75rem;
}
.blog-hero-img img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

/* Meta */
.blog-meta {
  font-size: 0.78rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
}
.blog-meta i {
  color: var(--red);
}

/* Title */
.blog-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 1.75rem;
}

/* Body typography */
.blog-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--gray);
}
.blog-body h2,
.blog-body h3,
.blog-body h4 {
  color: var(--dark);
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.blog-body p {
  margin-bottom: 1.25rem;
}
.blog-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1.5rem 0;
}
.blog-body a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-body ul,
.blog-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.blog-body li {
  margin-bottom: 0.4rem;
}
.blog-body blockquote {
  border-left: 4px solid var(--red);
  padding: 0.85rem 1.25rem;
  margin: 1.75rem 0;
  background: var(--off-white);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--dark);
}

/* Tags */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-light);
}
.blog-tags a {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.9rem;
  background: var(--off-white);
  border-radius: 50px;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.blog-tags a:hover {
  background: var(--red);
  color: #fff;
}

/* Prev / Next navigation */
.blog-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-light);
}
.blog-nav-prev,
.blog-nav-next {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 46%;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.4;
}
.blog-nav-prev:hover,
.blog-nav-next:hover {
  color: var(--red);
}
.blog-nav-prev span,
.blog-nav-next span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--gray);
  font-weight: 400;
}
.blog-nav-prev i,
.blog-nav-next i {
  flex-shrink: 0;
  color: var(--red);
  margin-top: 2px;
}
.blog-nav-next {
  margin-left: auto;
  text-align: right;
  flex-direction: row-reverse;
}
@media (max-width: 992px) {
  .blog-breadcrum .breadcrumb-item.active {
    min-width: 0;
    max-width: 20ch;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
