@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

/**
 * Author Personal Blog - Entry Content & Singular Template Stylesheet
 * File: assets/css/entry-content.css
 * 
 * Scope: Single Post & Page Article Wrappers, Typography Engine (:where() 0-Specificity),
 *        Gutenberg Block Editor Isolation, Post Header & Meta Bar, Post Tags,
 *        Author Box, Previous/Next Navigation, and Threaded Comments & Form.
 * Loaded on: Single Posts (single.html) & Static Pages (page.html).
 */

/* ==========================================================================
   0. Block Editor Canvas Typography Base
   ========================================================================== */
.editor-styles-wrapper {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.editor-styles-wrapper :is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .editor-post-title__input) {
  font-family: 'Playfair Display', Georgia, Cambria, serif;
}

/* ==========================================================================
   1. Singular Article Containers (.apb-single-post, .apb-page-article)
   ========================================================================== */
.apb-single-post,
.apb-page-article {
  background-color: var(--apb-color-bg-card);
  border: 1px solid var(--apb-color-border);
  border-radius: var(--apb-radius-md);
  padding: clamp(1.25rem, 4vw, 2.75rem);
  box-shadow: var(--apb-shadow-sm);
  min-width: 0;
  width: 100%;
}

/* Featured Media Wrappers */
.apb-single-featured-image-wrap,
.apb-page-featured-media {
  margin-bottom: var(--apb-space-8);
  border-radius: var(--apb-radius-sm);
  overflow: hidden;
}

.apb-single-featured-image,
.apb-page-featured-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.apb-single-featured-image-wrap figcaption {
  font-size: var(--apb-font-size-xs);
  font-style: italic;
  color: var(--apb-color-text-muted);
  text-align: center;
  padding: 0.5rem 0 0 0;
}

/* Post Header & Rich Meta Bar (Single Posts) */
.apb-post-header {
  margin-bottom: var(--apb-space-6);
}

.apb-single-post-title {
  font-size: clamp(1.75rem, 4vw + 0.3rem, 2.65rem);
  font-family: var(--apb-font-serif);
  font-weight: var(--apb-font-weight-extrabold);
  line-height: 1.2;
  color: var(--apb-color-heading);
  margin: var(--apb-space-3) 0 var(--apb-space-4) 0;
  overflow-wrap: break-word;
}

.apb-single-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 1.25rem);
  padding-bottom: var(--apb-space-4);
  border-bottom: 1px solid var(--apb-color-border);
  font-size: var(--apb-font-size-xs);
  color: var(--apb-color-text-muted);
}

.apb-meta-author {
  display: flex;
  align-items: center;
  gap: var(--apb-space-2);
  color: var(--apb-color-heading);
  font-weight: var(--apb-font-weight-semibold);
}

.apb-meta-author-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--apb-radius-full);
  object-fit: cover;
  border: 2px solid var(--apb-color-primary-light);
}

.apb-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.apb-meta-item svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ==========================================================================
   2. Entry Content Base (.apb-entry-content)
   ========================================================================== */
.apb-entry-content {
  font-family: var(--apb-font-sans);
  font-size: var(--apb-font-size-base);
  line-height: var(--apb-line-height-relaxed);
  color: var(--apb-color-text);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.apb-entry-content::after {
  content: "";
  display: table;
  clear: both;
}

/* ==========================================================================
   3. Zero-Specificity Element Styling via :where()
      (Allows Gutenberg Block inline/attribute overrides with zero conflict)
   ========================================================================== */
.apb-entry-content :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--apb-font-serif);
  color: var(--apb-color-heading);
  font-weight: var(--apb-heading-font-weight, 700);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: normal;
}

.apb-entry-content :where(h1) {
  font-size: var(--apb-font-size-h1);
  line-height: var(--apb-line-height-h1);
  letter-spacing: var(--apb-letter-spacing-h1);
  font-weight: var(--apb-heading-font-weight-heavy, 800);
  margin-top: 2.75rem;
  margin-bottom: 1.25rem;
}

.apb-entry-content :where(h2) {
  font-size: var(--apb-font-size-h2);
  line-height: var(--apb-line-height-h2);
  letter-spacing: var(--apb-letter-spacing-h2);
  margin-top: 2.5rem;
  margin-bottom: 1.15rem;
}

.apb-entry-content :where(h3) {
  font-size: var(--apb-font-size-h3);
  line-height: var(--apb-line-height-h3);
  letter-spacing: var(--apb-letter-spacing-h3);
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

.apb-entry-content :where(h4) {
  font-size: var(--apb-font-size-h4);
  line-height: var(--apb-line-height-h4);
  letter-spacing: var(--apb-letter-spacing-h4);
  margin-top: 2rem;
  margin-bottom: 0.85rem;
}

.apb-entry-content :where(h5) {
  font-size: var(--apb-font-size-h5);
  line-height: var(--apb-line-height-h5);
  letter-spacing: var(--apb-letter-spacing-h5);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.apb-entry-content :where(h6) {
  font-size: var(--apb-font-size-h6);
  line-height: var(--apb-line-height-h6);
  letter-spacing: var(--apb-letter-spacing-h6);
  text-transform: uppercase;
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
}

.apb-entry-content :where(p) {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.apb-entry-content :where(a) {
  color: var(--apb-color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: var(--apb-font-weight-medium);
}

.apb-entry-content :where(a):hover {
  color: var(--apb-color-accent);
}

.apb-entry-content :where(strong, b) {
  font-weight: var(--apb-font-weight-bold);
  color: var(--apb-color-heading);
}

.apb-entry-content :where(em, i) {
  font-style: italic;
}

.apb-entry-content :where(del, s) {
  text-decoration: line-through;
  opacity: 0.75;
}

.apb-entry-content :where(ins) {
  background-color: var(--apb-color-primary-light);
  text-decoration: none;
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.apb-entry-content :where(mark) {
  background-color: #fef08a;
  color: #1e293b;
  padding: 0.1em 0.4em;
  border-radius: 2px;
}

.apb-entry-content :where(sub, sup) {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

.apb-entry-content :where(sup) {
  top: -0.5em;
}

.apb-entry-content :where(sub) {
  bottom: -0.25em;
}

/* Lists */
.apb-entry-content :where(ul, ol) {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.apb-entry-content :where(ul) {
  list-style-type: disc;
}

.apb-entry-content :where(ol) {
  list-style-type: decimal;
}

.apb-entry-content :where(li) {
  margin-bottom: 0.5rem;
  line-height: var(--apb-line-height-base);
}

.apb-entry-content :where(ul ul, ol ol, ul ol, ol ul) {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
  padding-left: 1.25rem;
}

.apb-entry-content :where(dl) {
  margin-bottom: 1.5rem;
}

.apb-entry-content :where(dt) {
  font-weight: var(--apb-font-weight-bold);
  color: var(--apb-color-heading);
  margin-top: 0.75rem;
}

.apb-entry-content :where(dd) {
  margin-left: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Tables */
.apb-entry-content :where(table) {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--apb-font-size-sm);
  margin-bottom: 1.75rem;
}

.apb-entry-content :where(th) {
  background-color: var(--apb-color-bg-alt);
  color: var(--apb-color-heading);
  font-weight: var(--apb-font-weight-bold);
  padding: 0.75rem 1rem;
  border: 1px solid var(--apb-color-border);
  text-align: left;
}

.apb-entry-content :where(td) {
  padding: 0.75rem 1rem;
  border: 1px solid var(--apb-color-border);
}

.apb-entry-content :where(tr:nth-child(even) td) {
  background-color: #fcfdfe;
}

.apb-entry-content :where(caption) {
  font-size: var(--apb-font-size-xs);
  font-style: italic;
  color: var(--apb-color-text-muted);
  padding: 0.5rem 0;
  text-align: left;
}

/* Quotes & Blockquotes (Frontend Scope) */
.apb-entry-content blockquote {
  margin: 1.75rem 0;
  transition: all var(--apb-transition-fast, 0.2s ease);
}

/* Default Theme Style (Applied ONLY when NOT Plain style) */
.apb-entry-content blockquote:not(.is-style-plain),
.apb-entry-content .wp-block-quote:not(.is-style-plain) {
  border-left: 3px solid var(--apb-color-accent, #e07a5f);
  background-color: var(--apb-color-bg-body, #f8fafc);
  padding: 1.25rem 1.75rem;
  border-radius: 0 8px 8px 0;
}

.apb-entry-content blockquote:not(.is-style-plain) p,
.apb-entry-content .wp-block-quote:not(.is-style-plain) p {
  font-family: var(--apb-font-serif);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--apb-color-heading);
  margin-bottom: 0;
}

.apb-entry-content blockquote cite,
.apb-entry-content .wp-block-quote cite {
  font-family: var(--apb-font-sans);
  font-size: var(--apb-font-size-xs, 0.875rem);
  font-style: normal;
  font-weight: var(--apb-font-weight-bold, 600);
  color: var(--apb-color-accent);
  margin-top: 0.5rem;
  display: block;
}

/* Explicit Plain Style Variation (.is-style-plain overrides theme border) */
.apb-entry-content blockquote.is-style-plain,
.apb-entry-content .wp-block-quote.is-style-plain {
  border-left: none;
  background-color: transparent;
  padding: 0.5rem 0;
  border-radius: 0;
}

.apb-entry-content .wp-block-quote.is-style-plain p {
  font-style: italic;
}

/* Code & Preformatted */
.apb-entry-content :where(code, kbd, samp) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  background-color: var(--apb-color-bg-alt);
  color: #be185d;
  padding: 0.2em 0.45em;
  border-radius: 4px;
  border: 1px solid var(--apb-color-border);
}

.apb-entry-content :where(pre) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  background-color: #0f172a;
  color: #f8fafc;
  padding: 1.25rem 1.5rem;
  border-radius: var(--apb-radius-md);
  overflow-x: auto;
  margin-bottom: 1.75rem;
  box-shadow: var(--apb-shadow-sm);
  border: 1px solid #334155;
}

.apb-entry-content :where(pre code) {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

.apb-entry-content :where(hr) {
  border: 0;
  height: 1px;
  background-color: var(--apb-color-border-dark);
  margin-block: 2.5rem;
  width: 100%;
}

/* ==========================================================================
   4. Native Gutenberg Block Editor Support
   ========================================================================== */
/* Drop Cap */
.apb-entry-content .has-drop-cap:not(:focus):first-letter {
  float: left;
  font-family: var(--apb-font-serif);
  font-size: 4.25rem;
  line-height: 0.85;
  font-weight: var(--apb-font-weight-bold);
  margin-right: 0.85rem;
  margin-top: 0.2rem;
  color: var(--apb-color-primary);
}

/* Gutenberg Pullquote */
.apb-entry-content .wp-block-pullquote {
  border-block: 3px solid var(--apb-color-primary);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 1.35rem;
  font-family: var(--apb-font-serif);
  font-style: italic;
  color: var(--apb-color-primary);
  margin-block: 2.5rem;
  background: none;
}

.apb-entry-content .wp-block-pullquote blockquote {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

/* Gutenberg Multi-Column Block */
.apb-entry-content .wp-block-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.apb-entry-content .wp-block-column {
  min-width: 0;
}

/* Callout Notice Box (.is-style-callout, .is-style-callout-box) */
.apb-callout-box,
.apb-entry-content .wp-block-group.is-style-callout,
.apb-entry-content .wp-block-group.is-style-callout-box {
  background-color: var(--apb-color-bg-body, #f8fafc);
  border-left: 4px solid var(--apb-color-primary, #0d5c63);
  padding: 1.25rem 1.75rem;
  border-radius: 0 var(--apb-radius-md, 8px) var(--apb-radius-md, 8px) 0;
  margin-bottom: 1.75rem;
}

/* Gutenberg Buttons */
.apb-entry-content .wp-block-button {
  margin-bottom: 1.5rem;
}

.apb-entry-content .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background-color: var(--apb-color-primary);
  color: #ffffff;
  text-decoration: none;
  font-weight: var(--apb-font-weight-semibold);
  border-radius: var(--apb-radius-sm);
  transition: all var(--apb-transition-fast);
  line-height: 1.2;
}

.apb-entry-content .wp-block-button__link:hover {
  background-color: var(--apb-color-primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Button Variations: Primary Pill & Outline Coral */
.apb-entry-content .wp-block-button.is-style-primary-pill .wp-block-button__link {
  border-radius: 9999px;
  padding: 0.75rem 2rem;
}

.apb-entry-content .wp-block-button.is-style-outline-coral .wp-block-button__link {
  background-color: transparent;
  border: 2px solid var(--apb-color-accent, #e07a5f);
  color: var(--apb-color-accent, #e07a5f);
  border-radius: var(--apb-radius-sm, 6px);
  padding: 0.75rem 1.75rem;
}

.apb-entry-content .wp-block-button.is-style-outline-coral .wp-block-button__link:hover {
  background-color: var(--apb-color-accent, #e07a5f);
  color: #ffffff;
  transform: translateY(-2px);
}

/* List Variation: Checkmark List */
.apb-entry-content ul.is-style-checkmark-list {
  list-style: none;
  padding-left: 0;
}

.apb-entry-content ul.is-style-checkmark-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.65rem;
  line-height: 1.6;
}

.apb-entry-content ul.is-style-checkmark-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1rem;
  height: 1rem;
  background-color: var(--apb-color-primary, #0d5c63);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Image Variation: 3D Book Shadow */
.apb-entry-content .wp-block-image.is-style-book-cover-3d img,
.apb-entry-content figure.is-style-book-cover-3d img {
  box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.18), 0 2px 4px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  transition: transform var(--apb-transition-fast, 0.2s ease), box-shadow var(--apb-transition-fast, 0.2s ease);
}

.apb-entry-content .wp-block-image.is-style-book-cover-3d img:hover,
.apb-entry-content figure.is-style-book-cover-3d img:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 6px 12px 24px rgba(0, 0, 0, 0.22);
}

/* Table Variations: Card Table & Minimal Striped */
.apb-table-wrapper,
.apb-entry-content .wp-block-table {
  overflow-x: auto;
  margin-bottom: 1.75rem;
  width: 100%;
}

.apb-entry-content .wp-block-table.is-style-card-table {
  border: 1px solid var(--apb-color-border, #e2e8f0);
  border-radius: var(--apb-radius-md, 8px);
  overflow: hidden;
  box-shadow: var(--apb-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
  margin-bottom: 2rem;
}

.apb-entry-content .wp-block-table.is-style-card-table th {
  background-color: var(--apb-color-bg-body, #f8fafc);
  font-weight: 700;
  border-bottom: 2px solid var(--apb-color-border, #e2e8f0);
}

.apb-entry-content .wp-block-table.is-style-striped-minimal tr:nth-child(even) {
  background-color: var(--apb-color-bg-body, #f8fafc);
}

.apb-entry-content .wp-block-table.is-style-striped-minimal td,
.apb-entry-content .wp-block-table.is-style-striped-minimal th {
  border: none;
  border-bottom: 1px solid var(--apb-color-border, #e2e8f0);
}

/* ==========================================================================
   Image Block & Figcaption Display Parity
   ========================================================================== */

.apb-entry-content figure,
.apb-entry-content .wp-block-image {
  margin: 2rem auto;
  max-width: 100%;
}

.apb-entry-content .wp-block-image img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

/* Ensure centered figures and their captions maintain full optical width */
.apb-entry-content .wp-block-image.aligncenter,
.apb-entry-content figure.aligncenter {
  display: table;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Figcaption Formatting */
.apb-entry-content figure figcaption,
.apb-entry-content .wp-block-image figcaption {
  display: table-caption;
  caption-side: bottom;
  width: 100%;
  margin-top: 0.65rem;
  font-family: var(--apb-font-sans);
  font-size: var(--apb-font-size-xs, 0.8125rem);
  line-height: 1.5;
  color: var(--apb-color-text-muted, #64748b);
  text-align: center;
  word-wrap: break-word;
  white-space: normal;
}

.apb-entry-content figure figcaption a,
.apb-entry-content .wp-block-image figcaption a {
  color: var(--apb-color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==========================================================================
   Standardized Block Alignments (Left, Right, Center)
   ========================================================================== */

/* Align Left */
.apb-entry-content .alignleft,
.apb-entry-content [data-align="left"] {
  float: left;
  margin-right: 1.75rem;
  margin-bottom: 1.25rem;
  margin-top: 0.5rem;
  max-width: 50%;
}

/* Align Right */
.apb-entry-content .alignright,
.apb-entry-content [data-align="right"] {
  float: right;
  margin-left: 1.75rem;
  margin-bottom: 1.25rem;
  margin-top: 0.5rem;
  max-width: 50%;
}

/* Align Center */
.apb-entry-content .aligncenter,
.apb-entry-content [data-align="center"] {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Clearfix for following elements that should not wrap */
.apb-entry-content :is(h1, h2, h3, h4, h5, h6):has(+ .alignleft, + .alignright) {
  clear: both;
}

/* ==========================================================================
   Wide & Full Width Alignments Breakout
   ========================================================================== */

/* Align Wide */
.apb-entry-content .alignwide {
  position: relative;
  width: calc(100% + clamp(2rem, 6vw, 5rem));
  max-width: 1200px;
  margin-left: calc(-1 * clamp(1rem, 3vw, 2.5rem));
  margin-right: calc(-1 * clamp(1rem, 3vw, 2.5rem));
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  clear: both;
}

/* Container Protection for Pattern Groups */
.apb-entry-content > .wp-block-group,
.apb-entry-content .wp-block-columns,
.apb-single-post .apb-entry-content .alignwide,
.apb-page-article .apb-entry-content .alignwide,
.apb-single-post .apb-entry-content .alignfull,
.apb-page-article .apb-entry-content .alignfull,
.apb-entry-content > .wp-block-group.alignfull {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

/* Ensure Column Images Scale Inside Grid */
.apb-entry-content .wp-block-columns .wp-block-column img,
.apb-entry-content .is-style-book-cover-3d img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

/* Align Full (Full-bleed breakout) */
.apb-entry-content .alignfull {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 3rem;
  margin-bottom: 3rem;
  clear: both;
}

.apb-entry-content .alignfull img {
  width: 100%;
  height: auto;
  border-radius: 0;
}

/* Full bleed breakout wrapper helper */

/* Embedded Media */
.apb-entry-content iframe,
.apb-entry-content video,
.apb-entry-content audio,
.apb-entry-content .wp-block-embed,
.apb-entry-content .wp-block-embed__wrapper {
  max-width: 100%;
  border-radius: var(--apb-radius-sm);
  margin-block: 1.5rem;
}

.apb-entry-content iframe {
  width: 100%;
  border: 0;
}

.apb-entry-content audio {
  width: 100%;
}

/* ==========================================================================
   5. Singular Accessories (Tags, Author Box, Nav, Comments)
   ========================================================================= */
.apb-single-post-footer {
  margin-top: var(--apb-space-10);
  padding-top: var(--apb-space-6);
  border-top: 1px solid var(--apb-color-border);
}

/* Post Tags */
.apb-post-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--apb-space-2);
  margin-bottom: var(--apb-space-8);
}

.apb-post-tags-title {
  font-size: var(--apb-font-size-sm);
  font-weight: var(--apb-font-weight-bold);
  color: var(--apb-color-heading);
  margin-right: var(--apb-space-2);
}

.apb-tag-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background-color: var(--apb-color-bg-alt);
  color: var(--apb-color-text);
  font-size: var(--apb-font-size-xs);
  font-weight: var(--apb-font-weight-medium);
  border-radius: var(--apb-radius-full);
  border: 1px solid var(--apb-color-border);
  transition: all var(--apb-transition-fast);
}

.apb-tag-pill:hover {
  background-color: var(--apb-color-primary);
  color: #ffffff;
  border-color: var(--apb-color-primary);
}

/* Author Box */
.apb-author-box {
  display: flex;
  align-items: center;
  gap: var(--apb-space-6);
  background-color: var(--apb-color-bg-alt);
  border: 1px solid var(--apb-color-border);
  border-radius: var(--apb-radius-md);
  padding: var(--apb-space-6);
  margin-bottom: var(--apb-space-8);
}

.apb-author-box-avatar {
  width: 84px;
  height: 84px;
  border-radius: var(--apb-radius-full);
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: var(--apb-shadow-sm);
  flex-shrink: 0;
}

.apb-author-box-content {
  display: flex;
  flex-direction: column;
  gap: var(--apb-space-2);
}

.apb-author-box-name {
  font-family: var(--apb-font-serif);
  font-size: var(--apb-font-size-md);
  font-weight: var(--apb-font-weight-bold);
  color: var(--apb-color-heading);
  margin: 0;
}

.apb-author-box-bio {
  font-size: var(--apb-font-size-sm);
  color: var(--apb-color-text);
  line-height: var(--apb-line-height-base);
  margin: 0;
}

/* ==========================================================================
   5b. Previous & Next Post Navigation Cards
   ========================================================================== */
.apb-post-navigation {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--apb-color-border, #e2e8f0);
  border-bottom: 1px solid var(--apb-color-border, #e2e8f0);
}

.apb-post-navigation .apb-nav-link {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  background-color: var(--apb-color-bg-alt, #f8fafc);
  border: 1px solid var(--apb-color-border, #e2e8f0);
  border-radius: var(--apb-radius-md, 8px);
  text-decoration: none;
  transition: all var(--apb-transition-fast, 0.2s ease);
}

.apb-post-navigation .apb-nav-link:hover {
  background-color: #ffffff;
  border-color: var(--apb-color-primary, #0d5c63);
  box-shadow: var(--apb-shadow-card, 0 4px 12px rgba(0, 0, 0, 0.05));
  transform: translateY(-2px);
}

.apb-post-navigation .apb-nav-link-next {
  text-align: right;
}

.apb-post-navigation .apb-nav-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--apb-color-accent, #e07a5f);
  margin-bottom: 0.4rem;
}

.apb-post-navigation .apb-nav-title {
  font-family: var(--apb-font-serif, serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--apb-color-heading, #1e293b);
  line-height: 1.4;
}

/* ==========================================================================
   5c. Related / Recommended Posts Grid
   ========================================================================== */
.apb-related-posts-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--apb-color-border, #e2e8f0);
  width: 100%;
}

.apb-related-title {
  font-family: var(--apb-font-serif, serif);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: var(--apb-color-heading, #1e293b);
  margin-bottom: 2rem;
}

.apb-related-posts-section .apb-related-grid,
.apb-related-posts-section .apb-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  width: 100%;
  margin-bottom: 0;
}

/* ==========================================================================
   6. Responsive Rules for Singular Articles
   ========================================================================== */
@media (max-width: 1024px) {
  .apb-related-posts-section .apb-related-grid,
  .apb-related-posts-section .apb-posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .apb-author-box {
    flex-direction: column;
    text-align: center;
  }

  .apb-post-navigation {
    grid-template-columns: 1fr;
  }

  .apb-post-navigation .apb-nav-link-next {
    text-align: left;
  }

  .apb-related-posts-section .apb-related-grid,
  .apb-related-posts-section .apb-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   7. Full Width Canvas Template (Landing Page)
   ========================================================================== */
.apb-canvas-template {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.apb-canvas-article {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.apb-canvas-content {
  width: 100%;
  max-width: 100%;
}

.apb-canvas-content > .wp-block-group.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
}