/* ═══════════════════════════════════════════════
   BLOG DETAIL PAGE — POLISHED DESIGN
   ═══════════════════════════════════════════════ */

/* ─── Reading Progress Bar ─── */
.blog-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #f2d397, #e8b84b, #f2d397);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(242,211,151,0.5);
}

/* ─── Hero Section ─── */
.blog-hero-section {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 40%, #2c3e50 100%);
  padding: 3rem 1rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.blog-hero-section::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(242,211,151,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(242,211,151,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.blog-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
  text-decoration: none;
  transition: color 0.25s;
}
.blog-breadcrumb:hover {
  color: #f2d397;
}
.blog-breadcrumb i {
  font-size: 0.75rem;
  transition: transform 0.25s;
}
.blog-breadcrumb:hover i {
  transform: translateX(-3px);
}
.blog-hero-inner h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.blog-hero-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.blog-hero-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #cbd5e1;
}
.blog-hero-meta .meta-item i {
  color: #f2d397;
  font-size: 0.8rem;
}
.blog-hero-meta .meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(242,211,151,0.15);
  color: #f2d397;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(242,211,151,0.25);
}

/* ─── Article Body ─── */
.blog-detail-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* ─── Featured Image ─── */
.blog-image-wrapper {
  margin: -1.5rem auto 2.5rem;
  max-width: 800px;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}
.blog-featured-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: top;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  display: block;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.blog-featured-image:hover {
  transform: scale(1.01);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

/* ─── Blog Content ─── */
.blog-detail-content {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 3rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.03);
  margin-bottom: 2rem;
  line-height: 1.85;
  font-size: 1.05rem;
  color: #334155;
  border: 1px solid rgba(0,0,0,0.04);
}
.blog-detail-content h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid #f2d397;
  position: relative;
}
.blog-detail-content h2:first-child {
  margin-top: 0;
}
.blog-detail-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}
.blog-detail-content p {
  margin-bottom: 1.15rem;
  color: #475569;
}
.blog-detail-content ul,
.blog-detail-content ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}
.blog-detail-content ul {
  list-style: none;
  padding-left: 0;
}
.blog-detail-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  color: #475569;
  line-height: 1.75;
}
.blog-detail-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 7px;
  height: 7px;
  background: #f2d397;
  border-radius: 50%;
}
.blog-detail-content ol {
  list-style: none;
  padding-left: 0;
  counter-reset: ol-counter;
}
.blog-detail-content ol li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.65rem;
  color: #475569;
  line-height: 1.75;
  counter-increment: ol-counter;
}
.blog-detail-content ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 22px;
  height: 22px;
  background: #2c3e50;
  color: #f2d397;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-detail-content strong {
  color: #1e293b;
  font-weight: 700;
}
.blog-detail-content a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px solid rgba(37,99,235,0.3);
  transition: color 0.2s, border-color 0.2s;
}
.blog-detail-content a:hover {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}
.blog-detail-content blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #f2d397;
  background: #fefcf3;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #475569;
}
.blog-detail-content code {
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: #e11d48;
}
.blog-detail-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
}
.blog-detail-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.blog-detail-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1rem 0;
}

/* ─── Share & Actions Bar ─── */
.blog-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}
.blog-share-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.blog-share-group span {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}
.blog-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}
.blog-share-btn:hover {
  background: #2c3e50;
  color: #f2d397;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44,62,80,0.25);
}
.blog-share-btn.copied {
  background: #15803d;
  color: #fff;
}
.blog-read-info {
  font-size: 0.82rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.blog-read-info i {
  color: #f2d397;
}

/* ─── Recent Posts ─── */
.blog-recent-section {
  margin-top: 1rem;
  padding-top: 2.5rem;
}
.blog-recent-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.blog-recent-section h3::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #f2d397, transparent);
  margin-left: 0.5rem;
}
.blog-recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.blog-recent-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.04);
}
.blog-recent-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}
.blog-recent-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: top;
  transition: transform 0.4s ease;
}
.blog-recent-card:hover img {
  transform: scale(1.05);
}
.blog-recent-card-body {
  padding: 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-recent-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}
.blog-recent-card p {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  flex: 1;
}
.blog-recent-card .read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2c3e50;
  margin-top: 0.6rem;
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}
.blog-recent-card:hover .read-more-link {
  color: #f2d397;
  gap: 0.5rem;
}

/* ─── Back to Top Button ─── */
.blog-back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: #2c3e50;
  color: #f2d397;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(44,62,80,0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.35s ease;
  z-index: 99;
}
.blog-back-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.blog-back-top:hover {
  background: #f2d397;
  color: #2c3e50;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(242,211,151,0.4);
}

/* ─── Animations ─── */
.anim-hidden {
  opacity: 0;
  transform: translateY(25px);
}
.anim-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-hero-title {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.65s ease 0.1s forwards;
}
.anim-hero-meta {
  opacity: 0;
  transform: translateY(15px);
  animation: slideUp 0.55s ease 0.3s forwards;
}
.anim-hero-breadcrumb {
  opacity: 0;
  animation: fadeIn 0.5s ease 0.05s forwards;
}
.anim-image {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  animation: imageReveal 0.7s ease 0.4s forwards;
}

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}
@keyframes imageReveal {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .blog-hero-section {
    padding: 2rem 1rem 2rem;
  }
  .blog-hero-inner h1 {
    font-size: 1.7rem;
  }
  .blog-detail-content {
    padding: 1.5rem 1.25rem;
    font-size: 0.98rem;
  }
  .blog-recent-grid {
    grid-template-columns: 1fr;
  }
  .blog-actions-bar {
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
  }
  .blog-image-wrapper {
    margin-top: -1rem;
  }
}
@media (max-width: 480px) {
  .blog-hero-inner h1 {
    font-size: 1.4rem;
  }
  .blog-detail-content {
    padding: 1.25rem 1rem;
    font-size: 0.92rem;
  }
  .blog-hero-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  .blog-back-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
  }
}
