/**
 * Single Post Page
 * Based on Figma node: 1592-153702
 */

/* ===========================================
 * LAYOUT - 3 Column Grid
 * =========================================== */

.single-post__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}

@media (min-width: 992px) {
  .single-post__layout {
    grid-template-columns: 280px 1fr 280px;
    grid-template-rows: auto auto auto; /* Content, Comments, Read More */
    gap: 32px;
    padding-top: 32px;
    padding-bottom: 32px;
  }
  
  /* Left Sidebar - Column 1 */
  .single-post__sidebar-left {
    grid-column: 1 / 2;
    grid-row: 1 / 4; /* Span all 3 rows */
  }

  /* Main Content - Column 2, Row 1 */
  .single-post__content {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  /* Comments - Column 2, Row 2 */
  .single-post__comments {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
  }

  /* Read More - Column 2, Row 3 */
  .single-post__read-more {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
  }

  /* Right Sidebar - Column 3 */
  .single-post__sidebar-right {
    grid-column: 3 / 4;
    grid-row: 1 / 4; /* Span all 3 rows */
  }
}

@media (min-width: 1200px) {
  .single-post__layout {
    grid-template-columns: 280px 1fr 280px;
    gap: 40px;
  }
}

/* ===========================================
 * LEFT SIDEBAR
 * =========================================== */

.single-post__sidebar-left {
  display: none;
}

@media (min-width: 992px) {
  .single-post__sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: calc(var(--header-height, 86px) + 24px);
    align-self: start;
  }
}

/* ===========================================
 * MAIN CONTENT
 * =========================================== */

.single-post__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  background-color: #ffffff;
  padding: 24px;
  border-radius: 16px;
}

@media (min-width: 992px) {
  .single-post__content {
    padding: 32px;
  }
}

/* Breadcrumbs (horizontal) */
.single-post__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  line-height: 16px;
}

.single-post__breadcrumb-item {
  color: #6E4F95;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.single-post__breadcrumb-item:hover {
  opacity: 0.7;
}

.single-post__breadcrumb-item--current {
  color: #A6A6A6;
}

.single-post__breadcrumb-sep {
  color: #A6A6A6;
}

/* Post Header */
.single-post__header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.single-post__title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 36px;
  color: #303030;
  margin: 0;
}

@media (min-width: 768px) {
  .single-post__title {
    font-size: 32px;
    line-height: 40px;
  }
}

/* Meta */
.single-post__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.single-post__listen-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #6E4F95;
  border: none;
  border-radius: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.single-post__listen-btn:hover {
  background-color: #5A3F7A;
}

.single-post__listen-btn svg {
  flex-shrink: 0;
}

.single-post__meta-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.single-post__reading-time {
  display: flex;
  align-items: center;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  color: #A6A6A6;
}

/* Lead Text */
.single-post__lead {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: #303030;
  margin-bottom: 24px;
}

.single-post__lead p:last-child {
  margin-bottom: 0;
}

/* Featured Image */
.single-post__featured-image {
  border-radius: 16px;
  overflow: hidden;
}

.single-post__image {
  width: 100%;
  height: auto;
  display: block;
}

/* Post Body / Content */
.single-post__body {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  line-height: 24px;
  color: #303030;
}

.single-post__body h2 {
  font-size: 32px;
  font-weight: 500;
  line-height: 32px;
  margin: 32px 0 16px;
  color: #303030;
}

.single-post__body h3 {
  font-size: 26px;
  font-weight: 500;
  line-height: 32px;
  margin: 24px 0 12px;
  color: #303030;
}

.single-post__body h4 {
  font-size: 22px;
  font-weight: 500;
  line-height: 32px;
  margin: 16px 0 8px;
  color: #303030;
}

.single-post__body p {
  margin: 0 0 16px;
}

.single-post__body ul,
.single-post__body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.single-post__body li {
  margin-bottom: 8px;
}

.single-post__body a {
  color: #6E4F95;
  text-decoration: underline;
}

.single-post__body a:hover {
  text-decoration: none;
}

.single-post__body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 16px 0;
}

.single-post__body blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  background-color: #F6F6F6;
  border-left: 4px solid #6E4F95;
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

/* Key Facts Block */
.single-post__body .key-facts,
.single-post__body .wp-block-group.is-style-key-facts {
  background-color: #F6F6F6;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}

.single-post__body .key-facts h3,
.single-post__body .key-facts h4 {
  margin-top: 0;
}

/* ===========================================
 * POST FOOTER - Actions
 * =========================================== */

.single-post__footer {
  padding-top: 16px;
  border-top: 1px solid #DBDBDB;
}

.single-post__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.single-post__actions-left,
.single-post__actions-right {
  display: flex;
  align-items: center;
  gap: 48px;
}

.single-post__actions-right {
  gap: 16px;
}

.single-post__action-btn {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  line-height: 16px;
  color: #B8B8B8;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.single-post__action-btn:hover {
  color: #4D4D4D;
}

/* ===========================================
 * EMOJI REACTIONS
 * =========================================== */

.single-post__reactions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid #DBDBDB;
}

.single-post__reactions-count {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #F6F6F6;
  border-radius: 100px;
}

.single-post__reaction-emoji {
  font-size: 24px;
  line-height: 1;
}

.single-post__reaction-number {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #303030;
}

.single-post__reactions-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.single-post__reaction-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background-color: #F6F6F6;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

@media (min-width: 768px) {
  .single-post__reaction-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

.single-post__reaction-btn:hover {
  transform: scale(1.15);
  background-color: #E8E1F3;
}

.single-post__reaction-btn:active {
  transform: scale(0.95);
}

/* ===========================================
 * RIGHT SIDEBAR
 * =========================================== */

.single-post__sidebar-right {
  display: none;
}

@media (min-width: 992px) {
  .single-post__sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background-color: #ffffff;
    padding: 24px;
    border-radius: 16px;
    align-self: start;
    position: sticky;
    top: calc(var(--header-height, 86px) + 24px);
  }
}

/* Print / Share */
.single-post__share {
  display: flex;
  align-items: center;
  gap: 32px;
}

.single-post__share-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.single-post__share-btn:hover {
  opacity: 0.8;
}

.single-post__share-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.single-post__share-text {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
  color: #6E4F95;
}

/* Related Pages */

.single-post__related-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 32px;
  color: #000000;
  margin: 0 0 12px;
}

.single-post__related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.single-post__related-item {
  position: relative;
  padding-left: 16px;
}

.single-post__related-item::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: #303030;
  font-size: 16px;
  line-height: 20px;
}

.single-post__related-item a {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  color: #303030;
  text-decoration: none;
  transition: color 0.2s ease;
}

.single-post__related-item a:hover {
  color: #6E4F95;
}

/* CTA Button */
.single-post__cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: #6E4F95;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.single-post__cta-btn:hover {
  background-color: #5A3F7A;
  color: #ffffff;
}

/* ===========================================
 * COMMENTS SECTION CONTAINER
 * Comments styles are in components/comments.css
 * =========================================== */

.single-post__comments {
  background-color: #ffffff;
  padding: 24px;
  border-radius: 16px;
}

@media (min-width: 992px) {
  .single-post__comments {
    padding: 32px;
  }
}

/* ===========================================
 * READ MORE SECTION
 * Based on Figma node: 1592-153816
 * =========================================== */

.single-post__read-more {
  background-color: #ffffff;
  padding: 24px;
  border-radius: 16px;
}

/* Widget Read More */
.widget-read-more__title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 32px;
  color: #6E4F95;
  margin: 0 0 16px;
}

.widget-read-more__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.widget-read-more__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #DBDBDB;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.widget-read-more__item:last-child {
  border-bottom: none;
}

.widget-read-more__item:hover {
  opacity: 1;
}

.widget-read-more__thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.widget-read-more__thumb img {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
}

.widget-read-more__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-read-more__item-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 16px;
  color: #303030;
  margin: 0;
}

.widget-read-more__meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.widget-read-more__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.widget-read-more__meta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.widget-read-more__meta-item span:last-child {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  color: #A6A6A6;
}
