/* ---------------------------------------------------------------------- */
/*                           BLOG INNER PAGE STYLES                       */
/* ---------------------------------------------------------------------- */

.post-page-wrapper {
  padding-top: 120px; /* Space for fixed nav */
  padding-bottom: 80px;
  background-color: var(--dark-blue-1);
  color: var(--white);
  min-height: 100vh;
}

/* --- Hero Section --- */
.post-hero {
  position: relative;
  padding: 6em 2em 4em;
  text-align: center;
  margin: 0 auto;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Ensure background doesn't spill */
  z-index: 1; /* Create stacking context so ::before (z-index: -1) stays above text but above parent bg */
}

.back-home-btn {
  position: absolute;
  top: 30px;
  left: 30px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

@media (max-width: 640px) {
  .back-home-btn {
    top: 0%;
    left: 50%;
    transform: translate(-50%, -0%);
  }
}

.back-home-btn:hover {
  color: white;
  background: rgba(86, 102, 255, 0.4);
  border-color: rgba(86, 102, 255, 0.5);
  transform: translateX(-4px);
}

/* Background Image & Overlay */
.post-hero-image {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(
    to bottom,
    rgba(11, 14, 20, 0.3),
    rgba(11, 14, 20, 0.9)
  );
  background-size: cover;
  background-position: center;
  z-index: -1;
  opacity: 0.6; /* Slight transparency to blend with dark theme */
}

.post-category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  background: rgba(56, 152, 236, 0.1);
  color: #3898ec;
  border-radius: 100px;
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 2em;
  border: 1px solid rgba(56, 152, 236, 0.2);
  backdrop-filter: blur(5px);
}

.post-hero-title {
  font-size: 4rem; /* Larger impact */
  line-height: 1.1;
  margin-bottom: 0.6em;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; /* Fallback */
  font-family: "Creato Display", sans-serif;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 900px;
}

.post-hero-excerpt {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--paragraphs);
  max-width: 720px;
  margin: 0 auto 2.5em;
  font-weight: 400;
}

.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5em;
  font-size: 0.95em;
  color: var(--paragraphs-dark);
  font-weight: 500;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.post-meta-icon {
  width: 18px;
  height: 18px;
  opacity: 0.8;
  color: var(--blue-2);
}

.post-meta-sep {
  width: 4px;
  height: 4px;
  background: var(--dark-blue-3);
  border-radius: 50%;
}

/* --- Main Layout --- */
.post-grid-container {
  display: grid;
  grid-template-columns: 1fr 320px; /* Content + Sidebar */
  gap: 5em;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2em;
  position: relative;
}

/* --- Content Column --- */
.post-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.post-body h2 {
  font-family: "Creato Display", sans-serif;
  font-size: 2.2rem;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
  color: var(--white);
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-family: "Creato Display", sans-serif;
  font-size: 1.6rem;
  margin-top: 2em;
  margin-bottom: 0.6em;
  color: var(--white);
}

.post-body p {
  margin-bottom: 1.8em;
  color: var(--paragraphs);
}

.post-body ul,
.post-body ol {
  margin-bottom: 2em;
  padding-left: 1.5em;
}

.post-body li {
  margin-bottom: 0.8em;
  color: var(--paragraphs);
}

.post-body blockquote {
  /* background: linear-gradient(90deg, rgba(56, 152, 236, 0.05) 0%, transparent 100%); */
  border-left: 4px solid var(--blue-2);
  padding: 2em 2.5em;
  margin: 2.5em 0;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--white);
  border-radius: 0 16px 16px 0;
}

/* --- Sidebar Column --- */
.post-sidebar-area {
  position: relative;
  height: 100%; /* Ensure it stretches to grid row height */
}

.post-sidebar-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 140px;
  display: flex;
  flex-direction: column;
  gap: 2em;
  align-self: start; /* Prevent the sticky element from stretching to its parent's height */
}

/* Card Style */
.sidebar-card {
  background: linear-gradient(20deg, var(--blue-1), var(--blue-3));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.8em;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sidebar-heading {
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--white);
  margin-bottom: 1.2em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.sidebar-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

.sidebar-toc-link {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: block;
  padding-left: 12px;
  border-left: 2px solid transparent;
  line-height: 1.4;
}

.sidebar-toc-link:hover {
  color: var(--white);
  border-left-color: var(--white);
  transform: translateX(4px);
}

/* Share Buttons */
.sidebar-share-row {
  display: flex;
  gap: 12px;
}

.icon-btn-share {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.icon-btn-share:hover {
  background: var(--blue-2);
  border-color: var(--blue-2);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(56, 152, 236, 0.3);
}

/* --- Responsive --- */
@media screen and (max-width: 991px) {
  .post-grid-container {
    grid-template-columns: 1fr;
    padding: 0 1.5em;
  }

  .post-sidebar-area {
    display: none;
  }

  .post-hero-title {
    font-size: 2.8rem;
  }

  .post-hero {
    padding: 4em 1.5em;
  }
}
