/* ============================================
   BLOG DETAIL PAGE - REDESIGNED
   ============================================ */

/* --- Reading Progress Bar --- */
.blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #41328f, #6c5ce7, #a29bfe);
  z-index: 9999;
  transition: width 0.15s ease-out;
  border-radius: 0 2px 2px 0;
}

/* --- Hero Section --- */
.blog-detail-hero {
  position: relative;
  height: 520px;
  overflow: hidden;
}

.blog-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(17, 24, 39, 0.3) 0%,
    rgba(17, 24, 39, 0.1) 40%,
    rgba(17, 24, 39, 0.7) 100%
  );
  z-index: 1;
}

.blog-detail-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--paper), transparent);
  z-index: 2;
}

/* --- Back Button Floating --- */
.blog-back-btn {
  position: fixed;
  top: 90px;
  left: 30px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 1rem;
  z-index: 100;
  transition: all 0.3s ease;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.blog-back-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(65, 50, 143, 0.35);
}

/* --- Main Content Area --- */
.blog-detail-main {
  padding: 0 0 70px;
}

.blog-detail-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Title Card --- */
.blog-title-card {
  background: #fff;
  border-radius: 24px;
  padding: 40px 44px;
  margin-top: -80px;
  position: relative;
  z-index: 3;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.blog-title-card h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--ink);
}

.blog-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.blog-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  color: var(--muted);
}

.blog-meta-item i {
  color: var(--primary);
  font-size: 0.85rem;
}

.blog-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line);
}

.blog-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(65, 50, 143, 0.06);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

/* --- Article Content --- */
.blog-article {
  margin-top: 40px;
}

.blog-content {
  font-size: 1.08rem;
  line-height: 1.85;
}

.blog-content h2 {
  margin-top: 45px;
  margin-bottom: 16px;
  font-size: 1.75rem;
  color: var(--ink);
  position: relative;
  padding-left: 18px;
}

.blog-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 28px;
  border-radius: 2px;
  background: linear-gradient(180deg, #41328f, #6c5ce7);
}

.blog-content h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 1.35rem;
  color: var(--ink);
}

.blog-content p {
  line-height: 1.9;
  color: #475569;
  margin-bottom: 20px;
}

.blog-content img {
  width: 100%;
  border-radius: 18px;
  margin: 35px 0;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.blog-content img:hover {
  transform: scale(1.01);
}

.blog-content ul,
.blog-content ol {
  margin: 18px 0;
  padding-left: 26px;
  color: #475569;
}

.blog-content li {
  margin-bottom: 10px;
  line-height: 1.75;
}

.blog-content blockquote {
  margin: 40px 0;
  padding: 30px 32px;
  border: none;
  border-left: none;
  background: linear-gradient(135deg, rgba(65,50,143,0.04), rgba(108,92,231,0.08));
  border-radius: 18px;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.75;
  position: relative;
}

.blog-content blockquote::before {
  content: '\201C';
  position: absolute;
  top: 14px;
  left: 22px;
  font-size: 3.5rem;
  color: var(--primary);
  opacity: 0.25;
  line-height: 1;
  font-family: Georgia, serif;
}

.blog-content blockquote p {
  padding-left: 30px;
  margin-bottom: 0;
}

.blog-content a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(65, 50, 143, 0.3);
  transition: all 0.25s;
}

.blog-content a:hover {
  text-decoration-color: var(--primary);
}

/* --- Share Bar --- */
.blog-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 50px;
  padding: 24px 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.blog-share-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.blog-share-links {
  display: flex;
  gap: 10px;
}

.blog-share-link {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.95rem;
  transition: all 0.25s ease;
  text-decoration: none;
}

.blog-share-link:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(65, 50, 143, 0.3);
}

/* --- CTA Section --- */
.blog-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #41328f 0%, #111827 100%);
  padding: 70px 0;
}

.blog-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(108,92,231,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.blog-cta::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(162,155,254,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.blog-cta .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.blog-cta h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: #fff;
  margin-bottom: 14px;
}

.blog-cta p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 580px;
  margin: 0 auto 30px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.blog-cta .btn {
  min-height: 50px;
  padding: 0 28px;
  font-size: 0.95rem;
}

.blog-cta .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.blog-cta .btn-secondary:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

/* --- Related Blogs --- */
.related-blogs {
  padding: 70px 0 80px;
  background: #fff;
}

.related-section-head {
  text-align: center;
  margin-bottom: 44px;
}

.related-section-head .eyebrow {
  display: inline-block;
  margin-bottom: 10px;
}

.related-section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--ink);
  margin-bottom: 6px;
}

.related-section-head p {
  color: var(--muted);
  font-size: 1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.related-card {
  background: var(--paper);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.35s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.related-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 36px rgba(65, 50, 143, 0.14);
}

.related-card-image {
  overflow: hidden;
  height: 190px;
  position: relative;
}

.related-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-card:hover .related-card-image img {
  transform: scale(1.08);
}

.related-card-date {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(65, 50, 143, 0.3);
}

.related-card-body {
  padding: 20px 22px 24px;
}

.related-card-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-excerpt {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.related-card-read {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.3s ease;
}

.related-card:hover .related-card-read {
  gap: 9px;
}

/* ============================================
   RESPONSIVE - TABLET (max-width: 980px)
   ============================================ */
@media (max-width: 980px) {
  .blog-detail-hero {
    height: 400px;
  }

  .blog-title-card {
    padding: 32px 30px;
    margin-top: -60px;
  }

  .blog-back-btn {
    top: 80px;
    left: 16px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

  .blog-share-bar {
    flex-direction: column;
    gap: 14px;
  }
}

/* ============================================
   RESPONSIVE - MOBILE (max-width: 640px)
   ============================================ */
@media (max-width: 640px) {
  .blog-detail-hero {
    height: 280px;
  }

  .blog-detail-hero::after {
    height: 60px;
  }

  .blog-back-btn {
    top: 70px;
    left: 12px;
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }

  .blog-title-card {
    padding: 24px 20px;
    margin-top: -50px;
    border-radius: 20px;
  }

  .blog-title-card h1 {
    font-size: 1.35rem;
  }

  .blog-meta-row {
    gap: 10px;
  }

  .blog-meta-item {
    font-size: 0.82rem;
  }

  .blog-content {
    font-size: 1rem;
  }

  .blog-content h2 {
    font-size: 1.4rem;
    padding-left: 14px;
  }

  .blog-content h2::before {
    height: 22px;
  }

  .blog-content h3 {
    font-size: 1.15rem;
  }

  .blog-content blockquote {
    padding: 22px 20px;
    font-size: 1rem;
  }

  .blog-content blockquote::before {
    font-size: 2.5rem;
    top: 10px;
    left: 14px;
  }

  .blog-content blockquote p {
    padding-left: 20px;
  }

  .blog-share-bar {
    padding: 18px 20px;
    border-radius: 14px;
  }

  .blog-cta {
    padding: 50px 0;
  }

  .related-blogs {
    padding: 50px 0 60px;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .related-card-image {
    height: 180px;
  }
}
