/* Blog Detail Page Styles */

/* ===== Hero Section ===== */
.blog-detail-hero {
  position: relative;
  background: linear-gradient(135deg, #2d3748 0%, #5340c7 100%);
  padding: 80px 0 60px;
  overflow: hidden;
}

.blog-detail-hero .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.blog-detail-hero .hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 850px;
  margin: 0 auto;
}

/* Breadcrumb */
.blog-detail-hero .breadcrumb-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.blog-detail-hero .breadcrumb-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.blog-detail-hero .breadcrumb-nav a:hover {
  color: #fff;
}

.blog-detail-hero .breadcrumb-nav span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
}

.blog-detail-hero .breadcrumb-nav .current {
  color: #f06c19;
  font-size: 14px;
  font-weight: 500;
}

/* Hero Category Badge */
.hero-category {
  display: inline-block;
  background: rgba(123, 104, 238, 0.3);
  color: #fff;
  padding: 8px 22px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.blog-detail-hero h1 {
  color: #fff;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 24px;
}

/* Hero Meta */
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.hero-meta .meta-item i {
  color: #f06c19;
  font-size: 15px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
}

/* ===== Main Content Section ===== */
.blog-detail-section {
  padding: 50px 0 80px;
  background: #f7fafc;
}

.blog-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: start;
}

/* Article Content */
.blog-detail-content {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}

/* Featured Image */
.detail-featured-image {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  background: #f7fafc;
}

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

/* Body Content */
.detail-body {
  padding: 40px;
  font-size: 16px;
  line-height: 1.85;
  color: #4a5568;
}

.detail-body p,
.detail-body br + br {
  margin-bottom: 6px;
}

/* ===== Content Sections ===== */
.content-section {
  margin-bottom: 32px;
}

.content-section:last-child {
  margin-bottom: 0;
}

/* Section Heading */
.section-heading {
  font-size: 26px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 14px;
  line-height: 1.35;
  position: relative;
  padding-left: 18px;
}

.section-heading::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 28px;
  background: linear-gradient(180deg, #6b52df, #5340c7);
  border-radius: 4px;
}

/* Section Subheading */
.section-subheading {
  font-size: 20px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* Section Figure / Image */
.section-figure {
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #f7fafc;
}

.section-figure img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 500px;
}

.section-figure figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: #718096;
  text-align: center;
  font-style: italic;
  background: #f7fafc;
  border-top: 1px solid #e2e8f0;
}

/* Section List */
.section-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.section-list li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid #f0f4f8;
  font-size: 15px;
  color: #4a5568;
  line-height: 1.6;
}

.section-list li:last-child {
  border-bottom: none;
}

.section-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  width: 8px;
  height: 8px;
  background: #6b52df;
  border-radius: 50%;
}

/* Section Quote */
.section-quote {
  background: linear-gradient(135deg, #f0edff 0%, #f7f5ff 100%);
  border-left: 4px solid #6b52df;
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  margin: 16px 0;
  position: relative;
}

.section-quote::before {
  content: '\201C';
  font-size: 60px;
  color: #6b52df;
  opacity: 0.2;
  position: absolute;
  top: -8px;
  left: 16px;
  font-family: Georgia, serif;
  line-height: 1;
}

.section-quote p {
  font-size: 17px;
  font-style: italic;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.section-quote cite {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #6b52df;
  font-style: normal;
}

.section-quote cite::before {
  content: '— ';
}

/* Section Code */
.section-code {
  background: #1e2432;
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
  position: relative;
}

.section-code pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
}

.section-code code {
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Footer: Tags & Share */
.detail-footer {
  padding: 24px 40px 32px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.detail-tags {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag-label {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
}

.tag-label i {
  color: #6b52df;
  margin-right: 4px;
}

.tag-item {
  display: inline-block;
  padding: 6px 16px;
  background: #f0edff;
  color: #6b52df;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.tag-item:hover {
  background: #6b52df;
  color: #fff;
}

/* Share Buttons */
.detail-share {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-label {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  margin-right: 4px;
}

.share-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-wa { background: #25d366; }
.share-li { background: #0a66c2; }

/* ===== Sidebar ===== */
.blog-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 100px;
}

.sidebar-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}

/* Author Card */
.author-card {
  text-align: center;
}

.author-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b52df, #5340c7);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: #fff;
}

.author-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 4px;
}

.author-card p {
  font-size: 13px;
  color: #718096;
}

/* Sidebar Title */
.sidebar-title {
  font-size: 17px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title i {
  color: #f06c19;
}

/* Sidebar Post Item */
.sidebar-post {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  transition: all 0.3s ease;
}

.sidebar-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-post:first-of-type {
  padding-top: 0;
}

.sidebar-post:hover {
  transform: translateX(4px);
}

.sidebar-post-img {
  width: 72px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f7fafc;
}

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

.sidebar-post-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e0;
  font-size: 18px;
}

.sidebar-post-info h5 {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s;
}

.sidebar-post:hover .sidebar-post-info h5 {
  color: #6b52df;
}

.sidebar-post-info span {
  font-size: 12px;
  color: #a0aec0;
}

.sidebar-post-info span i {
  margin-right: 4px;
  color: #cbd5e0;
}

/* CTA Card */
.cta-card {
  background: linear-gradient(135deg, #6b52df 0%, #5340c7 100%);
  text-align: center;
  border: none;
}

.cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
  color: #fff;
}

.cta-card h4 {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.cta-sidebar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #f06c19;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-sidebar-btn:hover {
  background: #e88a2a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 51, 0.4);
  color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .blog-detail-layout {
    grid-template-columns: 1fr 300px;
    gap: 24px;
  }

  .blog-detail-hero h1 {
    font-size: 34px;
  }

  .detail-body {
    padding: 32px;
  }

  .detail-footer {
    padding: 20px 32px 28px;
  }
}

@media (max-width: 768px) {
  .blog-detail-hero {
    padding: 60px 0 40px;
  }

  .blog-detail-hero h1 {
    font-size: 26px;
  }

  .hero-meta {
    gap: 16px;
  }

  .hero-meta .meta-item {
    font-size: 13px;
  }

  .blog-detail-section {
    padding: 30px 0 60px;
  }

  .blog-detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blog-detail-sidebar {
    position: static;
  }

  .detail-featured-image {
    max-height: 300px;
  }

  .detail-body {
    padding: 24px;
    font-size: 15px;
  }

  .detail-footer {
    padding: 20px 24px 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .sidebar-card {
    padding: 22px;
  }

  .section-heading {
    font-size: 22px;
  }

  .section-subheading {
    font-size: 18px;
  }

  .section-quote {
    padding: 20px 22px;
  }

  .section-quote p {
    font-size: 15px;
  }

  .section-code pre {
    padding: 18px;
  }

  .section-code code {
    font-size: 13px;
  }

  .content-section {
    margin-bottom: 24px;
  }
}

@media (max-width: 480px) {
  .blog-detail-hero {
    padding: 50px 0 30px;
  }

  .blog-detail-hero h1 {
    font-size: 22px;
  }

  .hero-category {
    font-size: 12px;
    padding: 6px 16px;
  }

  .detail-body {
    padding: 20px;
    font-size: 14px;
    line-height: 1.75;
  }

  .detail-footer {
    padding: 16px 20px 20px;
  }

  .section-heading {
    font-size: 20px;
    padding-left: 14px;
  }

  .section-heading::before {
    height: 22px;
    width: 3px;
  }

  .section-subheading {
    font-size: 16px;
  }

  .section-quote {
    padding: 16px 18px;
  }

  .section-quote::before {
    font-size: 40px;
  }

  .section-figure img {
    max-height: 300px;
  }

  .section-list li {
    padding: 8px 0 8px 24px;
    font-size: 14px;
  }
}
