/* ============================================
   POST ARTICLE PAGE (SHOW)
   Hero + article + sidebar + related
============================================ */

.post-article-page {
  background: radial-gradient(
      circle at top,
      rgba(245, 178, 0, 0.12),
      transparent 55%
    ),
    radial-gradient(circle at bottom, rgba(56, 189, 248, 0.12), #020617 70%);
  min-height: 100vh;
  color: #e5e7eb;
}

/* ===========================
   HERO
   - Uses cover_image as backdrop
   - Recommended: 1600 x 900px (16:9)
=========================== */

.post-article-hero {
  position: relative;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
  overflow: hidden;
  isolation: isolate;
}

/* Hero backdrop image
   - will crop using cover + center
   - aspect ratio is flexible, but 16:9 looks best
*/
.post-article-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.65);
  transform: scale(1.06);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.post-article-hero:hover .post-article-backdrop {
  transform: scale(1.09);
  filter: brightness(0.75);
}

/* Gradient overlay for legible text on top of image */
.post-article-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.1),
    rgba(15, 23, 42, 0.9) 50%,
    #020617 100%
  );
}

/* Hero inner container */
.post-article-hero-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.75rem 1rem 1.6rem;
}

/* Breadcrumb navigation */
.post-article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  font-size: 0.75rem;
  color: #e5e7eb;
  margin-bottom: 0.7rem;
}

.post-article-breadcrumb-link {
  color: #e5e7eb;
  text-decoration: none;
}

.post-article-breadcrumb-link:hover {
  text-decoration: underline;
}

.post-article-breadcrumb-separator {
  opacity: 0.6;
}

/* Category kicker pill */
.post-article-kicker-row {
  margin-bottom: 0.4rem;
}

.post-article-category-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(248, 250, 252, 0.3);
}

/* Title + summary */
.post-article-header {
  margin-bottom: 0.75rem;
}

.post-article-title {
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.9rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}

.post-article-summary {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #e5e7eb;
}

/* Meta row (author + date + actions) */
.post-article-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

/* Author block */
.post-article-author-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Author avatar container
   Recommended source size: 128 x 128px
*/
.post-article-author-avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 2px solid rgba(248, 250, 252, 0.8);
  overflow: hidden;
  background: radial-gradient(circle at top, #f5b200, #1f2937 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Avatar image: force square crop */
.post-article-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Initials if no avatar image */
.post-article-author-initials {
  font-size: 0.95rem;
  font-weight: 600;
  color: #020617;
}

.post-article-author-text {
  display: flex;
  flex-direction: column;
}

.post-article-author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f9fafb;
}

.post-article-author-role {
  font-size: 0.75rem;
  color: #cbd5f5;
}

/* Extra meta (date, reading time, buttons) */
.post-article-meta-extra {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
}

.post-article-meta-details {
  font-size: 0.78rem;
  color: #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.post-article-meta-details .dot,
.dot {
  opacity: 0.5;
}

/* Meta action buttons (Save / Share) */
.post-article-meta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.post-article-meta-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}

/* Focus styles for hero/action buttons */
.post-article-meta-btn:focus-visible,
.post-article-tag-pill:focus-visible,
.post-article-share-btn:focus-visible,
.post-article-section-pill:focus-visible,
.post-sidebar-cta-btn:focus-visible {
  outline: 2px solid #f5b200;
  outline-offset: 2px;
}

/* ===========================
   MAIN LAYOUT
=========================== */

.post-article-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.6rem 1rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

/* Main article column */
.post-article-main {
  min-width: 0;
}

/* Cover image block
   - <img> inside uses aspect-ratio for consistent hero crops
*/
.post-article-cover {
  margin: 0 0 1.25rem;
  border-radius: 1.2rem;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(15, 23, 42, 0.9);
}

/* Cover image
   Recommended uploaded size: 1600 x 900px (16:9)
   We enforce 16:9 using aspect-ratio.
*/
.post-article-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Caption under cover image */
.post-article-cover-caption {
  font-size: 0.75rem;
  color: #9ca3af;
  padding: 0.55rem 0.8rem 0.7rem;
}

/* Article body typography */
.post-article-body {
  font-size: 0.93rem;
  line-height: 1.8;
  color: #e5e7eb;
}

.post-article-body p {
  margin: 0 0 0.95rem;
}

.post-article-body p:last-child {
  margin-bottom: 0;
}

.post-article-body strong {
  font-weight: 600;
  color: #fefce8;
}

.post-article-body a {
  color: #f5b200;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Article footer (tags + share) */
.post-article-footer {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(30, 64, 175, 0.6);
}

/* Tags row */
.post-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.post-article-tags-label {
  font-size: 0.8rem;
  color: #e5e7eb;
  margin-right: 0.2rem;
}

/* Tag pill buttons */
.post-article-tag-pill {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
}

/* Share row */
.post-article-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.4rem;
}

.post-article-share-label {
  font-size: 0.8rem;
  color: #e5e7eb;
}

.post-article-share-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}

/* ===========================
   RELATED READING
=========================== */

.post-related-section {
  margin-top: 2rem;
}

/* Shared section header styles (same naming as index page) */
.posts-section-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.posts-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f9fafb;
}

.posts-section-subtitle {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0.2rem;
}

.posts-section-link {
  font-size: 0.8rem;
  color: #f5b200;
  text-decoration: none;
}

.posts-section-link:hover {
  text-decoration: underline;
}

/* Related cards grid */
.post-related-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.post-related-card {
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}

.post-related-thumb-link {
  text-decoration: none;
  color: inherit;
}

/* Thumbnail wrapper */
.post-related-thumb {
  position: relative;
  overflow: hidden;
}

/* Related thumbnail image
   Recommended upload: 800 x 450px (16:9)
   We also enforce 16:9 via aspect-ratio.
*/
.post-related-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

/* Hover zoom on card */
.post-related-card:hover .post-related-thumb img {
  transform: scale(1.05);
}

/* Category pill on thumbnail */
.post-related-category {
  position: absolute;
  left: 0.75rem;
  bottom: 0.7rem;
  padding: 0.18rem 0.6rem;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(248, 250, 252, 0.3);
  color: #e5e7eb;
}

/* Card text */
.post-related-body {
  padding: 0.8rem 0.9rem 0.9rem;
}

.post-related-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.post-related-title a {
  color: #f9fafb;
  text-decoration: none;
}

.post-related-title a:hover {
  text-decoration: underline;
}

/* ===========================
   SIDEBAR
=========================== */

.post-article-sidebar {
  min-width: 0;
}

/* Sidebar sections */
.post-article-sidebar-section {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  margin-bottom: 1rem;
}

/* CTA sidebar styling */
.post-article-sidebar-section--cta {
  background: radial-gradient(
      circle at top left,
      rgba(245, 158, 11, 0.25),
      transparent 52%
    ),
    rgba(15, 23, 42, 0.99);
  border-color: rgba(245, 158, 11, 0.6);
}

/* Sidebar header */
.post-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f9fafb;
}

/* Sections pill group (News / Gossip / Movies / etc.) */
.post-article-sections-grid {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.post-article-section-pill {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Active section */
.post-article-section-pill.is-active {
  border-color: #f5b200;
  background: rgba(245, 178, 0, 0.14);
  color: #fefce8;
}

/* Latest headlines */
.post-sidebar-latest-list {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
}

.post-sidebar-latest-item {
  padding: 0.45rem 0;
}

.post-sidebar-latest-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.post-sidebar-latest-title {
  font-size: 0.8rem;
  color: #e5e7eb;
}

.post-sidebar-latest-meta {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 0.12rem;
}

/* Sidebar CTA text */
.post-sidebar-text {
  font-size: 0.8rem;
  color: #e5e7eb;
  margin-top: 0.7rem;
}

/* Sidebar CTA button */
.post-sidebar-cta-btn {
  margin-top: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #f5b200, #f97316);
  color: #020617;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.post-sidebar-note {
  margin-top: 0.6rem;
  font-size: 0.7rem;
  color: #9ca3af;
}

/* ===========================
   RESPONSIVE
=========================== */

@media (min-width: 640px) {
  .post-article-hero-inner {
    padding: 2.1rem 1.5rem 1.9rem;
  }

  .post-article-title {
    font-size: 2.2rem;
  }

  .post-article-meta-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .post-article-meta-extra {
    align-items: flex-end;
  }

  /* 3-column related grid on small/medium screens */
  .post-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .post-article-hero-inner {
    padding-inline: 1.5rem;
  }

  .post-article-title {
    font-size: 2.4rem;
  }

  /* Two-column layout: main + sidebar */
  .post-article-layout {
    grid-template-columns:
      minmax(0, 1.9fr)
      minmax(260px, 1fr);
    align-items: flex-start;
  }
}
