/* ==== Global Layout ==== */
body.single-post {
  background-color: #0d0b24;
  color: #eaeaea;
  font-family: 'Inter', sans-serif;
}

.site-main {
  max-width: 1200px;
  margin: auto;
  padding: 60px 20px;
}

/* ==== Header ==== */
.entry-header {
  margin-bottom: 40px;
}

.entry-title {
  font-size: 42px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.entry-meta {
  font-size: 14px;
  color: #bbbbbb;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==== Media ==== */
.post-media {
  margin: 40px 0;
}

.featured-image-container {
  position: relative;
  margin-bottom: 40px;
}

.featured-image-container img {
  width: 100%;
  border-radius: 8px;
}

.featured-image-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 12px;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  z-index: 1;
}

/* ==== Layout: Content + TOC ==== */
.post-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (min-width: 1024px) {
  .post-wrapper {
    flex-direction: row;
  }

  .entry-content {
    flex: 3;
  }

  .table-of-contents {
    flex: 1;
    position: sticky;
    top: 100px;
    align-self: start;
  }
}

/* ==== Post Content Styling ==== */

/* Robust centering for all images and containers in single blog post content */
.single-post .entry-content img,
.single-post .entry-content .wp-block-image,
.single-post .entry-content figure,
.single-post .entry-content .wp-caption {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    text-align: center !important;
}

.single-post .entry-content .aligncenter,
.single-post .entry-content .wp-block-image.aligncenter,
.single-post .entry-content figure.aligncenter {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    float: none !important;
    text-align: center !important;
}

.single-post .entry-content figure img,
.single-post .entry-content .wp-block-image img {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

.entry-content img,
.entry-content .wp-caption,
.entry-content .wp-block-image {
  max-width: 100%;
  height: auto;
}

.entry-content figure {
  margin: 30px 0;
  max-width: 100%;
}

.entry-content figure img {
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.entry-content figure figcaption {
  font-size: 14px;
  color: #aaaaaa;
  text-align: center;
  margin-top: 10px;
}

@media (max-width: 767px) {
  .entry-content img,
  .entry-content .wp-caption,
  .entry-content .wp-block-image {
    width: 100% !important;
    height: auto !important;
  }
  
  .entry-content figure {
    margin: 20px 0;
  }
}

.entry-content h2 {
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  margin-top: 40px;
  margin-bottom: 16px;
}

.entry-content h3 {
  font-size: 22px;
  font-weight: 500;
  color: #dddddd;
  margin-top: 32px;
  margin-bottom: 12px;
}

.entry-content p {
  font-size: 16px;
  line-height: 1.75;
  color: #d1d1d1;
  margin-bottom: 12px;
}

.entry-content ul,
.entry-content ol {
  font-size: 16px;
  line-height: 1.7;
  list-style: disc inside;
  padding-left: 1.5em;
  margin-left: 0;
  color: #dcdcdc;
  margin-bottom: 10px;
}

.single-post .entry-content ol {
  list-style: decimal inside;
}

.single-post .entry-content li {
  font-size: 16px;
  line-height: 1.7;
}

.entry-content a {
  color: #8c52ff;
  text-decoration: underline;
}

.entry-content blockquote {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #8c52ff;
  margin: 24px 0;
  padding: 16px 20px;
  color: #cccccc;
  font-style: italic;
}

/* ==== Tags ==== */
.entry-footer {
  margin-top: 60px;
}

.tags {
  margin-top: 20px;
}

.tags a {
  background: #5522ff;
  color: #fff;
  padding: 6px 12px;
  margin-right: 8px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  display: inline-block;
  transition: background 0.3s;
}

.tags a:hover {
  background: #6f39ff;
}

/* ==== Related Posts ==== */

.related-posts {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.related-posts h2 {
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 24px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 991px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 576px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.related-post-card {
  width: 336px;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
  text-decoration: none;
  transition: background 0.3s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-post-card:hover {
  background: rgba(140, 82, 255, 0.1);
}

.related-post-card .thumb {
  overflow: hidden;
}

.related-post-card .thumb img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 4px;
}

.related-post-card h3 {
  font-size: 1.8rem;
  color: #ffffff;
  margin: 6px 0 6px;
  line-height: 1.4;
  font-weight: 600;
  height: 100px
}

.related-post-card .description {
  font-size: 14px;
  color: #bbbbbb;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.related-post-card .date {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: auto;
}


/* ==== Button Style (Matching Innocody Purple) ==== */
a.button,
button,
input[type="submit"] {
  background-color: #8c52ff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

a.button:hover,
button:hover,
input[type="submit"]:hover {
  background-color: #a371ff;
}

/* ==== Responsive Typography ==== */
@media (max-width: 767px) {
  .entry-title {
    font-size: 32px;
  }

  .entry-content h2 {
    font-size: 24px;
  }

  .entry-content p {
    font-size: 16px;
  }
}
