/* ========================
   Post Detail Page Styles
======================== */

.post-loading {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  color: var(--text-muted);
}

.post-loading i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--kascoten-green);
  animation: spin 1s linear infinite;
}

.post-loading p {
  font-size: 1.1rem;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================
   Breadcrumb
======================== */
.breadcrumb {
  max-width: 900px;
  margin: 80px auto 2rem;
  padding: 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--kascoten-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--kascoten-red);
}

.breadcrumb span {
  margin: 0 0.5rem;
}

@media (max-width: 768px) {
  .breadcrumb {
    margin-top: 70px;
    font-size: 0.85rem;
  }
}

/* ========================
   Post Detail Container
======================== */
.post-detail-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  margin-top: 50px;
}

/* ========================
   Article Meta
======================== */
.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--light-bg);
  flex-wrap: wrap;
  gap: 1rem;
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-category {
  background: var(--kascoten-red);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.article-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-date::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
}

.read-time {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.read-time::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
}

.share-btn {
  background: var(--kascoten-green);
  color: var(--white);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-btn:hover {
  background: var(--kascoten-red);
}

/* ========================
   Article Title & Header
======================== */
.article-title {
  font-family: var(--heading-font);
  font-size: 2.8rem;
  color: var(--kascoten-green);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .article-title {
    font-size: 2rem;
  }
}

/* ========================
   Author Info
======================== */
.author-info {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--light-bg);
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--kascoten-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.author-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.author-name {
  font-weight: 600;
  color: var(--kascoten-green);
  font-size: 1rem;
}

.author-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========================
   Featured Image
======================== */
.featured-image-container {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.featured-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
}

.image-caption {
  padding: 1rem;
  background: var(--light-bg);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ========================
   Article Content
======================== */
.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 2rem;
}

.article-content h2 {
  font-family: var(--heading-font);
  font-size: 1.8rem;
  color: var(--kascoten-green);
  margin: 2rem 0 1rem;
}

.article-content h3 {
  font-family: var(--heading-font);
  font-size: 1.4rem;
  color: var(--kascoten-green);
  margin: 1.5rem 0 0.8rem;
}

.article-content p {
  margin-bottom: 1.2rem;
}

.article-content ul,
.article-content ol {
  margin: 1.2rem 0 1.2rem 2rem;
}

.article-content li {
  margin-bottom: 0.6rem;
}

.article-content blockquote {
  border-left: 4px solid var(--kascoten-red);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #666;
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========================
   Image Gallery
======================== */
.image-gallery-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--light-bg);
}

.image-gallery-section h3 {
  font-family: var(--heading-font);
  font-size: 1.6rem;
  color: var(--kascoten-green);
  margin-bottom: 1.5rem;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-image-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.gallery-image-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.gallery-image-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-image-item:hover .gallery-image-overlay {
  opacity: 1;
}

.gallery-image-overlay i {
  color: var(--white);
  font-size: 2rem;
}

/* ========================
   Article Footer
======================== */
.article-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 2px solid var(--light-bg);
  border-bottom: 2px solid var(--light-bg);
}

.article-tags {
  margin-bottom: 1.5rem;
}

.article-tag {
  display: inline-block;
  background: var(--light-bg);
  color: var(--kascoten-green);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.article-tag:hover {
  background: var(--kascoten-green);
  color: var(--white);
}

/* ========================
   Article Engagement
======================== */
.article-engagement {
  display: flex;
  gap: 1rem;
}

.engagement-btn {
  background: var(--light-bg);
  border: 2px solid transparent;
  padding: 0.8rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--kascoten-green);
  font-family: var(--body-font);
}

.engagement-btn:hover {
  border-color: var(--kascoten-green);
  background: transparent;
}

.engagement-btn.liked {
  color: var(--kascoten-red);
}

.engagement-btn i {
  font-size: 1.1rem;
}

/* ========================
   Comments Section
======================== */
.comments-section {
  margin-top: 3rem;
}

.comments-section h3 {
  font-family: var(--heading-font);
  font-size: 1.6rem;
  color: var(--kascoten-green);
  margin-bottom: 1.5rem;
}

.comments-list {
  margin-bottom: 2rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-avatar-small {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--kascoten-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-weight: 600;
  color: var(--kascoten-green);
}

.comment-time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.comment-text {
  color: #555;
  line-height: 1.6;
}

.comment-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

/* ========================
   Comment Form
======================== */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--light-bg);
}

.comment-textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--light-bg);
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 1rem;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s ease;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--kascoten-green);
  box-shadow: 0 0 10px rgba(6, 64, 43, 0.1);
}

.comment-submit-btn {
  align-self: flex-start;
  background: var(--kascoten-red);
  color: var(--white);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-submit-btn:hover {
  background: var(--kascoten-green);
}

/* ========================
   Related Articles
======================== */
.related-articles {
  background: var(--light-bg);
  padding: 3rem 1.5rem;
  margin-top: 3rem;
}

.related-container {
  max-width: 1200px;
  margin: 0 auto;
}

.related-articles h2 {
  font-family: var(--heading-font);
  font-size: 2rem;
  color: var(--kascoten-green);
  margin-bottom: 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.related-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.related-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.related-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--light-bg);
}

.related-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card:hover .related-card-image img {
  transform: scale(1.05);
}

.related-card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-card-title {
  font-family: var(--heading-font);
  font-size: 1.1rem;
  color: var(--kascoten-green);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.related-card-excerpt {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
  flex: 1;
}

.related-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================
   Responsive
======================== */
@media (max-width: 768px) {
  .post-detail-container {
    padding: 0 1rem 2rem;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .meta-right {
    width: 100%;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }

  .article-title {
    font-size: 1.6rem;
  }

  .author-info {
    margin-bottom: 1.5rem;
  }

  .image-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-engagement {
    flex-wrap: wrap;
  }

  .engagement-btn {
    flex: 1;
    min-width: 120px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}
