/* === FULL CSS (100% ORIGINAL, UNTOUCHED, WITH ALL SPACING) === */

/* ---- ORIGINAL STYLES (unchanged) ---- */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: Inter;
}

h2 {
  margin-top: 30px !important;
}
h2 > span {
  color: black !important;
}
span {
  color: #7a7a7a;
}
hr {
  margin: 30px 0;
}
#div_breadcrumbs {
  margin-left: 11.5%;
  margin-top: 20px;
  margin-bottom: 50px;
}

.page-container {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  align-items: flex-start; /* Align top edges dynamically */
}
.content-wrapper {
  flex: 3;
}
.sidebar {
  grid-column: span 1;
  width: 100%;
  padding-left: 0;
  margin-top: 115px;
}

/* Override the static sidebar top offset set in the theme */
.page-container .sidebar {
  margin-top: 0 !important; /* remove the fixed 115px */
  box-sizing: border-box;
}

/* Give the search wrapper a smooth transition when we set margin-top dynamically */
.page-container .sidebar .search-wrapper {
  margin-top: 0;
  transition: margin-top 220ms ease;
}

/* Hide sidebar content before JS positions it */
.page-container .sidebar .search-wrapper {
  opacity: 0;
  transition: opacity 0.25s ease, margin-top 220ms ease;
}

/* When ready (after JS applies correct offset) */
.page-container .sidebar.ready .search-wrapper {
  opacity: 1;
}

.single-post-full-width {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 5px;
  background: #fff;
}

/*  TITLE – ALIGN LEFT EDGE WITH POST IMAGE ---- */
.div-wrapper-post-title {
  margin-left: 0 !important; /* remove any left offset */
  padding-left: 0 !important; /* remove wrapper padding */
  width: 100% !important;
  max-width: none !important;
}

/* The title itself – full-width, no extra margins */
.post-title {
  user-select: text;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 2.5em !important; /* keep your size */
  line-height: 1.2 !important;
  width: 100% !important;
  max-width: none !important;
  text-align: left !important; /* left-aligned text */
  /* Remove the grid you used for centering */
  display: block !important;
}

/* Make the image container the reference point */
.post-image {
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important; /* image hugs the left side */
}

.meta-icon-folder,
.meta-icon-bookmark,
.meta-icon-date,
.meta-icon-author {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  filter: invert(72%) sepia(37%) saturate(507%) hue-rotate(158deg)
    brightness(95%) contrast(85%);
}
.author-link {
  color: #7e7e7e;
}

/* If the card itself adds inner padding, neutralise it for these two elements */
.single-post-full-width > .post-image,
.single-post-full-width > .div-wrapper-post-title {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.card-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}
#id-meta {
  color: #666;
  font-size: 1em;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}
#id-meta > div {
  display: flex;
  align-items: center;
  gap: 6px; /* space between icon and text */
}
#id-author {
  font-size: 16px;
  color: #666;
}
#id-author img {
  height: 15px;
  width: 15px;
  margin-right: 5px;
  border-radius: 100%;
}
.post-meta.bul-card-date {
  margin: 0;
  font-size: 16px;
}
#post-calendar-img {
  color: #6ec1e4;
  margin-right: 5px;
}
.post-terms {
  color: #666;
  font-size: 1em;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 1em;
  margin-top: 10px;
}

#post-cat-img,
#post-tag-img {
  color: #6ec1e4;
  margin-right: 5px;
}
.bul-post-cats,
.bul-post-tags {
  flex-wrap: wrap;
  gap: 8px;
}
.bul-post-cats a,
.bul-post-tags a {
  font-size: 14px;
  color: #666;
}
.bul-post-cats a:hover,
.bul-post-tags a:hover {
  background: #bbdefb;
}
.post-content {
  font-size: 1.1em;
  line-height: 1.8;
  color: #333;
  margin: 25px 0;
}
.back-to-blog {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 25px;
  background: #1976d2;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: 0.3s;
}
.back-to-blog:hover {
  background: #1565c0;
}
.search-form form {
  display: flex;
  margin-bottom: 20px;
}
.search-form input {
  flex: 1;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 5px 0 0 5px;
}
.search-form button {
  width: 90px;
  padding: 5px 10px;
  background: #2c85dd;
  color: #fff;
  border: 1px solid #007bff;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}
.search-wrapper {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px 10px;
  height: 70px;
  margin-bottom: 20px;
}
.sidebar-title {
  font-size: 1.1em;
  margin-bottom: 10px;
  color: #333;
  margin-left: 15px;
  margin-top: 10px;
}
.sidebar-categories-wrapper {
  border: 1px solid #ddd;
  border-radius: 8px;
}
.sidebar-tags-wrapper {
  border: 1px solid #ddd;
  border-radius: 8px;
}
.sidebar-latest-wrapper {
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 20px;
  padding-bottom: 10px;
}

/* ==== CATEGORIES.   ======*/
.category-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}
.category-link {
  display: block;
  padding: 8px 12px;
  color: #7a7a7a;
  text-decoration: none;
  font-family: Inter, sans-serif;
  font-size: 13px;
}
.category-link:hover {
  color: #0056b3;
  cursor: pointer;
  text-decoration: underline;
}
.category-link.active {
  color: #0056b3;
  font-weight: bold;
}

/* ==== TAGS – side-by-side, no internal break, wrap only at container edge ==== */
.tags-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex; /* NEW: flex container */
  flex-wrap: wrap; /* NEW: wrap to next line when needed */
  gap: 8px; /* NEW: consistent spacing (replaces margin) */
  justify-content: flex-start;
}

.tags-link {
  display: inline-block; /* keep shrink-to-fit */
  white-space: nowrap; /* NEW: **NO line-break inside tag** */
  padding: 6px 12px; /* comfortable tap area */
  border: 1px solid #ededed;
  border-radius: 3px;
  background: #fff;
  color: #7a7a7a;
  text-decoration: none;
  font-family: Inter, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  transition: all 0.2s ease;
  margin-left: 10px;
  margin-bottom: 10px;
}

/* Hover & active (unchanged – just merged) */
.tags-link:hover,
.tags-link.active {
  color: #fff;
  background-color: #2c85dd;
  border-color: #2c85dd;
  text-decoration: none;
}

/* === LATEST POSTS – EXACT STYLE MATCH === */
.bul-latest-posts {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: Inter, sans-serif;
}

.load-single-post {
  display: inline-flex;
}

.bul-post-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  transition: background 0.2s;
  padding-left: 10px;
  padding-right: 10px;
}

.bul-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bul-post-thumb-wrapper {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bul-post-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bul-post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-left: 10px;
}

.bul-post-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bul-post-title:hover {
  color: #1976d2;
}

.bul-post-date {
  font-size: 13px;
  color: #777;
  font-weight: 400;
}

/* Sidebar wrapper */
.sidebar-latest-posts-wrapper {
  margin-top: 20px;
  padding: 0;
  background: transparent;
  border: none;
}

/* Mobile */
@media (max-width: 768px) {
  .bul-post-thumb-wrapper {
    width: 50px;
    height: 50px;
  }
  .bul-post-title {
    font-size: 14px;
  }
}

/* ---- MAX-TITLE NAV WITH HOVER BUBBLE ---- */
.max-title-nav {
  margin: 40px 0;
  font-weight: 500;
}
.max-title-nav .nav-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.max-title-nav .nav-box {
  flex: 1;
  min-width: 280px;
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 10px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible !important;
  z-index: 1;
  height: 70px; /* Increased for 2 lines */
}

.max-title-nav .nav-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
  border-color: #1976d2;
  z-index: 9999 !important;
}

.max-title-nav .nav-box a,
.max-title-nav .nav-box .disabled {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  color: inherit;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.4;
  position: relative;
}

.max-title-nav .nav-box a:hover {
  color: #0d47a1;
}

/* ARROWS & LABELS: Always centered */
.max-title-nav .nav-arrow,
.max-title-nav .nav-label {
  flex-shrink: 0;
  color: #1976d2;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.max-title-nav .nav-arrow {
  font-size: 1.2rem;
  padding: 0 4px;
}
.max-title-nav .nav-label {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 2px;
}

/* TITLE: 2 lines, centered, wraps */
.max-title-nav .nav-title {
  flex: 1;
  color: #333;
  font-weight: 300;
  font-size: 14px;
  text-align: center;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  hyphens: auto;
}

/* Disabled state */
.max-title-nav .disabled {
  color: #bbb;
  cursor: not-allowed;
}

/* ——— TOOLTIP BUBBLE (ABOVE) ——— */
.max-title-nav .tooltip {
  position: absolute;
  top: -58px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 9999 !important;
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  min-width: 200px;
  text-align: center;
  line-height: 1.4;
}

.max-title-nav .tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #222;
}

.max-title-nav .nav-box:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* ---- NEW: COMMENTS ---- */
.post-comments {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid #eee;
}
.post-comments .comments-title {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #333;
}
.comment-list {
  list-style: none;
  padding: 0;
}
.comment {
  background: #fafafa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid #eee;
}
.comment .comment-author img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  float: left;
  margin-right: 10px;
}
.comment .comment-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 8px;
}
.comment .comment-content p {
  margin: 8px 0 0;
  line-height: 1.6;
}
.comment-reply-link {
  font-size: 0.8rem;
  color: #1976d2;
  text-decoration: underline;
}
#respond {
  margin-top: 30px;
}
#commentform textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: Inter, sans-serif;
}
#commentform input[type="submit"] {
  background: #1976d2;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
}
#commentform input[type="submit"]:hover {
  background: #1565c0;
}

/* -------------------------------------------------
   TITLE – ALIGN LEFT EDGE WITH POST IMAGE (UPDATED)
   ------------------------------------------------- */
.div-wrapper-post-title {
  max-width: 1200px !important; /* Match page-container */
  padding: 0 20px !important; /* Match page-container's left/right padding (adjusts content inset) */
  box-sizing: border-box !important;
  width: 100% !important;
}

/* The title itself – full width, left-aligned, no extras */
.post-title {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: left !important;
  display: block !important; /* Override any grid */
  font-size: 2.5em !important;
  line-height: 1.2 !important;
  height: auto !important; /* Allow natural height */
}

/* Image container – ensure no extra left offset */
.post-image {
  margin-top: 20px !important;
  padding: 0 !important;
  text-align: left !important;
}

/* Neutralize any inner padding on the post card for these elements */
.single-post-full-width > .post-image,
.single-post-full-width > .div-wrapper-post-title {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ========================================
   MOBILE LAYOUT – SINGLE POST (≤768px)
   ======================================== */
@media (max-width: 768px) {
  /* 1. FULL WIDTH CONTAINER */
  .page-container {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 12px !important;
    max-width: 100vw !important;
    margin: 0 !important;
    overflow-x: hidden !important;
  }

  .div-wrapper-post-title,
  .post-title,
  .post-image {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  .max-title-nav .nav-inner {
    flex-direction: column;
    gap: 12px;
  }
  .max-title-nav .nav-box {
    min-width: 100%;
    height: 80px;
  }
  .max-title-nav .tooltip {
    top: -68px;
    font-size: 0.9rem;
    min-width: 180px;
  }

  .content-wrapper,
  .sidebar {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* 2. POST CARD – FULL WIDTH */
  .single-post-full-width {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  /* 3. TITLE */
  .post-title {
    font-size: 1.8rem !important;
    line-height: 1.3 !important;
    margin: 0 0 16px 0 !important;
    text-align: left !important;
  }

  /* 4. IMAGE */
  .post-image {
    text-align: center;
    margin: 16px 0;
  }
  .card-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    border-radius: 8px !important;
  }

  /* 5. META & TERMS */
  #id-meta,
  .post-terms {
    flex-direction: column !important;
    gap: 10px !important;
    font-size: 0.95rem !important;
    align-items: left !important;
  }

  .bul-post-cats,
  .bul-post-tags {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* 6. CONTENT */
  .post-content {
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    margin: 20px 0 !important;
  }

  /* 7. NAVIGATION – STACK VERTICALLY */
  .max-title-nav .nav-inner {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .max-title-nav .nav-box {
    min-width: 100% !important;
    height: 76px !important;
    padding: 10px !important;
  }

  .max-title-nav .nav-title {
    font-size: 13px !important;
    -webkit-line-clamp: 2 !important;
  }

  .max-title-nav .tooltip {
    top: -72px !important;
    font-size: 0.9rem !important;
    min-width: 160px !important;
  }

  /* 8. BACK TO BLOG BUTTON */
  .back-to-blog {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    padding: 14px !important;
    font-size: 1rem !important;
    margin: 30px 0 10px !important;
  }

  /* 9. SIDEBAR */
  .sidebar {
    margin-top: 20px !important;
    padding: 16px !important;
    background: #fafafa;
    border-radius: 10px;
  }

  .sidebar-title {
    font-size: 1.1rem !important;
    margin: 0 0 12px 0 !important;
  }

  .category-list,
  .tags-list {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  .category-link,
  .tags-link {
    padding: 10px !important;
    font-size: 14px !important;
  }

  .search-form form {
    flex-direction: column;
  }

  .search-form input {
    border-radius: 6px !important;
    margin-bottom: 8px;
  }

  .search-form button {
    border-radius: 6px !important;
  }

  /* 10. BREADCRUMBS – LEFT ALIGNED */
  #div_breadcrumbs,
  .header_breadcrumbs {
    text-align: left !important;
    margin: 16px 12px 0 !important;
    padding: 0 !important;
  }

  .header_breadcrumbs .main-breadcrumb {
    justify-content: flex-start !important;
  }

  /* 11. PREVENT ANY OVERFLOW */
  * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body {
    overflow-x: hidden !important;
  }
}
/* Mobile adjustments (match page-container's mobile padding) */
@media (max-width: 768px) {
  .div-wrapper-post-title {
    max-width: 100vw !important;
    margin: 50px 0 0 0 !important; /* No auto margins needed on mobile */
    padding: 0 12px !important; /* Match mobile page-container padding */
  }

  .post-title {
    font-size: 1.8rem !important;
    line-height: 1.3 !important;
  }

  .post-image {
    margin: 16px 0 !important;
    text-align: left !important; /* Left-align on mobile too */
  }
}

/* === FULL COMMENTS STYLING (UNTOUCHED) === */

/* ========================================
   COMMENTS – FULLY STYLED & RESPONSIVE
   ======================================== */
.post-comments {
  margin: 50px 0 30px;
  padding-top: 30px;
  border-top: 2px solid #eee;
  font-family: "Inter", sans-serif;
}

.post-comments .comments-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: #222;
  margin: 0 0 20px;
  position: relative;
  padding-bottom: 8px;
}

.post-comments .comments-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: #1976d2;
  border-radius: 2px;
}

/* Comment List */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.comment:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #ddd;
}

.comment .comment-body {
  display: flex;
  gap: 14px;
}

.comment .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.comment .comment-content {
  flex: 1;
  min-width: 0;
}

.comment .comment-author {
  font-weight: 600;
  color: #1976d2;
  font-size: 0.95rem;
  margin: 0 0 4px;
}

.comment .comment-author cite {
  font-style: normal;
}

.comment .comment-meta {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 8px;
}

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

.comment .comment-meta a:hover {
  color: #1976d2;
  text-decoration: underline;
}

.comment .comment-content p {
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.comment .comment-reply-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.8rem;
  color: #1976d2;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.comment .comment-reply-link:hover {
  background: #e3f2fd;
  text-decoration: none;
}

/* Nested Comments */
.children {
  margin-left: 40px;
  padding-left: 0;
  list-style: none;
}

.children .comment {
  background: #fff;
  border-color: #e0e0e0;
}

/* No Comments */
.no-comments {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px dashed #ddd;
}

/* Comment Form */
#respond {
  margin-top: 40px;
  padding: 25px;
  background: #f8fbff;
  border: 1px solid #bbdefb;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.05);
}

#respond .comment-reply-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1976d2;
  margin: 0 0 16px;
}

#respond .comment-notes,
#respond .logged-in-as {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 12px;
}

#respond .comment-form-comment label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: #333;
}

#respond textarea#comment {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  resize: vertical;
  transition: border 0.2s;
  box-sizing: border-box;
}

#respond textarea#comment:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

#respond .form-submit {
  margin-top: 16px;
}

#respond input#submit {
  background: #1976d2;
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: none;
}

#respond input#submit:hover {
  background: #1565c0;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(25, 118, 210, 0.2);
}

#respond input#submit:active {
  transform: translateY(0);
}

/* Required field asterisk */
.required {
  color: #d32f2f;
}

/* Comment Navigation (if many comments) */
.comment-navigation {
  margin: 20px 0;
  text-align: center;
}

.comment-navigation .nav-links {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.comment-navigation a,
.comment-navigation span {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  color: #555;
}

.comment-navigation a:hover {
  background: #1976d2;
  color: #fff;
  border-color: #1976d2;
}

.comment-navigation .current {
  background: #1976d2;
  color: #fff;
  border-color: #1976d2;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .post-comments {
    margin: 40px 0 20px;
    padding-top: 20px;
  }

  .comment .comment-body {
    flex-direction: column;
    gap: 10px;
  }

  .comment .avatar {
    width: 40px;
    height: 40px;
  }

  .children {
    margin-left: 20px;
  }

  #respond {
    padding: 20px;
  }

  #respond textarea#comment {
    min-height: 100px;
    font-size: 0.95rem;
  }
}

/* === SAME-CATEGORY RANDOM POSTS CARDS (BELOW CONTENT) === */

/* ---- SAME-CATEGORY NAV CARDS – SIDE-BY-SIDE ---- */
.same-cat-nav {
  display: flex;
  justify-content: space-between; /* ← keeps them side-by-side */
  align-items: stretch; /* ← same height */
  gap: 30px; /* ← space between cards */
  margin: 40px 0;
}

/* each card takes equal width but never goes under 300px */
.same-cat-nav > .prev-card,
.same-cat-nav > .next-card {
  flex: 1;
  min-width: 300px;
}

/* disabled placeholder – same width as real card */
.same-cat-nav .disabled-card {
  flex: 1;
  min-width: 300px;
  background: #f8f9fa;
  border: 2px dashed #ddd;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-style: italic;
  padding: 20px;
  text-align: center;
}

.post-nav-card-link {
  flex: 1;
  min-width: 280px;
  text-decoration: none;
  color: inherit;
}
.post-nav-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.post-nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}
.card-image-wrapper {
  height: 180px;
  overflow: hidden;
}
.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.post-nav-card:hover img {
  transform: scale(1.05);
}
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 8px;
}
.card-title {
  font-size: 1.25rem;
  margin: 0 0 10px;
  color: #333;
  line-height: 1.3;
  flex-grow: 1;
}
.card-excerpt {
  font-size: 0.95rem;
  color: #777;
  margin-bottom: 12px;
  line-height: 1.5;
}
.card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.card-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 10px;
  font-weight: 500;
}

.disabled-card {
  flex: 1;
  min-width: 280px;
  background: #f8f9fa;
  border: 2px dashed #ddd;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #aaa;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-label {
  font-weight: 600;
  color: #1976d2;
  font-size: 0.95rem;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ← PREV */
.arrow-label-left {
  justify-content: flex-start;
}
.arrow-label-left::before {
  content: "\f060"; /* fa-arrow-left */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* NEXT → */
.arrow-label-right {
  justify-content: flex-end;
}
.arrow-label-right::after {
  content: "\f061"; /* fa-arrow-right */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* Hover */
.post-nav-card:hover .arrow-label,
.post-nav-card:hover .arrow-label::before,
.post-nav-card:hover .arrow-label::after {
  color: #0d47a1;
}

@media (max-width: 768px) {
  .same-cat-nav {
    flex-direction: column;
    gap: 16px;
  }
  .card-image-wrapper {
    height: 150px;
  }
  .card-title {
    font-size: 1.1rem;
  }
}

/* === LEFT ALIGN #id-meta & .post-terms — DESKTOP + MOBILE === */
/* This applies to ALL screens — keeps your current desktop layout */
#id-meta,
.post-terms {
  flex-direction: row !important;
  gap: 15px !important;
  font-size: 0.95rem !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
}
#id-meta > div,
.post-terms > div {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  justify-content: flex-start !important;
}

/* Optional: Stack vertically on mobile (cleaner on small screens) */
@media (max-width: 768px) {
  #id-meta,
  .post-terms {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }
  .sidebar-title {
    padding-left: 10px !important;
    padding-top: 10px !important;
  }

  .search-wrapper {
    margin-top: 0px !important;
    height: 150px;
  }

  .search-form form {
    flex-direction: column !important;
    gap: 10px;
  }

  .search-form input[type="search"] {
    width: 100% !important;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
  }

  .search-form button {
    width: 100% !important;
    border-radius: 8px !important;
    padding: 12px !important;
    font-weight: 600;
  }

  /* === MOBILE: CATEGORIES — KEEP 2 COLUMNS LIKE DESKTOP === */
  .category-list {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .category-link {
    padding: 10px 8px !important;
    font-size: 14px !important;
    text-align: left;
  }
}

/* === FIX BREADCRUMBS LEFT-ALIGNED WITH POSTS ON ALL SCREENS === */
#div_breadcrumbs {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header_breadcrumbs {
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

/* Mobile: Adjust padding to match posts' mobile padding */
@media (max-width: 768px) {
  #div_breadcrumbs {
    padding: 0 10px !important;
  }
}

/* === SINGLE-POST: FORCE IMAGES TO STAY WITHIN THE CONTENT COLUMN === */

/* 1) Never let images overflow the text column */
.post-content img,
.post-content figure img {
  display: block;
  max-width: 100%;
  width: 100%; /* fill the column width, not beyond */
  height: auto; /* keep aspect ratio */
}

/* 2) Give post images a uniform visual container (optional but recommended) */
.post-content .wp-block-image,
.post-content img {
  max-width: 760px; /* set the visual width cap for images inside the column */
  margin-left: auto;
  margin-right: auto;
}

/* 3) Tame Gutenberg “wide/full” variants so they don’t break the column */
.post-content .alignwide,
.post-content .alignfull,
.post-content .wp-block-image.alignwide,
.post-content .wp-block-image.alignfull {
  width: 100% !important;
  max-width: 760px !important; /* keep them contained like regular images */
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 4) Optional: keep extremely tall images tidy without distortion */
.post-content .wp-block-image img {
  max-height: 520px; /* adjust to taste */
  object-fit: contain;
}

/* 5) Safety net: prevent any accidental horizontal overflow */
.post-content {
  overflow: hidden;
  word-wrap: break-word;
}

/* random related posts */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.card-tag {
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}
.card-tag:hover {
  background: #1976d2;
  color: #fff;
}
/* Make absolutely sure tag links are clickable above any overlay */
.post-nav-card {
  position: relative;
}
.post-nav-card .card-tags a.card-tag {
  position: relative;
  z-index: 2;
}

/* If you ever used a full-card overlay link elsewhere, neutralize it here */
.post-nav-card a.card-title-link,
.post-nav-card .card-image-wrapper {
  position: relative;
  z-index: 1;
}
