/* Blog Page – NVIDIA-inspired sectioned layout + See-All list pages */

/* ==========================================================
   BANNER
   ========================================================== */
.blog-banner {
  min-height: 22vw;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0d1117 0%, #0a2a4a 100%);
  position: relative;
  overflow: hidden;
}
.blog-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url(/img/blog/blog-banner.jpg) center center / cover no-repeat;
  opacity: 0.18;
}
.blog-banner__inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  text-align: center;
}
.blog-banner h1 {
  font-size: 4.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: -1rem;
  letter-spacing: -0.02em;
}

@media (max-width: 1024px) {
  .blog-banner h1 {
    font-size: 4rem;
  }
}
@media (max-width: 768px) {
  .blog-banner {
    min-height: 30vw;
  }
  .blog-banner h1 {
    font-size: 3.5rem;
  }
}
@media (max-width: 620px) {
  .blog-banner h1 {
    font-size: 2.5rem;
  }
}
@media (max-width: 480px) {
  .blog-banner {
    min-height: 42vw;
  }
}

/* ==========================================================
   STICKY CATEGORY NAV
   ========================================================== */
.blog-cat-nav {
  background: #fff;
  border-bottom: 1px solid #e4e8ef;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.blog-cat-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.blog-cat-nav__inner::-webkit-scrollbar {
  display: none;
}
.blog-cat-nav__item {
  display: inline-block;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.blog-cat-nav__item:hover {
  color: #00aeef;
  border-bottom-color: #00aeef;
}
.blog-cat-nav__item.active {
  color: #00aeef;
  border-bottom-color: #00aeef;
}

/* ==========================================================
   SUB-CATEGORY FILTER (secondary, within a section)
   ========================================================== */
.blog-subcat-filter {
  background: #fff;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.blog-subcat-filter__item {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #606672;
  background: #eef3f8;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.blog-subcat-filter__item:hover {
  background: #00aeef;
  color: #fff;
}
.blog-subcat-filter__item.active {
  background: #00aeef;
  color: #fff;
}

/* ==========================================================
   PAGE BODY
   ========================================================== */
.blog-page {
  background: #f4f6f9;
  padding-bottom: 4rem;
}

/* ==========================================================
   SECTIONS
   ========================================================== */
.blog-section {
  padding: 3rem 0 2.5rem;
}
.blog-section + .blog-section {
  border-top: 1px solid #dde3ea;
}
.blog-page > .blog-section:nth-of-type(odd) {
  background: #fff;
}
.blog-page > .blog-section:nth-of-type(even) {
  background: #f7f7f7;
}
.blog-section__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.blog-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}
.blog-section__title {
  font-size: 2.375rem;
  font-weight: 600;
  color: #0d1117;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.blog-section__title::after {
  content: '';
  display: block;
  width: 2.25rem;
  height: 3px;
  background: #00aeef;
  border-radius: 2px;
  margin-top: 0.45rem;
}
.blog-section__see-all {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #00aeef;
  text-decoration: none;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-bottom: 3px;
  white-space: nowrap;
  transition: gap 0.18s;
}
.blog-section__see-all:hover {
  gap: 0.5rem;
}

/* ==========================================================
   RECENT SECTION – hero + stacked cards
   ========================================================== */
.blog-recent-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}
/* ==========================================================
   CATEGORY GRID – 4 cards per row
   ========================================================== */
.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ==========================================================
   CARD
   ========================================================== */
.blog-card {
  background: #fff;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}
.blog-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.05);
  transform: translateY(-4px);
}
.blog-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.blog-card__img {
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: #c5d4e0 center center / cover no-repeat;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}
.blog-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.18));
  pointer-events: none;
}
.blog-card__tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: #00aeef;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  z-index: 1;
}
.blog-card__body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.blog-card:hover .blog-card__body {
  transform: translate(0, -2.75rem);
  box-shadow: 0 -12px 16px rgba(15, 23, 42, 0.06), 0 -24px 24px rgba(15, 23, 42, 0.08);
}
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.blog-card__date {
  font-size: 0.8125rem;
  color: #9aa0ab;
  font-weight: 400;
}
.blog-card__views {
  font-size: 0.8125rem;
  color: #b0b6bf;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.blog-card__views svg {
  width: 14px;
  height: 14px;
  fill: #b0b6bf;
}
.blog-card__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.18s;
}
.blog-card:hover .blog-card__title {
  color: #00aeef;
}
.blog-card__excerpt {
  font-size: 0.9375rem;
  color: #606672;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 1rem;
}
.blog-card__more {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #00aeef;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.75rem;
  padding: 0 1.5rem;
  background: #f4f4f4;
  opacity: 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}
.blog-card__more i {
  display: block;
  width: 1rem;
  height: 1rem;
  background: center center / contain no-repeat;
  background-image: url(/img/icon/icon-arrow-primary-s.png);
}
.blog-card:hover .blog-card__more {
  animation-delay: 0s;
  animation-duration: 0.4s;
  animation-name: fadeInUp;
  animation-timing-function: ease;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

/* ==========================================================
   EMPTY STATE
   ========================================================== */
.blog-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: #9aa0ab;
  background: #fff;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
  .blog-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-recent-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .blog-recent-layout .blog-card:first-child {
    grid-column: 1 / 3;
    grid-row: auto;
  }
  .blog-recent-layout .blog-card:first-child .blog-card__img {
    padding-bottom: 50%;
  }
  .blog-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-section {
    padding: 2rem 0 1.75rem;
  }
}

@media (max-width: 560px) {
  .blog-recent-layout,
  .blog-card-grid {
    grid-template-columns: 1fr;
  }
  .blog-recent-layout .blog-card:first-child {
    grid-column: auto;
  }
}

/* ==========================================================
   SECTION CAROUSEL NAV
   ========================================================== */
.blog-section__controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.blog-nav-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid #dde3ea;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  color: #444;
  flex-shrink: 0;
  padding: 0;
}
.blog-nav-btn:hover {
  background: #00aeef;
  border-color: #00aeef;
  color: #fff;
}
.blog-nav-btn.is-disabled {
  opacity: 0.28;
  cursor: default;
  pointer-events: none;
}
.blog-nav-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  display: block;
}
/* equal-height owl items */
.blog-section-carousel .owl-stage {
  display: flex;
}
.blog-section-carousel .owl-item {
  display: flex;
}
.blog-section-carousel .owl-item > .blog-card {
  width: 100%;
}
/* .owl-stage-outer clips overflow (needed for horizontal sliding), which was
   also cutting off the card box-shadow/hover-lift above and below the row;
   pad it vertically and cancel the layout shift with an equal negative margin
   so only the clip region grows, not the horizontal (slide) clipping. */
.blog-section-carousel .owl-stage-outer {
  padding: 28px 0;
  margin: -28px 0;
}

/* ==========================================================
   DEMO LIST PAGE (See All pages — grid + load-more)
   ========================================================== */

/* Page header — small version of blog-banner */
.blog-list-header {
  background: linear-gradient(135deg, #0d1117 0%, #0a2a4a 100%);
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0;
}
.blog-list-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url(/img/blog/blog-banner.jpg) center center / cover no-repeat;
  opacity: 0.14;
}
.blog-list-header__inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.blog-list-breadcrumb {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.6rem;
}
.blog-list-breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}
.blog-list-breadcrumb a:hover {
  color: #00aeef;
}
.blog-list-breadcrumb span {
  margin: 0 0.4rem;
}
.blog-list-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0;
}
.blog-list-count {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.35rem;
}

/* Page body */
.blog-list-page {
  background: #f4f6f9;
  padding: 2.5rem 0 4rem;
  min-height: 60vh;
}
.blog-list-page__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Post row — horizontal card */
.blog-post-list {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.blog-post-row {
  display: flex;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.blog-post-row:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.11);
  transform: translateY(-2px);
}

/* Left: thumbnail */
.blog-post-row__img {
  width: 300px;
  flex-shrink: 0;
  background: #c5d4e0 center center / cover no-repeat;
  position: relative;
  min-height: 180px;
}
.blog-post-row__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 70%, rgba(0,0,0,0.04));
  pointer-events: none;
}
.blog-post-row__tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: #00aeef;
  color: #fff;
  font-size: 0.675rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 3px;
}

/* Right: content */
.blog-post-row__body {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}
.blog-post-row__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.blog-post-row__date {
  font-size: 0.78rem;
  color: #9aa0ab;
}
.blog-post-row__views {
  font-size: 0.78rem;
  color: #b0b6bf;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.blog-post-row__views svg {
  width: 13px;
  height: 13px;
  fill: #b0b6bf;
}
.blog-post-row__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111;
  line-height: 1.38;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.18s;
}
.blog-post-row:hover .blog-post-row__title {
  color: #00aeef;
}
.blog-post-row__excerpt {
  font-size: 0.875rem;
  color: #5a6272;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 0.875rem;
}
.blog-post-row__more {
  font-size: 0.75rem;
  font-weight: 700;
  color: #00aeef;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.18s;
}
.blog-post-row:hover .blog-post-row__more {
  gap: 0.5rem;
}

/* Load more button */
.blog-load-more-wrap {
  text-align: center;
  margin-top: 2.5rem;
}
.blog-btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2.25rem;
  background: transparent;
  border: 2px solid #00aeef;
  color: #00aeef;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.blog-btn-load-more:hover {
  background: #00aeef;
  color: #fff;
}
.blog-btn-load-more:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.blog-btn-load-more.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: blog-spin 0.7s linear infinite;
}
@keyframes blog-spin {
  to { transform: rotate(360deg); }
}

.blog-list-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #9aa0ab;
  background: #fff;
  border-radius: 10px;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-post-row__img {
    width: 220px;
    min-height: 140px;
  }
  .blog-post-row__body {
    padding: 1.125rem 1.25rem;
  }
  .blog-post-row__title {
    font-size: 1rem;
  }
  .blog-list-header h1 {
    font-size: 1.75rem;
  }
}
@media (max-width: 560px) {
  .blog-post-row {
    flex-direction: column;
  }
  .blog-post-row__img {
    width: 100%;
    min-height: 200px;
  }
}

/* ==========================================================
   DEMO DETAIL PAGE
   ========================================================== */
.blog-detail-page {
  background: #f4f6f9;
  padding: 2.5rem 0 4rem;
}
.blog-detail-page__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.blog-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.6rem;
}
.blog-detail-meta a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-decoration: none;
}
.blog-detail-meta a:hover {
  color: #00aeef;
}
.blog-detail-meta span.sep {
  color: rgba(255, 255, 255, 0.3);
}
.blog-detail-cover {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 2rem;
  display: block;
}
.blog-detail-content {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  color: #333;
  line-height: 1.75;
  font-size: 1rem;
}
.blog-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.blog-detail-tags {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.blog-detail-tags b {
  color: #606672;
  font-size: 0.875rem;
}
.blog-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-tag-chip {
  display: inline-block;
  background: #eef3f8;
  color: #00aeef;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}
.blog-tag-chip:hover {
  background: #00aeef;
  color: #fff;
}
.blog-detail-share {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e4e8ef;
}
