/* Blog Page Styles - Matching Site Color Scheme */

:root {
  --primary-color: #003366;
  --primary-light: #004080;
  --secondary-color: #2E8B57;
  --accent-color: #4fc3f7;
  --success-color: #28a745;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e9ecef;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.2);
  --border-radius: 12px;
  --transition: all 0.3s ease;

  /* Editorial blog theme — golf-site layout, recoloured to the site brand
     (light cards, navy text, navy accent). Change --blog-accent to retune. */
  --blog-accent: #003366;
  --blog-accent-soft: #004080;
  --blog-card-bg: #ffffff;
  --blog-card-line: #e9ecef;
  --blog-section-bg: #f8f9fa;
  --blog-text: #003366;
  --blog-text-muted: #6c757d;
  --blog-text-faint: #8a94a3;
  --blog-ease: cubic-bezier(.2, .8, .2, 1);
}

* {
  box-sizing: border-box;
}

body.blog-page {
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  background: var(--blog-section-bg);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reset main content area for blog page */
.blog-page main {
  margin: 0 !important;
  padding: 0 !important;
}

.blog-page {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
}

/* Utility classes for inline style replacements */
.blog-hero-title {
  font-weight: 700;
}

.blog-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.blog-section-title {
  margin: 6px 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-color);
}

.blog-date {
  font-size: 13px;
}

/* Hero Section - Using standard .full-bleed .jumbotron styling from Tasks.css */
/* Removed custom .blog-hero-section styling to use consistent task page styling */

.jumbotron.blog-header {
  background: linear-gradient(135deg, #003366 0%, #004080 100%) !important;
  color: #fff;
  padding: 2.5rem 2rem 2rem;
}

.jumbotron.blog-header h1,
.jumbotron.blog-header .display-5 {
  color: #fff !important;
}

.jumbotron.blog-header p,
.jumbotron.blog-header .lead {
  color: rgba(255, 255, 255, 0.9) !important;
}

.blog-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.blog-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.blog-hero-actions {
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.blog-hero-search {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 0;
  border-radius: 15px;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.blog-hero-search:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.search-wrapper {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
}

.search-icon {
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
}

.blog-hero-search input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 16px;
  font-weight: 500;
  width: 380px;
  font-family: inherit;
}

.blog-hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.blog-hero-search input:focus {
  outline: none;
}

/* Mobile Topics Dropdown - hidden on desktop */
.mobile-topics-dropdown {
  display: none;
  position: relative;
  width: auto;
  margin-top: 0;
}

.mobile-topics-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 28px;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 50px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mobile-topics-btn:hover,
.mobile-topics-btn:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  outline: none;
}

.mobile-topics-arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
  opacity: 0.8;
}

.mobile-topics-dropdown.open .mobile-topics-arrow {
  transform: rotate(180deg);
}

.mobile-topics-dropdown.open .mobile-topics-btn {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.mobile-topics-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 100;
  overflow: hidden;
  animation: topicsSlideDown 0.25s ease-out;
  padding: 6px 0;
}

@keyframes topicsSlideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.mobile-topics-dropdown.open .mobile-topics-menu {
  display: block;
}

.mobile-topics-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  color: #3a3f47;
  font-weight: 500;
  font-size: 14.5px;
  text-decoration: none;
  transition: all 0.15s ease;
  font-family: 'Poppins', sans-serif;
  border-bottom: none;
  margin: 0 6px;
  border-radius: 10px;
}

.mobile-topics-item:last-child {
  border-bottom: none;
}

.mobile-topics-item:hover {
  background: #f0f4fa;
  color: var(--primary-color);
  text-decoration: none;
}

.mobile-topics-item.active {
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
}

.mobile-topics-item.active:hover {
  background: #004488;
  color: #fff;
  text-decoration: none;
}

@media (max-width: 768px) {
  .mobile-topics-dropdown {
    display: block;
  }

  .full-bleed:has(.blog-header) {
    overflow: visible !important;
  }

  .jumbotron.blog-header {
    overflow: visible !important;
    padding-bottom: 2.5rem;
  }
}

@media (max-width: 320px) {
  .mobile-topics-menu {
    min-width: 180px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-hero-section {
    padding: 4rem 0 3rem;
  }

  .blog-hero-search input {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .blog-hero-section {
    padding: 3rem 0 2rem;
  }

  .blog-hero-search input {
    width: 200px;
  }

  .blog-wrap {
    padding: 16px 8px;
    max-width: 100%;
  }

  .blog-grid {
    gap: 16px;
    display: block !important;
  }

  .blog-grid section>div:first-child {
    flex-direction: column !important;
    text-align: center !important;
    margin-bottom: 20px !important;
  }

  .blog-grid section h2 {
    text-align: center !important;
    margin: 6px auto !important;
  }

  .blog-muted {
    text-align: center !important;
    margin: 0 auto !important;
    max-width: 280px !important;
  }

  .blog-sort-controls {
    margin-top: 12px !important;
  }

  .blog-cards {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    justify-items: center !important;
    padding: 0 !important;
    margin-bottom: 20px !important;
  }

  .blog-card {
    margin: 0 auto !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .blog-card h3 {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  .blog-card p {
    font-size: 0.9rem;
  }

  .blog-kicker {
    text-align: center !important;
  }

  .blog-aside {
    display: none !important;
  }
}

/* Extra small mobile devices (320px) */
@media (max-width: 320px) {
  .blog-wrap {
    padding: 12px 4px;
    margin: 0;
  }

  .blog-hero-search input {
    width: 180px;
    font-size: 14px;
  }

  .blog-card {
    padding: 0 !important;
    margin: 0 !important;
  }

  .blog-card-content {
    padding: 20px 18px !important;
  }

  .blog-card h3 {
    font-size: 1.1rem !important;
    line-height: 1.2 !important;
  }

  .blog-card p {
    font-size: 0.85rem !important;
  }

  .blog-grid section h2 {
    font-size: 22px !important;
  }

  .blog-muted {
    font-size: 0.85rem !important;
    max-width: 260px !important;
  }

  .blog-sort-controls select {
    font-size: 14px;
  }

  .newsletter-form {
    flex-direction: column !important;
  }

  .newsletter-form input {
    min-width: auto !important;
    width: 100% !important;
  }

  .newsletter-form button {
    width: 100% !important;
    margin-top: 4px !important;
  }
}

.blog-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px;
}





.blog-btn {
  background: var(--accent-color);
  color: var(--bg-white);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

/* Grid Layout */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.blog-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Blog Card Styles — dark editorial cards (image-free), navy + gold */
.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--blog-card-bg);
  border: 1px solid var(--blog-card-line);
  border-radius: 18px;
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 34, 68, 0.10);
  transition: transform 0.3s var(--blog-ease), border-color 0.3s var(--blog-ease), box-shadow 0.3s var(--blog-ease);
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--blog-accent);
  box-shadow: 0 20px 44px rgba(0, 34, 68, 0.20);
}

/* Gold accent strip in place of a hero image */
.blog-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blog-accent);
  opacity: 0.55;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s var(--blog-ease);
}

.blog-card:hover::before {
  opacity: 1;
}

/* Whole card is one click target → the article. Stretched overlay lives on the
   title link; the inner span (not the link) carries the line-clamp so overflow
   clipping never crops this overlay. */
.blog-card-link {
  display: block;
}

.blog-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Meta row on top: CATEGORY · date · reading time */
.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blog-text-faint);
}

.blog-card-cat {
  position: relative;
  z-index: 2;
  color: var(--blog-accent);
  text-decoration: none;
}

.blog-card-cat:hover {
  color: var(--blog-accent-soft);
  text-decoration: underline;
}

.blog-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--blog-text-faint);
}

/* Title — 2-line clamp with reserved height so cards in a row align */
.blog-title-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.2em * 2);
}

/* Blog Card Image Styles */
.blog-card-image {
  margin: -18px -18px 10px -18px;
  /* Negative margins to extend to card edges */
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  overflow: hidden;
}

.blog-card-image a {
  display: block;
  text-decoration: none;
}

.blog-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  flex: 1;
  padding: 30px 28px;
}

.blog-card .meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.blog-avatar {
  height: 46px;
  width: 46px;
  border-radius: 10px;
  background: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-weight: 800;
}

.blog-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--blog-text);
}

.blog-title a {
  color: var(--blog-text);
  text-decoration: none;
  transition: color 0.2s var(--blog-ease);
}

.blog-card:hover .blog-title a {
  color: var(--blog-accent);
}

.blog-excerpt {
  margin: 0;
  color: var(--blog-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-tag {
  background: var(--bg-light);
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 13px;
  border: 1px solid var(--border-color);
}

.blog-readmore {
  background: var(--primary-color);
  color: var(--bg-white);
  padding: 8px 16px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-readmore i {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.blog-readmore:hover {
  color: var(--bg-white);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.blog-readmore:hover i {
  transform: translateX(3px);
}

.blog-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 8px;
}

/* Sidebar Styles */
.blog-aside {
  position: sticky;
  top: 32px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-panel {
  background: var(--blog-card-bg);
  border-radius: 18px;
  padding: 26px;
  color: var(--blog-text);
  border: 1px solid var(--blog-card-line);
  box-shadow: 0 10px 30px rgba(0, 34, 68, 0.10);
}

.blog-panel h3 {
  margin: 0 0 16px 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blog-accent);
  font-family: 'Poppins', sans-serif;
}

/* Topics */
.blog-filter-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-chip {
  padding: 12px 16px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e8eef4;
  cursor: pointer;
  color: var(--blog-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: block;
  text-align: left;
  transition: color 0.2s var(--blog-ease), border-color 0.2s var(--blog-ease), background 0.2s var(--blog-ease);
}

.blog-chip:hover {
  background: #e8f0fe;
  color: var(--blog-accent);
  border-color: #c5d8e8;
  text-decoration: none;
}

.blog-chip.active {
  background: var(--blog-accent);
  color: #fff;
  border-color: var(--blog-accent);
  font-weight: 700;
}

/* About panel */
.blog-panel-about p {
  margin: 0 0 18px 0;
  font-size: 0.9rem;
  color: var(--blog-text-muted);
  line-height: 1.6;
}

.blog-panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 11px 20px;
  background: var(--blog-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s var(--blog-ease);
}

.blog-panel-link:hover {
  background: var(--blog-accent-soft);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.blog-panel-link i {
  margin-left: 6px;
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.blog-panel-link:hover i {
  transform: translateX(4px);
}

/* Popular Posts */
.blog-popular-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.blog-popular-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--blog-card-line);
  text-decoration: none;
  transition: all 0.2s ease;
}

.blog-popular-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.blog-popular-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  background: rgba(0, 51, 102, 0.08);
  color: var(--blog-accent);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

.blog-popular-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--blog-text);
  line-height: 1.45;
  transition: color 0.2s ease;
}

.blog-popular-item:hover .blog-popular-title {
  color: var(--blog-accent);
}

/* Pagination */
.blog-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  padding: 20px 0;
}

.blog-page-btn {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  min-width: 40px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.blog-page-btn:hover:not(.current):not([style*="cursor: not-allowed"]) {
  background: var(--accent-color);
  color: var(--bg-white);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 51, 102, 0.15);
  border-color: var(--accent-color);
}

.blog-page-btn.current {
  background: var(--primary-color);
  color: var(--bg-white);
  border-color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(0, 51, 102, 0.2);
  font-weight: 600;
}

.blog-page-btn i {
  font-size: 12px;
}

/* Inline Pagination (next to sort controls) */
.blog-pagination-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-page-btn-small {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  min-width: 32px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.blog-page-btn-small:hover:not(.disabled) {
  background: var(--accent-color);
  color: var(--bg-white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 51, 102, 0.15);
  border-color: var(--accent-color);
}

.blog-page-btn-small.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.blog-page-info {
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
  padding: 0 8px;
  white-space: nowrap;
}

/* Responsive pagination */
@media (max-width: 768px) {
  .blog-pagination {
    gap: 6px;
    padding: 15px 0;
  }

  .blog-page-btn {
    padding: 8px 10px;
    min-width: 36px;
    font-size: 13px;
  }
}

/* Utility Classes */
.blog-footer {
  color: var(--text-light);
  text-align: center;
  margin-top: 28px;
  opacity: 0.7;
}

.blog-muted {
  color: var(--text-light);
}

.blog-kicker {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-color);
}

.blog-no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-dark);
}

.blog-no-posts h3 {
  margin: 20px 0 10px 0;
  color: var(--primary-color);
}

.blog-sort-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.blog-sort-controls label {
  font-weight: 700;
  color: var(--text-dark);
}

.blog-sort-controls select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-weight: 700;
  color: var(--text-dark);
  background: var(--bg-white);
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
}

.newsletter-form button {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 980px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-cards {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
  }

  .blog-card {
    max-width: 100%;
    width: 100%;
  }

  .blog-card-image img {
    height: 180px;
    /* Slightly smaller on tablet */
  }

  .blog-aside {
    position: static;
    max-height: none;
    overflow-y: visible;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .blog-aside {
    display: none !important;
  }

  .blog-card-image img {
    height: 160px;
  }

  .blog-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .blog-actions {
    width: 100%;
    justify-content: center;
  }

  .blog-wrap {
    padding: 20px 16px;
    text-align: center;
  }

  .blog-cards {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
    gap: 12px;
  }

  .blog-card {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    border-radius: 16px;
  }

  /* Single-column cards read better left-aligned than centred */
  .blog-card-content {
    padding: 24px 22px;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
  }

  .blog-card-meta {
    justify-content: flex-start;
    font-size: 0.68rem;
  }

  .blog-title {
    font-size: 1.15rem;
    line-height: 1.3;
  }

  /* Full-width cards have room — allow up to 3 title lines, drop the reserved height */
  .blog-title-text {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    min-height: 0;
  }

  .blog-excerpt {
    font-size: 0.9rem;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  /* Fix white gap on mobile for blog page */
  .jumbotron.blog-header {
    margin-top: 0 !important;
    padding-top: 2rem !important;
    border-radius: 0 !important;
  }
}

/* ===== Shared Sidebar & Widget Styles (used by search_results.html) ===== */

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: var(--bg-white, #fff);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-color, #e9ecef);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color, #003366);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color, #e9ecef);
}

.search-widget .input-group {
  border-radius: 8px;
  overflow: hidden;
}

.search-widget .form-control {
  border-radius: 8px 0 0 8px;
  border: 1px solid var(--border-color, #e9ecef);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.search-widget .btn-primary {
  background: var(--primary-color, #003366);
  border-color: var(--primary-color, #003366);
  border-radius: 0 8px 8px 0;
  padding: 10px 16px;
}

/* Categories List */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 4px;
}

.category-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark, #333);
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.category-link:hover {
  background: var(--bg-light, #f8f9fa);
  text-decoration: none;
  color: var(--primary-color, #003366);
}

.category-item.active .category-link {
  background: var(--primary-color, #003366);
  color: #fff;
}

.category-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.category-name {
  flex: 1;
  font-weight: 600;
}

.category-link .post-count {
  font-size: 0.8rem;
  color: var(--text-light, #6c757d);
}

.category-item.active .category-link .post-count {
  color: rgba(255, 255, 255, 0.7);
}

/* Popular Posts */
.popular-post-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color, #e9ecef);
}

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

.post-thumbnail {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-post-item .post-info {
  flex: 1;
  min-width: 0;
}

.popular-post-item .post-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.3;
}

.popular-post-item .post-title a {
  color: var(--text-dark, #333);
  text-decoration: none;
}

.popular-post-item .post-title a:hover {
  color: var(--accent-color, #4fc3f7);
}

.popular-post-item .post-meta {
  font-size: 0.75rem;
  color: var(--text-light, #6c757d);
  display: flex;
  gap: 10px;
}

/* Newsletter Widget */
.newsletter-widget p {
  font-size: 0.9rem;
  color: var(--text-light, #6c757d);
  margin-bottom: 12px;
}

.newsletter-widget .form-control {
  border-radius: 8px;
  border: 1px solid var(--border-color, #e9ecef);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.newsletter-widget .btn-primary {
  background: var(--primary-color, #003366);
  border-color: var(--primary-color, #003366);
  border-radius: 8px;
  font-weight: 600;
  padding: 10px;
}

.newsletter-widget .btn-primary:hover {
  background: #004080;
}

/* Services Widget */
.service-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-dark, #333);
  transition: all 0.2s ease;
  margin-bottom: 8px;
  border: 1px solid var(--border-color, #e9ecef);
}

.service-item:hover {
  background: var(--bg-light, #f8f9fa);
  text-decoration: none;
  transform: translateX(4px);
}

.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-color, #003366);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.service-content h6 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color, #003366);
  margin: 0;
}

.service-content p {
  font-size: 0.8rem;
  color: var(--text-light, #6c757d);
  margin: 2px 0 0;
}

/* Pagination */
.pagination-wrapper {
  margin-top: 2rem;
}

.pagination-wrapper .page-link {
  color: var(--primary-color, #003366);
  border-radius: 8px;
  margin: 0 2px;
  border: 1px solid var(--border-color, #e9ecef);
  font-weight: 600;
}

.pagination-wrapper .page-item.active .page-link {
  background: var(--primary-color, #003366);
  border-color: var(--primary-color, #003366);
}

/* Sidebar Mobile Responsive */
@media (max-width: 768px) {
  .blog-sidebar {
    position: static;
    margin-top: 2rem;
  }
}

/* ==========================================================================
   Blog index — authoritative tablet/mobile card grid (overrides the older
   scattered breakpoints above). Sidebar sits 320px on the right at >=981px,
   drops below the cards at 769–980px, and is hidden at <=768px.
   ========================================================================== */

/* Small laptop / large tablet: two cards beside the 320px sidebar get squeezed
   (titles truncate mid-phrase) — use a single full-width reading column. */
@media (min-width: 981px) and (max-width: 1200px) {
  .blog-grid .blog-cards {
    grid-template-columns: 1fr;
  }
}

/* Tablet: the sidebar has dropped below, so the cards get the full width —
   keep two across down to 620px, centred, with 3-line titles (reserved height
   so the two columns stay aligned). */
@media (min-width: 621px) and (max-width: 980px) {
  .blog-cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .blog-card-content {
    text-align: center !important;
    align-items: center !important;
  }

  .blog-card-meta {
    justify-content: center !important;
  }

  .blog-title-text {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    min-height: calc(1.2em * 3);
  }
}

/* Tablet stacked sidebar (769–980): compact the full-width topic rows into pills */
@media (min-width: 769px) and (max-width: 980px) {
  .blog-filter-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .blog-chip {
    display: inline-block;
    width: auto;
    text-align: center;
    padding: 10px 16px;
  }
}

/* Phones: single column, left-aligned for easy scanning; titles free to grow */
@media (max-width: 620px) {
  .blog-cards {
    grid-template-columns: 1fr !important;
  }

  .blog-card-content {
    text-align: left !important;
    align-items: flex-start !important;
  }

  .blog-card-meta {
    justify-content: flex-start !important;
  }

  .blog-title-text {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    min-height: 0;
  }
}