/* ============================================
   POST STYLES
   ============================================ */

.post-header {
  max-width: 100%;
  margin: 0 0 2rem;
  padding: 0;
  text-align: left;
}

.post-tag-minimal {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase !important;
  letter-spacing: 0.05em;
  color: currentColor;
  text-decoration: none;
}

.post-title {
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1.2rem;
  color: var(--color-text);
}

.post-excerpt {
  font-size: 1.8rem;
  color: var(--color-text-light);
  margin: 0 0 2rem;
  line-height: 1.5;
  max-width: 100%;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.post-meta-wrapper {
  display: flex;
  flex-direction: column;
}
.post-meta-wrapper .author-name {
  font-size: 1.6rem;
  font-weight: 500;
  margin: 0 0 0.2rem 0;
}
.post-meta-content {
  font-size: 1.3rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.post-author {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.post-author .author-avatar,
.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

/* Featured image wrapper */
.post-image-wrapper {
  max-width: 80rem;
  width: auto;
  position: relative;
  margin-bottom: 2rem;
  margin: 0 auto 2rem;
}
.post-image-wrapper img {
  max-width: 80rem;
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
}
.post-image-wrapper figcaption {
  font-size: 1.4rem;
  color: var(--color-text-light);
  text-align: left;
  margin-top: 0.25rem;
  font-style: normal;
  line-height: 1.2;
  padding-top: 0;
}
/* Share buttons bar */
.post-image-wrapper .share-buttons-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.post-image-wrapper .share-buttons-bar .share-btn {
  width: 30px; /* ukuran tombol share */
  height: 30px;
  border-radius: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

/* Umum untuk semua ikon SVG di dalam tombol share */

.post-image-wrapper .share-buttons-bar .share-btn svg {
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
  display: block;
  margin: auto;
  fill: currentColor;
}

/* Brand colors */
.share-btn.facebook {
  background: #1877f2;
  color: #fff;
}
.share-btn.twitter {
  background: #1da1f2;
  color: #fff;
}
.share-btn.whatsapp {
  background: #25d366;
  color: #fff;
}
.share-btn.linkedin {
  background: #0077b5;
  color: #fff;
}
.share-btn.telegram {
  background: #0088cc;
  color: #fff;
}

.post-image-wrapper .share-buttons-bar .share-btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

/* Tooltip text */
.post-image-wrapper .share-buttons-bar .share-btn::after {
  content: attr(aria-label);
  position: absolute;
  bottom: 120%; /* di atas tombol */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 1.2rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 20;
}
/* Tooltip muncul saat hover */
.post-image-wrapper .share-buttons-bar .share-btn:hover::after {
  opacity: 1;
}

.share-buttons-bar {
  display: none;
}

.share-toggle-wrapper {
  margin-top: 1rem;
  text-align: right;
}

.share-toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  margin-top: 3rem;
}

.share-toggle .arrow {
  transition: transform 0.2s ease;
}

.share-toggle[aria-expanded="true"] .arrow {
  transform: rotate(180deg);
}

.share-buttons-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.share-buttons-bar[hidden] {
  display: none !important;
}

.share-buttons-bar.active {
  display: flex;
}

/* ============================================
   TWO-COLUMN LAYOUT (POST + SIDEBAR)
   ============================================ */
.two-column-layout {
  display: flex; /* diperbaiki: set flex untuk dua kolom */
  gap: 2rem; /* jarak antara main-column dan sidebar */
  align-items: flex-start; /* supaya artikel dan sidebar sejajar di atas */
}

.main-column {
  flex: 1; /* diperbaiki: main-column ambil sisa space */
  max-width: 80rem; /* optional: sama seperti post-header */
  width: 100%; /* diperbaiki: pastikan isi column full-width */
  box-sizing: border-box; /* diperbaiki: padding tidak memecah layout */
}

.sidebar-column {
  flex: 0 0 25rem; /* diperbaiki: lebar sidebar tetap */
  box-sizing: border-box; /* diperbaiki: padding tidak mempengaruhi lebar */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .post-image-wrapper .share-buttons-bar {
    top: 0.8rem;
    right: 0.8rem;
    gap: 0.5rem;
  }
  .post-image-wrapper .share-buttons-bar .share-btn {
    width: 36px;
    height: 36px;
  }
  .post-image-wrapper .share-buttons-bar .share-btn svg {
    width: 16px;
    height: 16px;
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    display: block;
    margin: auto;
  }
}

@media (max-width: 768px) {
  .post-image-wrapper .share-buttons-bar {
    gap: 0.4rem;
  }
  .post-image-wrapper .share-buttons-bar .share-btn {
    width: 32px;
    height: 32px;
  }
  .post-image-wrapper .share-buttons-bar .share-btn svg {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .post-image-wrapper .share-buttons-bar {
    gap: 0.3rem;
  }
  .post-image-wrapper .share-buttons-bar .share-btn {
    width: 30px;
    height: 30px;
  }
  .post-image-wrapper .share-buttons-bar .share-btn svg {
    width: 12px;
    height: 12px;
  }
}

/* Post content */
.post-content {
  max-width: 80rem;
  width: 100%;
  margin: 0 0 6rem;
  font-size: 1.8rem;
  line-height: 1.7;
}
.post-content h2 {
  font-size: 3.2rem;
  font-weight: 700;
  margin: 4rem 0 2rem;
}
.post-content h3 {
  font-size: 2.4rem;
  font-weight: 600;
  margin: 3.2rem 0 1.6rem;
}
.post-content p {
  margin: 0 0 2rem;
}
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.8rem;
  margin: 2rem 0;
}

/* Footer */
.post-footer {
  max-width: 80rem;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

/* Author card */
.author-card {
  display: flex;
  gap: 2rem;
  background: var(--color-accent);
  padding: 3rem;
  border-radius: 0.8rem;
  margin-bottom: 4rem;
}
.author-card .author-avatar {
  width: 8rem;
  height: 8rem;
  flex-shrink: 0;
}
.author-details h4 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}
.author-details h4 a {
  color: var(--color-text);
  text-decoration: none;
}
.author-details .author-bio {
  font-size: 1.6rem;
  margin: 0 0 1.6rem 0;
  line-height: 1.5;
}
.author-social {
  display: flex;
  gap: 1.2rem;
}
.author-social a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

/* Related posts */
.related-posts {
  background: none;
  padding: 1rem 0;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1rem;
}
.related-article {
  background: none;
  border: none;
  border-radius: 0;
  overflow: visible;
  transition: none;
}
.related-article:hover {
  transform: none;
}
.related-article .article-image img {
  width: 100%;
  height: 16rem;
  object-fit: cover;
  border: none;
  border-radius: 0;
}
.related-article .article-content {
  padding: 2rem;
}
.related-article .article-title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  text-align: left;
}

.related-posts .section-title {
  font-size: 1.4rem; /* kecilkan teks */
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border-bottom: none;
  color: var(--color-text);
}

.related-posts .section-title::after {
  content: none;
  display: none; /* hilangkan garis merah */
}

/* Subscribe form */
.subscribe-article {
  border: 1px solid var(--color-border);
  background: var(--color-accent);
  padding: 2rem;
  margin: 2rem 0;
  display: flex;
  flex-direction: column; /* ubah ke row untuk horizontal */
  gap: 1rem;
  text-align: center;
  border-radius: 0.4rem;
}

.subscribe-article form {
  display: flex;
  flex-direction: row; /* input + tombol sejajar */
  gap: 0.5rem;
  justify-content: center;
}

.subscribe-article input[type="email"] {
  flex: 1;
  padding: 0.8rem;
  font-size: 1.4rem;
  border-radius: 0.4rem;
  border: 1px solid var(--color-border);
}

.subscribe-article button {
  padding: 0.8rem 1.5rem;
  font-size: 1.4rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.subscribe-article button:hover {
  background: #a00;
}

/* Responsive adjustments for post */
@media (max-width: 1024px) {
  .post-title {
    font-size: 3.6rem;
  }
  .author-card {
    flex-direction: column;
    text-align: center;
  }
  .two-column-layout {
    gap: 1.5rem;
  }
}
@media (max-width: 768px) {
  .post-title {
    font-size: 2.8rem;
  }
  .post-content {
    font-size: 1.6rem;
    line-height: 1.6;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .two-column-layout {
    flex-direction: column;
  }
  .sidebar-column {
    width: 100%;
    margin-top: 4rem;
  }
  .main-column {
    max-width: 100%;
  }
}
@media (max-width: 480px) {
  .post-title {
    font-size: 2.4rem;
  }
  .post-content {
    font-size: 1.5rem;
  }
  .author-card {
    padding: 2rem;
  }
  .two-column-layout {
    gap: 1rem;
  }
  .sidebar-column {
    margin-top: 1.5rem;
  }
}
