/* News Details Page Styles */
:root {
  --primary-color-dim: rgba(var(--primary-color-rgb), 0.1);
  --card-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

body {
  background-color: #f7fafc;
}

.news-details-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

/* Back Button */
.nav-breadcrumbs {
  margin-bottom: 2rem;
}

.btn-back-news {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #718096;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-back-news:hover {
  color: var(--primary-color);
  transform: translateX(-5px);
}

/* Main Article */
.article-wrapper {
  background: white;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #edf2f7;
  margin-bottom: 3rem;
}

.article-hero-image-container {
  width: 100%;
  overflow: hidden;
  background-color: #f7fafc;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem; /* Add padding to give it some breathing room */
}

.article-hero-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 500px; /* Cap the height on the image tag itself if it's too tall, but preserve aspect ratio */
  object-fit: contain;
  display: block;
}

.article-content-wrapper {
  padding: 3rem;
}

.article-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 2rem;
}

.article-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  color: #718096;
  font-size: 0.95rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #2d3748;
  text-align: justify;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 2rem 0;
  height: auto !important;
}

/* Sidebar / Latest News */
.sidebar-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.latest-news-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-news-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  border: 1px solid #edf2f7;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.sidebar-news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e0;
}

.sidebar-image-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-date {
  font-size: 0.75rem;
  color: #a0aec0;
  font-weight: 600;
}

.sidebar-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2d3748;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Animations */
.fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .article-content-wrapper {
    padding: 2rem;
  }
  .article-title {
    font-size: 1.75rem;
  }
}
