/* ================================================
   BLOG — Hero
   ================================================ */

.blog-hero {
  margin-top: 68px;
  padding: 80px 20px 60px;
  text-align: center;
  background: var(--bg-color);
  border-bottom: 1px solid rgba(128,128,128,0.15);
}

.blog-hero-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.blog-hero-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.15;
}

.blog-hero-sub {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-color);
  opacity: 0.75;
  max-width: 560px;
  line-height: 1.6;
}

/* Search */
.blog-search-form {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 540px;
  margin-top: 8px;
}

.blog-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(128,128,128,0.3);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--bg-color);
}

.blog-search-wrap i {
  font-size: 18px;
  color: var(--text-color);
  opacity: 0.5;
  flex-shrink: 0;
}

.blog-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-color);
  padding: 12px 0;
}

.blog-search-input::placeholder {
  color: var(--text-color);
  opacity: 0.45;
}

.blog-search-btn {
  padding: 12px 26px;
  border: none;
  border-radius: 8px;
  background: var(--red--color);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.blog-search-btn:hover {
  background: #1d4ed8;
}


/* ================================================
   BLOG — Body layout (main + sidebar)
   ================================================ */

.blog-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 48px 0 80px;
  align-items: start;
}

/* Section title */
.blog-section-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(128,128,128,0.15);
}


/* ================================================
   BLOG — Card grid
   ================================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-grid--related {
  margin-top: 20px;
}

.blog-card {
  background: var(--bg-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

/* Card image */
.blog-card-img-link {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}

.blog-card-img-placeholder {
  object-position: center;
  filter: brightness(0.85);
}

.blog-card:hover .blog-card-img {
  transform: scale(1.04);
}

/* Category tag on card */
.blog-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.92);
  color: #111;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

.blog-card-tag--light {
  position: static;
  display: inline-block;
  margin-bottom: 12px;
}

/* Card body */
.blog-card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blog-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.45;
}

.blog-card-title a {
  color: inherit;
}

.blog-card-title a:hover {
  color: var(--red--color);
}

.blog-card-excerpt {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-color);
  opacity: 0.75;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(128,128,128,0.12);
  font-size: 12px;
}

.blog-card-date {
  color: var(--text-color);
  opacity: 0.55;
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-card-read {
  color: var(--red--color);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.blog-card-read:hover {
  gap: 8px;
}

/* Empty state */
.blog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-color);
  opacity: 0.5;
}

.blog-empty i {
  font-size: 48px;
}


/* ================================================
   BLOG — Sidebar
   ================================================ */

.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: sticky;
  top: 100px;
}



.sidebar-heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 10px;
}

.sidebar-divider {
  height: 1.5px;
  background: rgba(128,128,128,0.2);
  margin-bottom: 18px;
}

.sidebar-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
  color: var(--text-color);
  transition: opacity 0.2s;
}

.sidebar-item:hover {
  opacity: 0.75;
}

.sidebar-item-img {
  flex-shrink: 0;
  width: 72px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
}

.sidebar-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-item-date {
  font-size: 11px;
  color: var(--text-color);
  opacity: 0.5;
}

.sidebar-item-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-color);
}

.sidebar-empty {
  font-size: 13px;
  opacity: 0.5;
}


/* ================================================
   BLOG — Detail Hero
   ================================================ */

.blog-detail-hero {
  margin-top: 68px;
  position: relative;
  width: 100%;
  height: 55vh;
  min-height: 320px;
  overflow: hidden;
}

.blog-detail-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-detail-cover-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a0a04, #3d1a10);
}

.blog-detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
  display: flex;
  align-items: flex-end;
}

.blog-detail-hero-inner {
  width: 90%;
  margin: 0 auto;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-detail-title {
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  max-width: 800px;
}

.blog-detail-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.blog-detail-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}


/* ================================================
   BLOG — Article content
   ================================================ */

.blog-article {
  color: var(--text-color);
}

.blog-article-excerpt {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-color);
  opacity: 0.85;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid rgba(128,128,128,0.15);
}

.blog-article-content {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-color);
}

.blog-article-content p {
  margin-bottom: 20px;
}

/* Back button */
.blog-back {
  margin: 40px 0;
}

.blog-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1.5px solid rgba(128,128,128,0.3);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  transition: background 0.2s, border-color 0.2s;
}

.blog-back-btn:hover {
  background: var(--secondary-color);
  border-color: transparent;
}

/* Related */
.blog-related {
  margin-top: 20px;
  padding-top: 32px;
  border-top: 2px solid rgba(128,128,128,0.15);
}

.blog-related-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 24px;
}


/* ================================================
   RESPONSIVE
   ================================================ */

/* ≤ 1100px — tighten sidebar */
@media (max-width: 1100px) {
  .blog-body {
    grid-template-columns: 1fr 260px;
    gap: 32px;
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ≤ 900px — stack sidebar below */
@media (max-width: 900px) {
  .blog-body {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ≤ 640px — single column */
@media (max-width: 640px) {
  .blog-hero {
    padding: 60px 16px 40px;
  }

  .blog-search-form {
    flex-direction: column;
  }

  .blog-search-btn {
    width: 100%;
    padding: 13px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    grid-template-columns: 1fr;
  }

  .blog-detail-hero {
    height: 45vh;
  }

  .blog-detail-hero-inner {
    padding-bottom: 24px;
  }

  .blog-detail-meta {
    flex-direction: column;
    gap: 6px;
  }
}
