/* BERITA DETAIL STYLES */
.berita-detail-container {
  padding-top: 100px;
  background-color: #f8fafc;
  min-height: 100vh;
}

.breadcrumb-section {
  background-color: white;
  padding: 15px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  font-size: 14px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.breadcrumb .separator {
  margin: 0 10px;
  color: #ccc;
}

.breadcrumb .current {
  color: #666;
  font-weight: 500;
}

.berita-article {
  background: white;
  margin: 30px auto;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  overflow: hidden;
  max-width: 1200px;
}

.article-header {
  padding: 40px 40px 20px;
  border-bottom: 1px solid #eee;
}

.article-title {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.3;
  font-weight: 700;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 10px;
}

.meta-item {
  display: flex;
  align-items: center;
  color: #666;
  font-size: 0.9rem;
  background: #f5f8fb;
  padding: 8px 15px;
  border-radius: 20px;
}

.meta-item i {
  margin-right: 8px;
  color: var(--primary-color);
}

.article-image {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  position: relative;
}

.featured-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

.article-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.article-content h2, 
.article-content h3 {
  color: var(--primary-color);
  margin: 2rem 0 1rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

.article-content ul, 
.article-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 20px;
  margin: 25px 0;
  font-style: italic;
  color: #555;
  background-color: #f9f9f9;
  padding: 15px 20px;
  border-radius: 0 8px 8px 0;
}

.article-content img.content-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.article-content img.content-image:hover {
  transform: scale(1.02);
}

.article-footer {
  padding: 30px 40px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  background: #f8fafc;
}

.article-tags {
  flex: 1;
  min-width: 250px;
}

.article-tags h3,
.article-share h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 8px;
}

.article-tags h3::after,
.article-share h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background: #e8f3ff;
  color: var(--primary-color);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 1px solid #d0e3ff;
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.article-share {
  flex: 1;
  min-width: 250px;
}

.share-buttons {
  display: flex;
  gap: 15px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 18px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.whatsapp { background: #25d366; }

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.related-news {
  padding: 50px 0;
  background: #f8fafc;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 30px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-color);
  margin: 10px auto;
  border-radius: 2px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.related-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.related-image {
  height: 200px;
  overflow: hidden;
}

.related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-card:hover .related-image img {
  transform: scale(1.05);
}

.related-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: calc(100% - 200px);
}

.related-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.related-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.related-title a:hover {
  color: var(--secondary-color);
}

.related-excerpt {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.related-meta {
  margin-bottom: 15px;
}

.related-date {
  font-size: 0.9rem;
  color: #666;
  display: flex;
  align-items: center;
}

.related-date i {
  margin-right: 5px;
  color: var(--primary-color);
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
  margin-top: auto;
}

.read-more i {
  margin-left: 5px;
  transition: transform 0.3s ease;
  font-size: 12px;
}

.read-more:hover {
  color: var(--secondary-color);
}

.read-more:hover i {
  transform: translateX(3px);
}

.article-navigation {
    padding: 40px 0;
    background: white;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Ubah dari center ke stretch */
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-button {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    border: 1px solid #e0e0e0;
    height: auto; /* Pastikan height auto */
    min-height: 80px; /* Tinggi minimum untuk konsistensi */
}

.nav-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.nav-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button i {
    margin: 0 10px;
    font-size: 1.2rem;
    flex-shrink: 0; /* Mencegah icon menyusut */
}

.nav-button.next {
    text-align: right;
    flex-direction: row-reverse;
}

.nav-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Pusatkan vertikal */
    min-height: 50px; /* Tinggi minimum untuk info */
}

.nav-info span {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.nav-button:hover .nav-info span {
    color: white;
}

.nav-info p {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-button.back {
    justify-content: center;
    max-width: 150px;
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    font-weight: 600;
}

.nav-button.back:hover {
    background: #ffe066;
    color: #000;
    border-color: #ffe066;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* RESPONSIVE STYLES */
@media (max-width: 1200px) {
  .article-title {
    font-size: 1.8rem;
  }
  
  .article-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .article-tags,
  .article-share {
    min-width: 100%;
  }
}

@media (max-width: 992px) {
   .nav-buttons {
        flex-direction: column;
    }
    
    .nav-button {
        max-width: 100%;
        min-height: 70px;
    }
    
    .nav-button.back {
        max-width: 100%;
        order: 3;
    }
}

@media (max-width: 768px) {
  .berita-detail-container {
    padding-top: 80px;
  }
  
  .article-header,
  .article-content,
  .article-footer {
    padding: 20px;
  }
  
  .article-title {
    font-size: 1.6rem;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 10px;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .share-buttons {
    justify-content: flex-start;
  }
  
  .article-content h2::after,
  .article-content h3::after,
  .article-content h4::after {
    width: 40px;
  }
}

@media (max-width: 576px) {
  .article-title {
    font-size: 1.4rem;
  }
  
  .article-content {
    font-size: 1rem;
    padding: 15px;
  }
  
  .article-content ul,
  .article-content ol {
    padding-left: 20px;
  }
  
  .tags-container {
    justify-content: flex-start;
  }
  
  .nav-info p {
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .nav-button {
        min-width: 100%;
        padding: 12px 15px;
    }
    
    .nav-button i {
        font-size: 1rem;
        margin: 0 8px;
    }
  
  .article-tags h3::after,
  .article-share h3::after {
    width: 30px;
  }
}