/* ==========================================================================
   SINGLE BLOG POST STYLES (single.php)
   ========================================================================== */

.single-blog-with-toc {
  background: #fff;
}

/* Post Hero Section */
.post-hero {
  background: #fff;
  padding: 60px 0 40px;
}

.post-hero-content {
  max-width: 900px;
  margin: 0 auto 40px;
}

.post-category-badge {
  display: inline-block;
  padding: 6px 16px;
  background: #f0f0f0;
  color: #666;
  text-decoration: none;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 8px;
}

.post-hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: #1a1a1a;
  margin: 20px 0;
  line-height: 1.2;
}

.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #666;
  margin-top: 20px;
}

.post-hero-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-hero-meta .meta-separator {
  color: #ddd;
}

.post-hero-meta i {
  color: #999;
}

.post-hero-meta .meta-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
}

.post-hero-image {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

/* Post Content with Sidebar Layout */
.post-content-section {
  padding: 60px 0;
  background: #fff;
}

.post-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

/* Left Sidebar - Table of Contents */
.post-sidebar {
  position: sticky;
  top: 100px;
}

.post-toc-wrapper {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 25px 20px;
}

.toc-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 20px 0;
}

.table-of-contents {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table-of-contents a {
  display: block;
  padding: 8px 12px;
  color: #666;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

@media (hover: hover) {
.table-of-contents a:hover {
  color: #1a1a1a;
  background: rgba(0, 0, 0, 0.03);
  border-left-color: var(--accent);
}
}

.table-of-contents a.active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(57, 166, 61, 0.05);
  border-left-color: var(--accent);
}

/* Main Content Area */
.post-main-content {
  min-width: 0;
}

.post-content-inner {
  font-size: 18px;
  line-height: 1.8;
  color: #333;
  max-width: 750px;
}

.post-content-inner h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 50px 0 20px 0;
  scroll-margin-top: 120px;
}

.post-content-inner h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 40px 0 15px 0;
  scroll-margin-top: 120px;
}

.post-content-inner h4 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 30px 0 12px 0;
  scroll-margin-top: 120px;
}

/* Account for WordPress admin bar when logged in */
.admin-bar .post-content-inner h2,
.admin-bar .post-content-inner h3,
.admin-bar .post-content-inner h4 {
  scroll-margin-top: 152px; /* 120px + 32px admin bar */
}

.post-content-inner h2:first-child,
.post-content-inner h3:first-child {
  margin-top: 0;
}

.post-content-inner p {
  margin-bottom: 25px;
}

.post-content-inner ul,
.post-content-inner ol {
  margin: 25px 0;
  padding-left: 30px;
}

.post-content-inner li {
  margin-bottom: 10px;
}

.post-content-inner img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 30px 0;
  display: block;
}

.post-content-inner blockquote {
  border-left: 4px solid var(--accent);
  padding: 20px 30px;
  margin: 30px 0;
  background: #f8f9fa;
  font-style: italic;
  color: #555;
}

.post-content-inner a {
  color: var(--accent);
  text-decoration: none;
}

@media (hover: hover) {
.post-content-inner a:hover {
  color: var(--accent-dark);
}
}

/* Tags Section */
.post-tags-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #e0e0e0;
  max-width: 750px;
}

.post-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.post-tags strong {
  color: #1a1a1a;
  font-size: 14px;
}

.post-tag {
  display: inline-block;
  padding: 6px 14px;
  background: #f0f0f0;
  color: #666;
  text-decoration: none;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

@media (hover: hover) {
.post-tag:hover {
  background: var(--accent);
  color: #fff;
}
}

/* Author Box */
.author-box {
  display: flex;
  gap: 20px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-top: 40px;
  max-width: 750px;
}

.author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.author-info {
  flex: 1;
}

.author-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px 0;
}

.author-name a {
  color: inherit;
  text-decoration: none;
}

@media (hover: hover) {
.author-name a:hover {
  text-decoration: underline;
}
}

.author-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 10px 0;
}

.author-bio {
  font-size: 14px;
  line-height: 1.6;
  color: #666;
  margin: 0;
}

.author-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #0077b5;
  text-decoration: none;
}

@media (hover: hover) {
.author-linkedin:hover {
  text-decoration: underline;
  color: #0077b5;
}
}

/* Post Navigation */
.post-navigation {
  padding: 40px 0;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.post-nav-links {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  flex: 1;
  max-width: 45%;
}

@media (hover: hover) {
.post-nav-link:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
}

.nav-direction {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  margin-bottom: 8px;
  font-weight: 600;
}

.nav-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

/* Related Posts */
.related-posts {
  padding: 80px 0;
  background: #fff;
}

.related-posts-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 50px;
  color: #1a1a1a;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.related-post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

@media (hover: hover) {
.related-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}
}

.related-post-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

@media (hover: hover) {
.related-post-card:hover .related-post-image img {
  transform: scale(1.05);
}
}

.related-post-content {
  padding: 20px;
}

.related-post-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.4;
}

.related-post-title a {
  color: #1a1a1a;
  text-decoration: none;
}

@media (hover: hover) {
.related-post-title a:hover {
  color: #39a63d;
}
}

.related-post-meta {
  font-size: 13px;
  color: #999;
}

.related-post-meta .meta-separator {
  color: #ddd;
  margin: 0 8px;
}

/* Comments */
.post-comments {
  padding: 60px 0;
  background: #f8f9fa;
}

.comments-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.comments-area {
  font-family: inherit;
  color: #222;
}

/* Comments title */
.comments-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 28px;
  color: #1a1a1a;
  padding-bottom: 14px;
  border-bottom: 2px solid #e6e8eb;
}

/* Comment list */
.comments-area .comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
}

.comments-area .comment-list ol {
  list-style: none;
  padding: 0;
}

.comments-area .comment-list .children {
  list-style: none;
  padding-left: 32px;
  margin-top: 16px;
}

.comments-area .comment-body {
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 16px;
  position: relative;
}

.comments-area .comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.comments-area .comment-author .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.comments-area .comment-author .fn,
.comments-area .comment-author b.fn {
  font-weight: 700;
  font-style: normal;
  color: #1a1a1a;
  font-size: 15px;
}

.comments-area .comment-author .fn a {
  color: #1a1a1a;
  text-decoration: none;
}

.comments-area .comment-author .says {
  display: none;
}

.comments-area .comment-meta {
  font-size: 13px;
  color: #777;
  margin-bottom: 10px;
}

.comments-area .comment-meta a {
  color: #777;
  text-decoration: none;
}

@media (hover: hover) {
.comments-area .comment-meta a:hover {
  color: #216179;
}
}

.comments-area .comment-content {
  font-size: 15px;
  line-height: 1.65;
  color: #333;
}

.comments-area .comment-content p {
  margin: 0 0 10px;
}

.comments-area .comment-content p:last-child {
  margin-bottom: 0;
}

.comments-area .reply {
  margin-top: 10px;
}

.comments-area .comment-reply-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #216179;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid #216179;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.comments-area .comment-reply-link:focus {
  background: #216179;
  color: #fff;
}
@media (hover: hover) {
.comments-area .comment-reply-link:hover {
  background: #216179;
  color: #fff;
}
}

.comments-area .bypostauthor > .comment-body {
  border-color: #216179;
  box-shadow: 0 0 0 1px #216179;
}

.comments-area .no-comments {
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  padding: 16px 20px;
  color: #555;
  font-size: 14px;
  margin: 0 0 32px;
}

/* Pagination */
.comments-area .comments-pagination {
  margin: 24px 0;
  text-align: center;
}

.comments-area .comments-pagination a,
.comments-area .comments-pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 4px;
  border: 1px solid #d8dce0;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
}

.comments-area .comments-pagination .page-numbers.current {
  background: #216179;
  border-color: #216179;
  color: #fff;
}
@media (hover: hover) {
.comments-area .comments-pagination a:hover {
  background: #216179;
  border-color: #216179;
  color: #fff;
}
}

/* Comment form */
.comments-area .comment-respond {
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  padding: 28px 30px;
  margin-top: 8px;
}

.comments-area .comment-reply-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px;
}

.comments-area .comment-reply-title small {
  display: inline-block;
  margin-left: 10px;
  font-size: 13px;
  font-weight: 500;
}

.comments-area .comment-reply-title small a {
  color: #c0392b;
  text-decoration: none;
}

@media (hover: hover) {
.comments-area .comment-reply-title small a:hover {
  text-decoration: underline;
}
}

.comments-area .comment-notes {
  font-size: 13px;
  color: #777;
  margin: 0 0 20px;
}

.comments-area .required {
  color: #c0392b;
}

.comments-area .comment-form-author,
.comments-area .comment-form-email,
.comments-area .comment-form-url,
.comments-area .comment-form-comment {
  margin: 0 0 16px;
}

.comments-area .comment-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.comments-area .comment-form input[type="text"],
.comments-area .comment-form input[type="email"],
.comments-area .comment-form input[type="url"],
.comments-area .comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  color: #222;
  background: #fff;
  border: 1px solid #d8dce0;
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.comments-area .comment-form input[type="text"]:focus,
.comments-area .comment-form input[type="email"]:focus,
.comments-area .comment-form input[type="url"]:focus,
.comments-area .comment-form textarea:focus {
  outline: none;
  border-color: #216179;
  box-shadow: 0 0 0 3px rgba(33, 97, 121, 0.15);
}

.comments-area .comment-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

.comments-area .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #555;
  margin: 0 0 20px;
}

.comments-area .comment-form-cookies-consent input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #216179;
}

.comments-area .comment-form-cookies-consent label {
  display: inline;
  font-weight: 400;
  margin: 0;
  font-size: 14px;
  color: #555;
}

.comments-area .form-submit {
  margin: 0;
}

.comments-area .comment-form .submit,
.comments-area .comment-submit-btn {
  display: inline-block;
  background: #216179;
  color: #fff;
  border: 1px solid #216179;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

@media (hover: hover) {
.comments-area .comment-form .submit:hover,
.comments-area .comment-submit-btn:hover {
  background: #1a4d61;
  border-color: #1a4d61;
}
}

.comments-area .comment-form .submit:active,
.comments-area .comment-submit-btn:active {
  transform: translateY(1px);
}

.comments-area .comment-form .submit:focus,
.comments-area .comment-submit-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(33, 97, 121, 0.25);
}

/* Form: side-by-side name + email on wider screens */
@media (min-width: 640px) {
  .comments-area .comment-form-author,
  .comments-area .comment-form-email {
    display: inline-block;
    width: calc(50% - 8px);
    vertical-align: top;
  }

  .comments-area .comment-form-author {
    margin-right: 12px;
  }
}

@media (max-width: 640px) {
  .comments-area .comment-respond {
    padding: 22px 18px;
  }

  .comments-area .comment-body {
    padding: 16px 16px;
  }

  .comments-area .comment-list .children {
    padding-left: 14px;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 200px 1fr;
    gap: 40px;
  }

  .post-content-inner {
    font-size: 17px;
  }

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

@media (max-width: 768px) {
  .post-hero {
    padding: 40px 0 30px;
  }

  .post-hero-title {
    font-size: 32px;
  }

  .post-hero-meta {
    font-size: 13px;
  }

  .post-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Hide the Table of Contents on mobile (it only clutters the top of the post) */
  .post-sidebar {
    display: none;
  }

  .post-content-inner {
    font-size: 16px;
  }

  .post-content-inner h2 {
    font-size: 24px;
    margin: 40px 0 15px 0;
  }

  .post-content-inner h3 {
    font-size: 20px;
    margin: 30px 0 12px 0;
  }

  .author-box {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px;
  }

  .author-avatar {
    margin: 0 auto;
  }

  .post-nav-links {
    flex-direction: column;
  }

  .post-nav-link {
    max-width: 100%;
  }

  /* Compact list: square thumbnail left, title right */
  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 560px;
  }

  .related-post-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    padding: 16px 0;
    border-bottom: 1px solid #ececec;
  }

  .related-post-card:last-child {
    border-bottom: none;
  }

  .related-post-image {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    aspect-ratio: auto;
    border-radius: 8px;
  }

  .related-post-content {
    padding: 0;
  }

  .related-post-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
  }

  .related-post-meta {
    display: none;
  }
}

@media (max-width: 480px) {
  .post-hero-title {
    font-size: 28px;
  }

  .post-content-section {
    padding: 40px 0;
  }

  .post-content-inner {
    font-size: 15px;
  }

  .post-tags-section {
    margin-top: 40px;
  }
}
