/* Single Post Feature Styles
 * Loaded conditionally on is_singular('post')
 * Covers: reading time, TOC, social share, free guide CTA, post nav,
 *         editorial content (drop cap, headings, blockquotes, body text)
 *
 * Accessibility: All text meets WCAG 2.1 AA contrast on #1A1A1A bg:
 *   - cream (#FFF8F0) → ~15:1 ratio (AAA)
 *   - warm-gray (#C0C0C0) → ~10:1 ratio (AAA)
 *   - gold-bright (#FFD700) → ~11:1 ratio (AAA)
 *   - gold-deep (#B8860B) → ~4.6:1 ratio (AA large text only — used for accents/decorative)
 */

/* ========================================
   CATEGORY BADGE (Gold Pill)
   ======================================== */
.single-post .category-badge-gold a {
  background: var(--wp--preset--color--gold-deep);
  color: var(--wp--preset--color--rich-black);
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--wp--preset--font-family--heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}

.single-post .category-badge-gold a:hover {
  background: var(--wp--preset--color--gold-bright);
}

/* ========================================
   POST META ROW
   ======================================== */
.single-post .post-meta-row {
  align-items: center;
}

/* ========================================
   EDITORIAL FEATURED IMAGE
   ======================================== */
.single-post .editorial-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   READING TIME
   ======================================== */
.reading-time {
  font-size: 0.8rem;
  color: var(--wp--preset--color--warm-gray);
}

/* ========================================
   TABLE OF CONTENTS
   ======================================== */
.post-toc {
  background: var(--wp--preset--color--dark-charcoal);
  border-left: 4px solid var(--wp--preset--color--gold-deep);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}

.post-toc summary {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--wp--preset--color--gold-bright);
  cursor: pointer;
  padding: 20px 24px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.post-toc summary:hover {
  background: rgba(255, 215, 0, 0.05);
}

.post-toc summary::before {
  content: "\25B6";
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.post-toc[open] summary::before {
  transform: rotate(90deg);
}

.post-toc summary::-webkit-details-marker {
  display: none;
}

.post-toc ol {
  list-style: decimal;
  padding: 0 24px 20px 44px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-toc li {
  line-height: 1.5;
}

.post-toc li a {
  color: var(--wp--preset--color--cream);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.post-toc li a:hover {
  color: var(--wp--preset--color--gold-bright);
}

.post-toc__sub {
  padding-left: 20px;
  font-size: 0.9rem;
}

.post-toc__sub a {
  color: var(--wp--preset--color--warm-gray);
}

.post-toc__sub a:hover {
  color: var(--wp--preset--color--gold-bright);
}

/* ========================================
   EDITORIAL CONTENT — DROP CAP
   Uses heading font for visual weight.
   gold-deep is decorative (not body text),
   so AA large-text ratio of 4.6:1 is met.
   ======================================== */
.single-post .wp-block-post-content > p:first-of-type::first-letter {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 4rem;
  float: left;
  line-height: 0.8;
  margin-right: 10px;
  margin-top: 6px;
  color: var(--wp--preset--color--gold-deep);
  font-weight: 700;
}

/* ========================================
   EDITORIAL CONTENT — BODY TEXT
   warm-gray (#C0C0C0) on rich-black: ~10:1 ratio (AAA)
   ======================================== */
.single-post .wp-block-post-content > p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--wp--preset--color--warm-gray);
  margin-bottom: 1.5em;
}

/* ========================================
   EDITORIAL CONTENT — STRONG / BOLD
   cream (#FFF8F0) on rich-black: ~15:1 ratio (AAA)
   ======================================== */
.single-post .wp-block-post-content strong {
  color: var(--wp--preset--color--cream);
  font-weight: 700;
}

/* ========================================
   EDITORIAL CONTENT — HEADINGS (H2, H3)
   ======================================== */
.single-post .wp-block-post-content h2 {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--wp--preset--color--cream);
  margin-top: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.single-post .wp-block-post-content h3 {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--wp--preset--color--cream);
  margin-top: 36px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.single-post .wp-block-post-content h4 {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--wp--preset--color--cream);
  margin-top: 28px;
  margin-bottom: 12px;
  line-height: 1.35;
}

/* ========================================
   EDITORIAL CONTENT — BLOCKQUOTES
   Gold left bar + dark charcoal background.
   ======================================== */
.single-post .wp-block-post-content blockquote,
.single-post .wp-block-post-content .wp-block-quote {
  background: var(--wp--preset--color--dark-charcoal);
  border-left: 3px solid var(--wp--preset--color--gold-deep);
  border-top: none;
  border-right: none;
  border-bottom: none;
  padding: 28px 32px;
  margin: 40px 0;
  border-radius: 4px;
}

.single-post .wp-block-post-content blockquote p,
.single-post .wp-block-post-content .wp-block-quote p {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--wp--preset--color--cream);
  line-height: 1.6;
  margin-bottom: 0;
}

.single-post .wp-block-post-content blockquote cite,
.single-post .wp-block-post-content .wp-block-quote cite {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--wp--preset--color--warm-gray);
}

/* ========================================
   EDITORIAL CONTENT — PULL QUOTES
   Centered callout banner with border.
   ======================================== */
.single-post .wp-block-post-content .wp-block-pullquote {
  background: var(--wp--preset--color--dark-charcoal);
  border: 1px solid rgba(255, 215, 0, 0.15);
  padding: 32px 40px;
  margin: 40px 0;
  text-align: center;
  border-radius: 4px;
}

.single-post .wp-block-post-content .wp-block-pullquote p {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--wp--preset--color--gold-bright);
  line-height: 1.5;
}

.single-post .wp-block-post-content .wp-block-pullquote cite {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--wp--preset--color--warm-gray);
}

/* ========================================
   EDITORIAL CONTENT — DIVIDERS / SEPARATORS
   Subtle dark line between sections.
   ======================================== */
.single-post .wp-block-post-content hr,
.single-post .wp-block-post-content .wp-block-separator {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
  margin: 48px 0;
}

/* ========================================
   EDITORIAL CONTENT — IMAGES
   ======================================== */
.single-post .wp-block-post-content .wp-block-image img {
  border-radius: 6px;
}

.single-post .wp-block-post-content .wp-block-image figcaption {
  color: var(--wp--preset--color--warm-gray);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 12px;
}

/* ========================================
   EDITORIAL CONTENT — LISTS
   ======================================== */
.single-post .wp-block-post-content ul,
.single-post .wp-block-post-content ol {
  color: var(--wp--preset--color--warm-gray);
  line-height: 1.75;
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.single-post .wp-block-post-content li {
  margin-bottom: 0.4em;
}

.single-post .wp-block-post-content li strong {
  color: var(--wp--preset--color--cream);
}

/* ========================================
   EDITORIAL CONTENT — LINKS IN BODY
   ======================================== */
.single-post .wp-block-post-content a:not(.wp-block-button__link) {
  color: var(--wp--preset--color--gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.single-post .wp-block-post-content a:not(.wp-block-button__link):hover {
  color: var(--wp--preset--color--cream);
}

/* ========================================
   EDITORIAL CONTENT — CODE BLOCKS
   ======================================== */
.single-post .wp-block-post-content pre {
  background: var(--wp--preset--color--dark-charcoal);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 24px;
  overflow-x: auto;
  margin: 32px 0;
}

.single-post .wp-block-post-content code {
  font-size: 0.9rem;
  color: var(--wp--preset--color--cream);
}

/* ========================================
   SOCIAL SHARE BAR
   ======================================== */
/* ========================================
   SOCIAL SHARE BAR
   ======================================== */
.social-share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 215, 0, 0.15);
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.social-share-bar__label {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--wp--preset--color--gold-bright);
  margin-right: 12px;
}

/* Icon Links (Square-ish with rounded corners) */
.social-share-bar__icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05); /* Very subtle bg */
  color: var(--wp--preset--color--cream);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.social-share-bar__icon-link:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--wp--preset--color--gold-bright);
  color: var(--wp--preset--color--gold-bright);
  transform: translateY(-2px);
}

.social-share-bar__icon-link svg {
  display: block;
}

/* Copy Link Pill Button */
.social-share-bar__copy-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  height: 40px;
  border-radius: 20px; /* Pill shape */
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
  color: var(--wp--preset--color--cream);
  border: 1px solid rgba(255, 215, 0, 0.2);
  margin-left: 4px;
}

.social-share-bar__copy-pill:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--wp--preset--color--gold-bright);
  color: var(--wp--preset--color--gold-bright);
}

/* ========================================
   FREE GUIDE CTA - SEARCH AS EMAIL INPUT
   ======================================== */
.free-guide-cta-search .wp-block-search__inside-wrapper {
  border: 2px solid var(--wp--preset--color--gold-deep);
  border-radius: 8px;
  overflow: hidden;
  background: var(--wp--preset--color--dark-charcoal);
}

.free-guide-cta-search .wp-block-search__input {
  background: transparent;
  color: var(--wp--preset--color--cream);
  border: none;
  padding: 14px 20px;
  font-size: 1rem;
}

.free-guide-cta-search .wp-block-search__input::placeholder {
  color: var(--wp--preset--color--warm-gray);
}

.free-guide-cta-search .wp-block-search__button {
  background: linear-gradient(
    135deg,
    var(--wp--preset--color--gold-bright) 0%,
    var(--wp--preset--color--gold-deep) 100%
  );
  color: var(--wp--preset--color--rich-black);
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  padding: 14px 24px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.free-guide-cta-search .wp-block-search__button:hover {
  opacity: 0.9;
}

/* ========================================
   LATEST VIDEOS — COMPACT FORMAT
   On single posts, collapse the featured hero
   into the same small row format as list items.
   ======================================== */
.single-post .pl-latest-videos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.single-post .pl-latest-videos__featured {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.single-post .pl-latest-videos__thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  min-height: unset;
}

.single-post .pl-latest-videos__title {
  font-size: 0.85rem;
  line-height: 1.3;
}

.single-post .pl-latest-videos__cta {
  font-size: 0.75rem;
  padding: 6px 12px;
}

.single-post .pl-latest-videos__list {
  display: contents;
}

.single-post .pl-latest-videos__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-template-columns: unset;
}

.single-post .pl-latest-videos__item-thumb img {
  width: 100%;
  height: 140px;
  border-radius: 6px;
  object-fit: cover;
}

.single-post .pl-latest-videos__item-title {
  font-size: 0.85rem;
}

@media (max-width: 599px) {
  .single-post .pl-latest-videos {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .single-post .pl-latest-videos__thumb img,
  .single-post .pl-latest-videos__item-thumb img {
    height: 120px;
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .single-post .pl-latest-videos {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   POST NAVIGATION (DARK THEME)
   ======================================== */
.single-post .wp-block-post-navigation-link a {
  color: var(--wp--preset--color--gold-shimmer);
  text-decoration: none;
  font-family: var(--wp--preset--font-family--heading);
  transition: color 0.2s ease;
}

.single-post .wp-block-post-navigation-link a:hover {
  color: var(--wp--preset--color--cream);
}

.single-post .wp-block-post-navigation-link .post-navigation-link__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--wp--preset--color--warm-gray);
}

/* ========================================
   MOBILE (375px baseline)
   ======================================== */
@media (max-width: 599px) {
  /* Drop cap — smaller on mobile */
  .single-post .wp-block-post-content > p:first-of-type::first-letter {
    font-size: 3rem;
    margin-right: 8px;
    margin-top: 4px;
  }

  /* Headings — scale down */
  .single-post .wp-block-post-content h2 {
    font-size: 1.6rem;
    margin-top: 36px;
  }

  .single-post .wp-block-post-content h3 {
    font-size: 1.2rem;
    margin-top: 28px;
  }

  /* Blockquotes — reduce padding */
  .single-post .wp-block-post-content blockquote,
  .single-post .wp-block-post-content .wp-block-quote {
    padding: 20px 24px;
    margin: 28px 0;
  }

  .single-post .wp-block-post-content blockquote p,
  .single-post .wp-block-post-content .wp-block-quote p {
    font-size: 1.05rem;
  }

  /* Pull quotes — reduce padding */
  .single-post .wp-block-post-content .wp-block-pullquote {
    padding: 24px 20px;
    margin: 28px 0;
  }

  /* Social share */
  .social-share-bar {
    gap: 8px;
  }

  .social-share-bar a,
  .social-share-bar button {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  /* TOC */
  .post-toc summary {
    padding: 16px 20px;
    font-size: 0.85rem;
  }

  .post-toc ol {
    padding: 0 20px 16px 36px;
  }

  .post-toc li a {
    font-size: 0.88rem;
  }

  /* CTA */
  .free-guide-cta-search .wp-block-search__button {
    padding: 12px 16px;
    font-size: 0.8rem;
  }

  /* Separators */
  .single-post .wp-block-post-content hr,
  .single-post .wp-block-post-content .wp-block-separator {
    margin: 32px 0;
  }
}

/* ========================================
   TABLET (768px)
   ======================================== */
@media (min-width: 600px) and (max-width: 1023px) {
  .social-share-bar {
    justify-content: center;
  }

  .single-post .wp-block-post-content h2 {
    font-size: 1.8rem;
  }

  .single-post .wp-block-post-content h3 {
    font-size: 1.3rem;
  }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  .social-share-bar a:hover,
  .social-share-bar button:hover {
    transform: none;
  }
}
