/* =============================================
   BLOG PAGE SPECIFIC STYLES
   ============================================= */
.blog-page {
  position: relative;
  min-height: 100vh;
  background-color: #000000;
  background-image: url('../images/projects_bg.png'), radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: cover, 22px 22px;
  background-position: center, center;
  background-repeat: no-repeat, repeat;
  padding: 0 0 100px;
  overflow-x: hidden;
}

.blog-page__header {
  margin-top: 64px;
  margin-bottom: 48px;
}

.blog-page__title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--color-white);
  margin: 0;
}

/* =============================================
   BLOG GRID LAYOUT
   ============================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 32px;
  padding: 20px 0;
}

/* =============================================
   BLOG CARD STYLING
   ============================================= */
.blog-card {
  width: 100%;
}

.blog-card__image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.15;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.blog-card__image-container:hover .blog-card__image {
  transform: scale(1.05);
}

/* Dark gradient overlay at the bottom for text readability */
.blog-card__image-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Hover overlay showing + icon */
.blog-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 2;
}

.blog-card__image-container:hover .blog-card__overlay {
  opacity: 1;
  visibility: visible;
}

.blog-card__plus {
  color: var(--color-white);
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
}

/* Date Badge styling */
.blog-card__date {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  z-index: 3;
}

/* Blog card link wrapper */
.blog-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Blog Title styling */
.blog-card__title {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  color: var(--color-white);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  z-index: 3;
}

/* =============================================
   MOBILE RESPONSIVENESS OVERRIDES
   ============================================= */
@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .blog-card__image-container {
    aspect-ratio: 1 / 1.1;
  }
  
  .blog-card__title {
    bottom: 20px;
    left: 20px;
    right: 20px;
  }
}

/* =============================================
   BLOG DETAIL PAGE
   ============================================= */
.blog-detail-page {
  padding-bottom: 0;
  background-image: none;
  background-color: #000000;
}

/* --- Section 1: Hero --- */
.blog-hero {
  position: relative;
  width: 100%;
  min-height: 520px;
  height: 65vh;
  max-height: 680px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.blog-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.75) 100%
  );
  z-index: 1;
}

.blog-hero__back-btn {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  color: var(--color-white);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--transition), border-color var(--transition);
}

.blog-hero__back-btn:hover {
  background: rgba(0, 0, 0, 0.65);
  border-color: rgba(255, 255, 255, 0.3);
}

.blog-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px 48px;
}

.blog-hero__title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.25;
  margin: 0 0 20px;
  max-width: 700px;
  letter-spacing: -0.02em;
}

.blog-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-hero__tag {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  color: var(--color-white);
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* --- Section 2: Content + Sidebar --- */
.blog-detail {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  padding: 64px 0 80px;
  align-items: start;
}

.blog-detail__heading {
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

.blog-detail__subheading {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.35;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
}

.blog-detail__body p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-gray-300);
  margin: 0 0 20px;
}

.blog-detail__list {
  list-style: disc;
  padding-left: 24px;
  margin: 0 0 20px;
}

.blog-detail__list li {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-gray-300);
  margin-bottom: 8px;
}

.blog-detail__list li strong {
  font-weight: 600;
  color: var(--color-white);
}

.blog-detail__text {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-gray-300);
}

/* Sidebar metadata */
.blog-detail__sidebar {
  position: sticky;
  top: 32px;
}

.blog-detail__meta {
  border-top: 1px dashed #333333;
  border-bottom: 1px dashed #333333;
}

.blog-detail__meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px dashed #333333;
}

.blog-detail__meta-row:last-child {
  border-bottom: none;
}

.blog-detail__meta-label {
  font-size: 16px;
  font-weight: 400;
  color: #a0a0a0;
}

.blog-detail__meta-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-white);
  text-align: right;
}

/* --- Section 3: Related Posts --- */
.related-posts {
  padding: 0 0 80px;
}

.related-posts__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--color-white);
  margin: 0 0 40px;
  letter-spacing: -0.02em;
}

.blog-post__not-found {
  padding: 80px 0;
  text-align: center;
}

/* --- Detail page responsive --- */
@media (max-width: 992px) {
  .blog-detail {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 48px 0 64px;
  }

  .blog-detail__sidebar {
    position: static;
    max-width: 400px;
  }

  .blog-hero {
    min-height: 420px;
    height: 55vh;
  }

  .blog-hero__content {
    padding-bottom: 36px;
  }
}

@media (max-width: 600px) {
  .blog-hero {
    min-height: 360px;
    height: 50vh;
  }

  .blog-hero__back-btn {
    top: 20px;
    font-size: 13px;
    padding: 8px 16px;
  }

  .blog-hero__content {
    padding-bottom: 28px;
  }

  .blog-hero__tag {
    font-size: 12px;
    padding: 6px 12px;
  }

  .blog-detail {
    padding: 36px 0 48px;
    gap: 36px;
  }

  .blog-detail__body p,
  .blog-detail__list li,
  .blog-detail__text {
    font-size: 18px;
  }

  .related-posts {
    padding-bottom: 48px;
  }

  .related-posts__title {
    margin-bottom: 28px;
  }
}
