/* Prevent horizontal scrolling */
html, body {
   overflow-x: hidden;
   max-width: 100%;
   margin: 0;
   padding: 0;
}

/* Post Layout */
.post {
   max-width: 700px;
   margin: 0 auto;
}
 
 /* Element Alignment */
 .post-category,
 .post-title,
 .post-excerpt,
 .post-meta {
    text-align: left;
 }
 
 /* Category Styling */
 .post-category {
    font-family: "open sans", sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #2E8B57;
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-top: 120px;
 }
 
 .post-category a {
    color: #2E8B57;
    text-decoration: none;
    font-weight: 400;
 }
 
 .post-category a:hover {
    text-decoration: underline;
 }
 
 /* Title */
 .post-title {
    font-size: 45px;
    font-family: "Fjalla One", sans-serif;
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.3;
 }
 
 /* Excerpt */
 .post-excerpt {
    display: none;
 }
 
/* Content padding */
/* Desktop: no side padding */
.post-category,
.post-title,
.post-excerpt,
.post-meta,
.post-content p,
.post-content blockquote {
   padding: 0;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
   margin-bottom: 20px;
   margin-top: 40px;
   font-family: "Fjalla One", sans-serif;
   font-weight: 400 !important;
   line-height: 1.3;
}

.post-content h2 {
   font-size: 40px;
}

.post-content h3 {
   font-size: 30px;
}

.post-content {
   font-family: "noto serif", serif;
   font-size: 20px;
   font-weight: 400;
   line-height: 1.8 !important;
   color: black;
}

@media (max-width: 768px) {
   .post-content {
      font-size: 18px;
   }
}

/* Mobile override */
@media (max-width: 768px) {
   .post-category,
   .post-title,
   .post-excerpt,
   .post-meta,
   .post-content p,
   .post-content blockquote,
   .post-content h1,
   .post-content h2,
   .post-content h3,
   .post-content h4,
   .post-content h5,
   .post-content h6 {
     padding: 0 10px;
   }

   .post-title {
      margin-bottom: 10px;
   }
}

/* Full-width images */
/* Default (desktop) – keep images within the main content width */
.post-image,
.post-content figure {
  max-width: 850px;         /* match your .post max-width */
  margin: 0 auto 30px;      /* center them, add bottom spacing */
  width: 100%;              /* fill the container */
}

.post-content figure:has(figcaption) {
  margin-bottom: 0;
}
.post-content figcaption {
  margin-bottom: 30px;
}

/* Mobile override – force full-bleed */
@media (max-width: 768px) {
  .post-image,
  .post-content figure {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
  }
}

.post-image img,
.post-content img {
   width: 100%;
   height: auto;
   display: block;
   aspect-ratio: 4/3;
   object-fit: cover;
}

/* Figure margin handled above */

/* .post-content img:not(figure img) {
  margin-bottom: 30px !important;
} */

/* Keep captions within content width */
.post-image figcaption,
.post-content figcaption {
   font-family: "open sans", sans-serif;
   padding-left: 10px;
   padding-right: 10px;
   max-width: 850px;
   margin-top: 6px; /* keep vertical spacing tight to image */
   margin-bottom: 30px;
   margin-left: auto;
   margin-right: auto;
   font-size: 14px;
   color: #333;
   text-align: right;
   box-sizing: border-box;
}
.post-meta-mobile {
   display: none;
}

/* Meta Info */
.post-meta .post-author {
   position: relative;
   font-family: "instrument serif", serif;
   font-size: 23px;
   font-weight: 400;
   text-transform: none;
}

.post-meta .post-date {
   font-family: "instrument serif", serif;
   font-weight: 400;
   color: #777777;
   position: relative;
   font-size: 20px;
   font-weight: 500;
   margin-left: 30px;
}

@media (max-width: 768px) {
   .post-meta-desktop {
      display: none;
   }

   .post-meta-mobile {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      padding: 0 10px;
      margin: 0 0 28px;
   }

   .post-meta .post-author {
      font-size: 18px;
   }

   .post-meta .post-date {
      font-size: 18px;
      margin-left: 30px;
   }
}
 
 /* Content Links ------------------------------------------------------------------ */
 .post-content a {
    color: #2E8B57;
    text-decoration: none;
    font-weight: 400;
 }
 
 .post-content a:hover {
    text-decoration: underline;
 }
 
 /* Paragraphs -----------------------------------------------------------------*/
 .post-content p {
   margin-bottom: 30px;
 }

 @media (max-width: 768px) {
   .post-content blockquote {
      font-size: 18px !important; /* Smaller font for mobile */
   }
 }
 
 /* Blockquotes */
 .post-content blockquote {
    margin: 40px 0;
    padding-left: 30px;
    border-left: 10px solid red;
    font-size: 20px;
    font-family: "noto serif", serif;
    line-height: 1.8;
    font-style: italic;
 }

/* Page break styling ////////////////////////////// */

/* Page break styling - simple approach */
.post-content hr {
   border: none;
   text-align: center;
   margin: 0 0;
}

.post-content hr::after {
   content: "⟁ ⟁ ⟁"; /* Add spaces between the symbols */
   font-size: 30px;
   font-weight: bold;
   color: red;
   word-spacing: 50px; /* Use word-spacing instead of letter-spacing */
   margin: 10px auto 40px;
   display: inline-block;
}

@media (max-width: 768px) {
   .post-content hr::after {
       font-size: 26px;
       word-spacing: 30px;
   }
}

 /* Audio Cards Styling ////////////////////////////// */

 .post-content audio,
 .post-content .kg-audio-card {
    width: 100%; /* Ensures it spans the full post width */
    max-width: 850px; /* Keeps it from overflowing the container */
    margin: 0 auto 35px; /* Center and add breathing room below */
    background: #fff;
 }

 .post-content audio {
   border: 1px solid black;
   border-radius: 10px;
   padding: 6px 10px;
   box-shadow: none;
   accent-color: black;
 }

 .post-content .kg-audio-card {
   border: 1px solid black;
   border-radius: 16px;
   padding: 24px 28px;
   box-shadow: none;
   display: grid;
   gap: 16px;
 }

 .kg-audio-card .kg-audio-thumbnail {
    display: none !important; /* Hides the green icon box */
 }

 .kg-audio-card .kg-audio-title,
 .kg-audio-card h2,
 .kg-audio-card h3 {
    font-family: "open sans", sans-serif;
    font-size: 20px;
    font-weight: 400;
    margin: 0;
    color: black;
    padding: 0;
    text-transform: uppercase;
}

 .kg-audio-card .kg-audio-meta,
 .kg-audio-card .kg-audio-description,
 .kg-audio-card p {
    font-family: "open sans", sans-serif;
    font-size: 16px;
    color: #111;
    margin: 0;
 }

.kg-audio-card .kg-audio-player-container {
    display: flex;
    align-items: center;
    gap: 18px;
    border-top: 1px solid black;
    padding: 16px 0 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0;
    padding-left: 0;
    width: 100%;
    text-align: left;
}

.kg-audio-card button.kg-audio-play-icon,
.kg-audio-card button.kg-audio-pause-icon {
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    border: none;
    color: black;
    display: grid;
    place-items: center;
    line-height: 0;
    box-shadow: none;
    padding: 0;
    transition: color 0.2s ease;
    cursor: pointer;
    margin-right: 32px;
}

.kg-audio-card button.kg-audio-play-icon svg,
.kg-audio-card button.kg-audio-pause-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: none;
    display: block;
}

.kg-audio-card button.kg-audio-play-icon:hover,
.kg-audio-card button.kg-audio-pause-icon:hover {
    color: rgba(0, 0, 0, 0.6);
 }

.kg-audio-card .kg-audio-seekbar,
.kg-audio-card .kg-audio-track {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
    margin-right: 12px;
}

 .kg-audio-card .kg-audio-progress,
 .kg-audio-card .kg-audio-seekbar-progress {
    height: 100%;
    background: black;
 }

.kg-audio-card .kg-audio-time,
.kg-audio-card .kg-audio-duration,
.kg-audio-card .kg-audio-playback-rate {
    font-family: "cascade mono", monospace;
    font-size: 13px;
    color: #111;
 }

.kg-audio-card .kg-audio-playback-rate {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid black;
    background: transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin: 0 20px;
}

.kg-audio-card .kg-audio-player-volume,
.kg-audio-card .kg-audio-volume {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kg-audio-card .kg-audio-volume-slider {
    width: 90px;
}

 .kg-audio-card .kg-audio-playback-rate:hover {
    background: black;
    color: #fff;
 }

/* X / Twitter embeds */
.post-content figure.kg-embed-card {
   margin: 0 auto 30px;
}

@media (min-width: 769px) {
   .post-content figure.kg-embed-card {
      width: 100%;
      max-width: 850px;
   }

   .post-content figure.kg-embed-card iframe,
   .post-content figure.kg-embed-card blockquote,
   .post-content figure.kg-embed-card twitter-widget {
      display: block;
      width: 100% !important;
      margin-left: 0;
      margin-right: 0;
      max-width: 100% !important;
   }

   .post-content figure.kg-embed-card twitter-widget {
      min-width: 0 !important;
   }
}

@media (max-width: 768px) {
   .post-content figure.kg-embed-card {
      width: calc(100% - 20px);
      margin: 0 10px 30px;
   }

   .post-content figure.kg-embed-card iframe,
   .post-content figure.kg-embed-card blockquote {
      width: 100% !important;
      margin-left: 0;
      margin-right: 0;
   }
}

@media (max-width: 600px) {
  .post-content .kg-audio-card {
      padding: 20px;
      gap: 16px;
  }

  .kg-audio-card .kg-audio-player-container {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      padding: 14px 0 0;
  }

  .kg-audio-card .kg-audio-seekbar,
  .kg-audio-card .kg-audio-track {
      order: 3;
      flex-basis: 100%;
   }

   .kg-audio-card button.kg-audio-play-icon,
   .kg-audio-card button.kg-audio-pause-icon {
      width: auto;
      height: auto;
   }

   .kg-audio-card .kg-audio-playback-rate {
      margin: 0 18px;
   }

   .kg-audio-card .kg-audio-player-volume button,
   .kg-audio-card .kg-audio-player-volume button svg {
      color: black;
      fill: black;
      stroke: black;
   }
 }

@media (max-width: 768px) {
  .post-content .kg-audio-card,
  .post-content audio {
     width: calc(100% - 20px);
     margin: 0 10px 30px;
  }
}

/* Related Posts Section ////////////////////////// */

.related-posts {
   max-width: 1200px;
   margin: 15px auto 40px;
   padding: 0 20px;
}

.related-posts h2 {
   font-family: "Fjalla One", sans-serif;
   font-weight: 300;
   font-size: 70px;
   text-align: left;
   margin-bottom: 50px;
   margin-top: 10px;
   color: black;
   opacity: 0.9;
   position: relative;
}

@media (min-width: 769px) {
   .related-posts {
      margin-top: 25px;
   }
}

.related-posts h2::after {
   content: '';
   position: absolute;
   left: 0;
   bottom: -5px;
   width: 100%;
   height: 5px;
   background-color: black;
   opacity: 0.9;
}

.related-posts-grid {
   display: flex;
   flex-direction: column;
   gap: 40px;
}

.related-post {
   display: flex;
   gap: 20px;
   padding-bottom: 40px;
   border-bottom: 1px dashed black;
}

.related-post-image {
   width: 200px;
   flex-shrink: 0;
   margin-right: 10px;
}

.related-post-image img {
   width: 100%;
   aspect-ratio: 3/2;
   object-fit: cover;
   border-radius: 3px;
   transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
   .related-post-image img {
       aspect-ratio: 1/1;
   }
}

.related-post-image:hover img {
   opacity: 0.7;
}

.related-post-content {
   flex: 1;
   display: flex;
   flex-direction: column;
   gap: 10px;
}

.related-post-tag {
   font-family: "Open Sans", sans-serif;
   color: #2E8B57;
   text-decoration: none;
   text-transform: uppercase;
   font-weight: 500;
   font-size: 16px !important;
}

.related-post-tag:hover {
   text-decoration: underline;
}

/* Replace h3 with custom class */
.related-post-title {
   font-family: "Fjalla One", sans-serif;
   font-weight: 400;
   font-size: 30px;
   margin: 0;
   line-height: 1.3;
}

.related-post-title a {
   color: #000;
   text-decoration: none;
   transition: opacity 0.3s ease;
   margin-top: 0 !important;
}

/* New excerpt styling */
.related-post-excerpt {
   font-family: "open sans", sans-serif;
   font-size: 20px;
   font-weight: 400;
   line-height: 1.5;
   color: rgb(114, 114, 114);
   margin: 8px 0 0 0;
}

@media (max-width: 768px) {
   .post-title {
      font-size: 38px;
      margin-bottom: 22px;
   }

   .related-posts {
       padding: 0 10px;
   }

   .post-category {
      font-size: 18px;
      margin-top: 120px !important;
      margin-bottom: 10px !important;
   }

   .post-content h2 {
      font-size: 35px !important;
   }
   
   .post-content h3 {
      font-size: 28px !important;
   }

   .related-posts h2 {
       font-size: 35px;
       margin-top: 40px !important;
       margin-bottom: 40px !important;
   }

   .related-post {
       gap: 20px;
   }

   .related-posts {
      font-size: 14px;
   }

   .related-post-image {
       width: 100px;
       margin-right: 0;
   }

   .related-post-title {
       font-size: 24px;
       margin-top: -5px !important;
   }
   
   .related-post-excerpt {
       display: none;
   }

   .related-post-tag {
      font-size: 13px !important;
  }
}

/* List Styling */

/* Unordered Lists */
.post-content ul {
   margin: 30px 0;
   padding-left: 40px; /* indent so bullets are visible */
   padding-right: 10px; /* match the content padding */
   list-style-type: disc; /* default bullet style */
 }
 
 .post-content ul li {
   line-height: 1.8;
   margin-bottom: 20px;
   margin-left: 10px; /* match the content padding */   
 }
 
 /* Ordered Lists */
 .post-content ol {
   margin: 30px 0;
   padding-left: 40px; /* indent so numbers are visible */
   padding-right: 10px; /* match the content padding */
   list-style-type: decimal; /* default numbering style */
 }
 
 .post-content ol li {
   line-height: 1.6;
   margin-bottom: 20px;
   margin-left: 10px; /* match the content padding */
 }


@media (min-width: 768px) {
   .related-post-title a:hover {
      color: #2E8B57;
   }
}

@media (max-width: 768px) {
   .post-meta-desktop {
      margin-bottom: 0;
   }
}

/* -------------------------------------------------
   Mobile‑first hero layout (stacked, text over image)
-------------------------------------------------- */
.post-hero {
   display: block;
}

/* -------------------------------------------------
   Desktop hero: side‑by‑side like The Atlantic
-------------------------------------------------- */
@media (min-width: 1000px) {
   /* Widen the full article wrapper so the hero can reach 1000 px */
   .post {
      max-width: 1200px;
   }

   .post-hero {
      display: flex;          /* put image + text in a row */
      flex-direction: row-reverse; /* image left, text right */
      gap: 100px;
      align-items: flex-start;
      max-width: 1200px;
      margin: 180px auto 70px;    /* add generous top margin on desktop */
   }

   /* Image column */
   .post-hero-image {
      flex: 0 0 50%;
   }

   .post-hero-image img {
      width: 100%;
      height: auto;
      display: block;
   }

   /* Text column */
   .post-hero-text {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
   }
   /* Keep the article body at 700 px for readability */
   .post-content {
      max-width: 700px;
      margin: 0 auto;
   }

   .post-meta-desktop {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0;
   }
   .post-meta-desktop .post-date {
      margin-left: 0;
      margin-top: 15px;
   }
}

@media (max-width: 768px) {
  .post-hero-image {
      padding: 0;
      margin-top: 7px;
      margin-bottom: 14px;
  }

  .post-hero-image img {
    width: 100%;
  }

  /* Exception: remove bottom margin if audio card is next */
  .post-hero-image:has(+ .kg-audio-card) {
    margin-bottom: 0;
  }
}
