/* ============================================================
   Minimal Custom CSS for Bootstrap Exceptions
   ============================================================ */

/* Brand Colors - MS Stavby Primary Color */
:root {
  --ms-blue: #017CB4;
  --ms-blue-dark: #015c8a;
  --ms-blue-darker: #0052a3;
}

.btn-primary {
  background-color: var(--ms-blue);
  border-color: var(--ms-blue);
  border-radius: 0.4rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--ms-blue-dark);
  border-color: var(--ms-blue-dark);
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(1, 124, 180, 0.25);
}

.text-primary {
  --bs-primary: var(--ms-blue);
}

/* Spinner border color override */
.spinner-border {
  color: var(--ms-blue) !important;
}
.spinner-border.text-primary {
  border-color: var(--ms-blue) !important;
}

/* Font System */
html {
  font-size: 62.5%;
}

body {
  font-family: 'Switzer-Variable', 'Switzer', sans-serif;
  font-size: 1.6rem;
}

/* Site Structure */
.site-title,
.entry-title,
.post-title,
.related-card-title,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.comments-title,
.posts-title,
.related-articles-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.entry-content h3{
  font-weight: 700
}

/* Site Structure */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
  padding-top: 12rem; /* Offset for fixed header */
}

@media (min-width: 768px) {
    .site-main {
    padding-top: 8rem; /* Offset for fixed header */
    }
}

.site-header {
  min-height: 8rem;
}

.site-header__wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 120rem;
  margin: 0 auto;
  padding: 1rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-title {
  font-size: 2.7rem;
  font-weight: 600;
  margin: 0;
}

.site-title a {
  color: #292929;
  text-decoration: none;
}

.site-title a:hover {
  text-decoration: underline;
}

.site-description {
  font-size: 1.575rem;
  color: #525252;
  margin: 0.25rem 0 0 0;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
}

.primary-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  color: #292929;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.primary-menu a:hover {
  color: var(--ms-blue);
}

.primary-menu .current-menu-item > a {
  color: var(--ms-blue);
  font-weight: 700;
}

/* Bootstrap Navbar Menu Styles */
.navbar-nav .menu-item {
  display: flex;
  align-items: center;
}

.navbar-nav .menu-item a {
  color: #292929;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 0.4rem;
}

.navbar-nav .menu-item a:hover {
  color: var(--ms-blue);
  background-color: #f8f9fa;
}

.navbar-nav .current-menu-item > a {
  color: var(--ms-blue);
  font-weight: 700;
}

/* Header icon buttons */
.header-icon {
  color: #292929;
  text-decoration: none;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.header-icon:hover {
  color: var(--ms-blue);
  background-color: #f8f9fa;
}
/* Posts Container */
.posts-container {
  max-width: 128rem;
  margin: 0 auto;
  padding: 0;
}

/* Container Override */
#main-content > .container {
  max-width: 128rem;
  padding-left: 3rem;
  padding-right: 3rem;
}

/* Section Spacing */
.site-main section {
  margin-bottom: 4rem;
  margin-top: 0;
}

/* Category Filter Section */
.category-filter {
  margin-bottom: 2rem;
}

/* Map Section */
.map-frame {
  height: 42.8rem;
}

#geo-map-container {
  height: 100%;
  position: relative;
}

#geo-map-container .loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8f9fa78;
  z-index: 1000;
  font-size: 1.8rem;
  color: #6c757d;
}

#geo-map-container .error {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #dc3545;
  font-size: 1.8rem;
}

.gm-map {
  height: 100%;
  width: 100%;
}

/* Category Filter Chips */
.category-filter-scroll {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ccc #f1f1f1;
}

.category-filter-scroll::-webkit-scrollbar {
  height: 0.4rem;
}

.category-filter-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.category-filter-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 0.2rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  min-height: 4rem;
  border: 1px solid #dee2e6;
  border-radius: 0.8rem;
  background: #fff;
  color: #292929;
  font-size: 1.575rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.filter-chip:hover {
  background: #f8f9fa;
  border-color: var(--ms-blue);
  color: var(--ms-blue);
}

.filter-chip-active {
  background: var(--ms-blue);
  border-color: var(--ms-blue);
  color: #fff;
}

/* Button styling matching filter chips */
.btn-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  min-height: 4rem;
  border: 1px solid #dee2e6;
  border-radius: 0.8rem;
  background: #fff;
  color: #292929;
  font-size: 1.575rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-filter-chip:hover {
  background: #f8f9fa;
  border-color: var(--ms-blue);
  color: var(--ms-blue);
}

.btn-filter-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-chip .badge {
  font-size: 1.35rem;
  padding: 0.125rem 0.375rem;
  margin-left: 0.5rem;
}

/* Read More Link - simple text link */
.read-more-link,
a span.read-more-link,
span.read-more-link {
  font-size: 1.575rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.read-more-link:hover {
  color: #1a4d8c;
}

/* Clickable card overlay - CSS-only approach (SEO friendly) */
.card {
  position: relative;
}

/* Create clickable overlay covering entire card */
.card-link-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.card-link-overlay {
  color: inherit;
  text-decoration: none;
}

.card-link-overlay:hover {
  color: inherit;
  text-decoration: none;
}

/* Comment badge styling - sits above overlay */
.comment-badge {
  position: relative;
  z-index: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.comment-badge:hover {
  background-color: var(--ms-blue) !important;
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .category-filter-scroll {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}


/* Map Sidebar Styling */
.map-filter-sidebar {
  padding: 1.25rem;
  background: #f8f9fa;
  border-radius: 0.8rem;
}

.map-filter-list .form-check {
  margin-bottom: 0.5rem;
}

.map-filter-list .form-check label {
  cursor: pointer;
  user-select: none;
}

/* Comments Section - Mobile-First */
.comments-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: #292929;
  margin-bottom: 2rem;
  padding: 0;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .comments-title {
    font-size: 2.7rem;
  }
}

.comment-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.8rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.comment-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.comment-card-body .comment-text {
  flex: 1;
  margin-bottom: 1rem;
}

.comment-card-body small {
  margin-top: auto;
}

.comments-grid .col-12.col-md-4 {
  display: flex;
}

.comments-grid .col-12.col-md-4 > a {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Comments page (page-comments.php): cards should be full width */
.page-template-page-comments .comments-grid > .col-12 {
  display: flex;
  flex: 1 1 100%;
}

.page-template-page-comments .comments-grid > .col-12 > a {
  width: 100%;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .comment-card {
    padding: 1.5rem;
  }
}

/* Map Section - Mobile-First */
@media (min-width: 768px) {
  .map-frame {
    min-height: 40rem;
  }
}


/* Single Post/Detail Page Styling */
.post-detail {
  max-width: 84.6rem;
  margin: 0 auto;
  padding: 1rem;
}

@media (min-width: 768px) {
  .post-detail {
    padding: 2rem;
  }
}

/* Post Detail Content - Mobile First */


/* Post Footer - Tags */
.post-tags {
  color: #525252;
  font-size: 1.575rem;
}

.post-tags a {
  color: var(--ms-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-tags a:hover {
  color: var(--ms-blue-dark);
}

/* Category Tags */
.entry-tags {
  margin-top: 1rem;
}

.entry-tags .filter-chip {
  background: #efefef;
  border: none;
  color: #525252;
  font-size: 1.44rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.entry-tags .filter-chip:hover {
  background: #e0e0e0;
}

/* Post Tags Chips at Top */
.post-tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-tags-chips .filter-chip a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.post-tags-chips .filter-chip a:hover {
  color: var(--ms-blue);
}

/* Social Sharing */
.shareThis {
    margin: 2em 0;
}

.social-share,
.post-sharing {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0;
}

.social-share a,
.post-sharing a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: #efefef;
  border-radius: 50%;
  color: #525252;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.social-share a:hover,
.post-sharing a:hover {
  background: #292929;
  color: #fff;
  text-decoration: none;
}

.social-share a i,
.social-share a svg,
.post-sharing a i,
.post-sharing a svg {
  width: 1rem;
  height: 1rem;
}

/* Entry Meta styling */
.post-meta-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  color: #525252;
  gap: 0.25rem;
}

.post-meta-info a {
  color: #525252;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-meta-info a:hover {
  color: var(--ms-blue);
}

.post-separator {
  color: #dcdcdc;
  margin: 0 0.5rem;
}

/* Excerpt */
.post-excerpt {
  color: #525252;
  font-size: 1.8rem;
  line-height: 1.6;
}

/* Mobile Optimizations */
@media (max-width: 767.98px) {
  .post-detail {
    padding: 0 1rem;
  }

  .entry-thumbnail {
    margin: 0 -1rem 2rem -1rem;
  }

  .entry-content {
    font-size: 1.7rem;
    line-height: 1.6;
  }

  /* Category Filter on Mobile */
  .category-filter {
    grid-template-columns: 1fr 1fr;
  }

  .comment-rating img {
    height: 2rem;
    margin-left: 1rem;
  }
}

/* Map Section Mobile */
@media (max-width: 991px) {
  #main-content .container {
    padding: 0 1rem;
  }

  .map-filter-list > .form-check {
    margin-bottom: 1rem;
  }

  .g-4 {
    flex-direction: column !important;
  }

  .col-12.col-lg-9,
  .col-12.col-lg-3 {
    width: 100% !important;
  }
}

.post-navigation .nav-subtitle {
  display: block;
  font-size: 1.35rem;
  color: #525252;
  margin-bottom: 0.25rem;
}

/* Comments Section */
.comments-section {
  margin-top: 4rem;
  margin-bottom: 4rem;
}

#comments {
  margin-top: 4rem;
}

#comments h3 {
  margin-bottom: 2rem;
}

.comment-list {
  list-style: none;
  padding-left: 0;
}

/* Unread Comments Highlighting */
.comment-list li.unread {
  border-left: 3px solid var(--ms-blue);
  background-color: rgba(1, 124, 180, 0.05);
  padding-left: 1em;
}

/* Unread Comments on Homepage Latest Comments */
.unread-comment-card .comment-card {
  border-left: 3px solid var(--ms-blue);
  background-color: rgba(1, 124, 180, 0.05);
}

.comment-list-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.comment {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid #DCDCDC;
    margin-top: 0.5rem;
    padding-top: 0.8rem;
    padding-bottom: 0.5em;
}

.comment-body {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.8rem;
  margin-bottom: 0;
}

.comment-author {
  font-weight: 600;
  color: #292929;
  font-size: 1.8rem;
}

.comment-author-reply {
    cursor: pointer;
    text-decoration: none;
    color: #292929;
    font-size: 1em;
    font-style: normal;
    font-weight: 600;
}

.comment-author-reply:hover {
  color: var(--ms-blue);
  text-decoration: underline;
}

.comment-rating {
  float: right;
  opacity: 0.7;
  font-size: 0.8em;
}

.comment-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 1.44rem;
  color: #525252;
}

.comment-time {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.comment-text {
  font-size: 1.5rem;
  color: #292929;
  margin: 0.5rem 0 0 0;
}

.comment-text a {
  background-color: #DCDCDC;
  padding: 0.2rem 0.8rem;
  border-radius: 0.4rem;
  text-decoration: none;
  color: #292929;
  transition: background-color 0.2s ease;
}

.comment-text a:hover {
  background-color: #BDBDBD;
}

.comment-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.comment-reply-link,
.comment-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #efefef;
  color: #292929;
  font-size: 1.44rem;
  text-decoration: none;
  border-radius: 0.8rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-weight: 500;
}

.comment-reply-link:hover,
.comment-actions a:hover {
  background: #e0e0e0;
  color: var(--ms-blue);
}

.comment-reply-link svg,
.comment-actions a svg {
  width: 1.25rem;
  height: 1.25rem;
}

.comment-wrapper {
  display: flex;
  flex-direction: column;
}

.comment.bypostauthor .comment-body {
  background: #f8f9fa;
  border-color: #dee2e6;
}

/* Comment edit/delete buttons */
.comment-edit-btn,
.comment-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem;
  background: #efefef;
  color: #525252;
  font-size: 1.26rem;
  text-decoration: none;
  border-radius: 0.6rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 500;
}

.comment-edit-btn:hover {
  background: #e3e3e3;
  color: var(--ms-blue);
  border-color: #d0d0d0;
}

.comment-delete-btn:hover {
  background: #ffebee;
  color: #dc3545;
  border-color: #ffcdd2;
}

.comment-edit-btn svg,
.comment-delete-btn svg {
  width: 1.4rem;
  height: 1.4rem;
}

.edit-timer {
  font-size: 1.1rem;
  color: #6b6b6b;
  font-weight: 600;
  min-width: 3rem;
  text-align: center;
}

/* Comment edit mode */
.comment-edit-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.comment-edit-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.6rem;
  background: #fff;
  font-size: 1.4rem;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  resize: vertical;
  min-height: 12rem;
  line-height: 1.4;
}

.comment-edit-textarea:focus {
  outline: none;
  border-color: var(--ms-blue);
  box-shadow: 0 0 0 3px rgba(1, 124, 180, 0.15);
}

.comment-edit-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.comment-save-btn,
.comment-cancel-btn {
  padding: 0.5rem 1.2rem;
  font-size: 1.44rem;
  font-weight: 500;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.comment-save-btn {
  background: var(--ms-blue);
  color: #fff;
}

.comment-save-btn:hover:not(:disabled) {
  background: #015a82;
}

.comment-save-btn:disabled {
  background: #9cb8c8;
  cursor: not-allowed;
}

.comment-cancel-btn {
  background: #efefef;
  color: #292929;
}

.comment-cancel-btn:hover {
  background: #e0e0e0;
}

/* Troll comment styling - displayed to admins/editors only */
.comment.troll-comment .comment-wrapper {
  background-color: rgba(220, 53, 69, 0.3);
  border: 1px solid rgba(220, 53, 69, 0.5);
  border-radius: 0.8rem;
  padding: 0.5rem;
}

.comment-respond {
  padding-top: 2rem;
  border-top: 1px solid #dee2e6;
  font-size: 1.5rem;
}

/* Comment Form */
#commentform a, .akismet_comment_form_privacy_notice a {
  text-decoration: underline;
}

.comment-form {
  background: #efefef;
  padding: 0;
  border-radius: 0.8rem;
  border: 1px solid #dcdcdc;
}

.comment-form h3 {
  background: #292929;
  color: #fff;
  padding: 1rem;
  margin: 0;
  border-radius: 0.8rem 0.8rem 0 0;
  font-size: 1.8rem;
  font-weight: 600;
}

.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.8rem;
  background: #fff;
  font-size: 1.5rem;
  resize: vertical;
  margin-bottom: 0;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--ms-blue);
  box-shadow: 0 0 0 3px rgba(1, 124, 180, 0.1);
}

.comment-form .form-group {
  margin-bottom: 1rem;
}

.comment-form .comment-form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 0 1.5rem 1.5rem;
  margin-top: 1.5rem;
}

.comment-form input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.4rem;
  background: #fff;
  font-size: 1.8rem;
}

.comment-form input:focus {
  outline: none;
  border-color: var(--ms-blue);
}

.comment-form label {
  font-weight: 600;
  color: #292929;
  font-size: 1.44rem;
  margin-bottom: 0.25rem;
  display: block;
}

.comment-form .comment-submit-wrapper {
  display: flex;
  justify-content: flex-end;
  padding: 0 1.5rem 1.5rem;
}

.comment-form .submit {
  background: #292929;
  color: #fff;
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 0.4rem;
  font-size: 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.comment-form .submit:hover {
  background: var(--ms-blue);
}

.comment-form .comment-notes {
  font-size: 1.44rem;
  color: #525252;
  padding: 0 1.5rem;
  margin: 1.5rem 0 0.5rem;
}

.comment-form .form-submit {
  margin-top: 1rem;
  padding: 0 1.5rem 1.5rem;
}

.comment-form .logged-in-as {
  margin-bottom: 1rem;
  padding: 1rem 1.5rem 0;
}

.comment-form .comment-notes,
.comment-form .comment-notes-after,
.comment-form .comment-disclaimer {
  font-size: 1.44rem;
  color: #525252;
  padding: 0 1.5rem;
  line-height: 1.5;
}

.comment-form .comment-disclaimer {
  margin-bottom: 1rem;
}

.comment-form .comment-notes-after a,
.comment-form .comment-disclaimer a {
  color: #525252;
  text-decoration: underline;
}

.comment-form .comment-notes-after a:hover,
.comment-form .comment-disclaimer a:hover {
  color: var(--ms-blue);
}

.pagination .page-numbers,
.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  min-height: 4rem;
  border: 1px solid #dee2e6;
  border-radius: 0.8rem;
  background: #fff;
  color: #292929;
  font-size: 1.575rem;
  font-weight: 500;
  text-decoration: none;
  margin: 0 0.2rem;
  transition: all 0.2s ease;
}

.pagination .page-numbers:hover,
.pagination .page-link:hover {
  background: #f8f9fa;
  border-color: var(--ms-blue);
  color: var(--ms-blue);
}

.pagination .page-numbers.current,
.pagination .page-item.active .page-link {
  background: var(--ms-blue);
  border-color: var(--ms-blue);
  color: #fff;
  font-weight: 600;
}

.pagination .prev,
.pagination .next {
  min-height: 4rem;
  padding: 0.5rem 1rem;
  border-radius: 0.8rem;
}

.pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

/* Related Articles Section */
.related-articles {
  margin-top: 4rem;
  padding: 2rem 1rem;
}

.related-articles-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #292929;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-card-image {
  height: 24rem;
  border-radius: 0.8rem;
  overflow: hidden;
}

.related-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-card-date {
  font-size: 1.44rem;
  color: #525252;
  margin: 0;
}

.related-card-title {
  font-size: 2.25rem;
  font-weight: 600;
  color: #292929;
  line-height: 1.5;
  margin: 0;
}

.related-card-title a {
  color: #292929;
  text-decoration: none;
  transition: color 0.2s ease;
}

.related-card-title a:hover {
  color: var(--ms-blue);
}

.related-card-excerpt {
  font-size: 1.8rem;
  color: #525252;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.related-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ms-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.related-card-link:hover {
  color: var(--ms-blue-darker);
}

.related-card-link i,
.related-card-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

.related-card-comments {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.8rem;
  color: #525252;
}

.related-card-comments i,
.related-card-comments svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Plugin related articles styling */
.related_post_title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #292929;
  margin: 2rem 0;
  line-height: 1.2;
}

ul.related_post {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  ul.related_post {
    grid-template-columns: repeat(2, 1fr);
  }
}

ul.related_post li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

ul.related_post li a:has(img.attachment-thumbnail) {
  display: block;
  width: 100%;
  height: 24rem;
  overflow: hidden;
  border-radius: 0.8rem;
  background-color: #f0f0f0;
}

ul.related_post li img.attachment-thumbnail {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

/* Handle missing/broken images - hide but keep container */
ul.related_post li img.attachment-thumbnail[src=""],
ul.related_post li img.attachment-thumbnail:not([src]),
ul.related_post li img.attachment-thumbnail[src*="data:image"] {
  display: none;
}

ul.related_post li a.related.title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #292929;
  line-height: 1.5;
  margin: 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul.related_post li a.related.title:hover {
  color: var(--ms-blue);
}

/* Hide icon before title - plugin adds icon image */
img[src*="related-ico.png"] {
  display: none;
}

.posts-title {
  font-size: 4.5rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  color: #292929;
}

.posts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Post Card */
.post-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 0.8rem;
  padding: 1.5rem;
  transition: box-shadow 0.3s ease;
}

.post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-card__header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.post-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 1.575rem;
  color: #525252;
}

.post-author {
  font-weight: 600;
  color: #292929;
}

.post-date-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-date {
  color: #525252;
}

.post-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-content p {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.6;
  color: #292929;
}

.post-title {
  font-size: 2.25rem;
  font-weight: 600;
  margin: 0;
}

.post-title a {
  color: #292929;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: var(--ms-blue);
}

/* Pagination - Legacy Style */
.posts-pagination,
.navigation.pagination,
.page-numbers {
  display: flex;
  justify-content: center;
  gap: 0.4rem 0.3rem;
  margin: 1rem 0;
  list-style: none;
  padding: 0;
}

.posts-pagination a,
.posts-pagination span,
.navigation.pagination a,
.navigation.pagination span,
.page-numbers a,
.page-numbers span {
  display: inline-block;
  margin: 0 0.4rem 0 0.3rem;
  color: gray;
  text-decoration: none;
  font-size: 2.5rem;
  font-weight: 700;
}

.posts-pagination a:hover,
.navigation.pagination a:hover,
.page-numbers a:hover {
  text-decoration: underline;
}

.posts-pagination .current,
.navigation.pagination .current,
.page-numbers .current,
.posts-pagination .pages,
.navigation.pagination .pages,
.page-numbers .pages {
  color: silver;
}

blockquote {
  border-radius: 0.8rem;
  background: #292929;
  color: #DCDCDC;
  padding: 1.2em;
}

blockquote strong{
  color: #FFF;
}

.entry-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
  font-size: 1.7rem;
}

.page-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.page-links a {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.4rem;
  color: var(--ms-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-links a:hover {
  background-color: var(--ms-blue);
  color: #ffffff;
  text-decoration: none;
}

.post-navigation-simple {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin: 3rem 0;
  padding: 1rem 0;
}

.post-navigation-simple .nav-previous,
.post-navigation-simple .nav-next {
  flex: 1;
}

.post-navigation-simple .nav-previous {
  text-align: left;
}

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

.post-navigation-simple a {
  color: var(--ms-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.post-navigation-simple a:hover {
  color: var(--ms-blue-darker);
  text-decoration: underline;
}

.nav-previous,
.nav-next {
  flex: 1;
}

.nav-previous a,
.nav-next a {
  color: var(--ms-blue);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
  color: var(--ms-blue-darker);
  text-decoration: underline;
}

.nav-subtitle {
  font-size: 1.575rem;
  color: #525252;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-title {
  font-size: 2rem;
  font-weight: 600;
  color: #292929;
}

/* Footer */
.site-footer {
  width: 100%;
  background: #f5f5f5;
  color: #292929;
  margin-top: auto;
}

@media (min-width: 768px) {
  .site-footer {
    background: #292929;
    color: #fff;
  }
}

.site-footer a {
  color: #292929;
  text-decoration: none;
}

@media (min-width: 768px) {
  .site-footer a {
    color: #fff;
    text-decoration: none;
  }
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .site-footer a:hover {
    color: #fff;
  }
}

.site-footer .container {
  padding: 2rem 1rem;
}

@media (min-width: 768px) {
  .site-footer .container {
    padding: 3rem;
  }
}

.site-footer h5 {
  margin-bottom: 1rem;
}

/* Footer Navigation & Copyright */
.site-footer__wrapper {
  max-width: 120rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.footer-nav {
  flex: 1;
}

.footer-nav h5 {
    font-size: 2rem;
    margin-top: 1rem;
}

.footer-menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu a {
  color: #BDBDBD;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem;
  border-left: 1px solid #444444;
}

.copyright {
  font-size: 1.575rem;
  color: #cccccc;
}

.copyright a {
  color: #ffffff;
  text-decoration: none;
}

@media (min-width: 768px) {
  .site-footer .copyright {
    color: #adb5bd;
  }
}

/* Utility Classes */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 0;
  background: #000000;
  color: #ffffff;
  padding: 0.8rem;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Inline Style Replacements */
#searchWrap {
  display: none;
}

.spacer-60 {
  height: 6rem;
}

.comment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-card-header .comment-author-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-card-header .comment-author-name strong {
  color: #292929;
}

/* Full Card Clickable Links */
a:has(.comment-card),
a:has(.post-card) {
  display: flex;
  width: 100%;
  height: 100%;
  color: inherit;
  margin: 0;
  padding: 0;
}

/* Card hover effects */
.card:hover,
.comment-card:hover,
.post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* Card Image Container */
.card-img-top {
  height: 24rem;
  overflow: hidden;
  position: relative;
}

/* Ensure images fill the card image container */
.card-img-top img,
.card-img-top .wp-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ensure cards have uniform height in rows */
@media (min-width: 768px) {
  #projects > .col-12.col-md-4 {
    display: flex;
  }

  #projects > .col-12.col-md-4 > .card,
  #projects > .col-12.col-md-4 > article.card {
    width: 100%;
  }
}

.row .card.h-100,
.row article.card.h-100 {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.row .card-body.d-flex.flex-column {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.row .card-title {
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

/* Large title for post detail pages */
.post-detail .entry-title {
   font-size: 4rem;
}

@media (max-width: 767.98px) {
  .post-detail .entry-title {
    font-size: 4rem;
  }

  /* Mobile: Center pagination below load-more button */
  #posts-pagination {
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* Increase container height for stacked layout */
  .col-12.position-relative:has(#posts-pagination) {
    min-height: 120px !important;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  html {
    font-size: 50%;
  }
  .site-header__wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  .primary-menu {
    flex-direction: column;
    gap: 1rem;
  }

  .posts-list {
    grid-template-columns: 1fr;
  }

  .entry-title {
    font-size: 3.15rem;
  }

  .posts-title {
    font-size: 3.15rem;
  }

.site-footer__wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .site-footer {
    padding: 2rem 1rem;
  }

  .site-info {
    justify-content: center;
    border-left: none;
    border-top: 1px solid #444444;
    padding-top: 1rem;
  }
