/* 
Theme Name: Huskywide
Description: Modern Husky Air Compressors Theme
Author: Custom
Version: 2.0
*/




:root {
  /* Colors */
  --color-error: #ba1a1a;
  --color-on-error-container: #93000a;
  --color-surface: #f7f9fb;
  --color-surface-container: #eceef0;
  --color-surface-container-low: #f2f4f6;
  --color-on-surface: #191c1e;
  --color-on-surface-variant: #44474c;
  --color-outline: #75777c;
  --color-outline-20: rgba(117, 119, 124, 0.2);
  --color-outline-10: rgba(117, 119, 124, 0.1);
  --color-background: #f7f9fb;
  --color-on-background: #191c1e;
  --color-secondary: #515f74;
  --color-secondary-fixed-dim: #b9c7df;
  --color-white: #ffffff;

  /* Spacing */
  --container-padding: 24px;
  --max-width: 1280px;
  --section-gap: 80px;
  --grid-gutter: 24px;
  --border-radius-sm: 0.125rem;
  --border-radius-lg: 0.25rem;
  --border-radius-xl: 0.5rem;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-background);
  color: var(--color-on-background);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-on-surface);
}

.font-display-lg {
  font-size: 36px;
  line-height: 44px;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.font-headline-lg {
  font-size: 32px;
  line-height: 40px;
}

.font-headline-md {
  font-size: 24px;
  line-height: 32px;
}

.text-error {
  color: var(--color-error);
}

.text-secondary {
  color: var(--color-secondary);
}

.uppercase {
  text-transform: uppercase;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.grid {
  display: grid;
  gap: var(--grid-gutter);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.product-badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .product-badges-grid {
    display: flex;
    flex-wrap: wrap;
  }
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.my-8 {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.py-section-gap {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

/* Header */
.site-header {
  background-color: var(--color-surface);
  border-bottom: 2px solid var(--color-outline-20);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  height: 80px;
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-collapsible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.5rem;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-on-surface);
  padding: 0.5rem;
}

.site-logo {
  display: block;
}

.site-logo img {
  max-height: 40px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  height: 100%;
  gap: 2rem;
  margin-left: 2rem;
}

.main-nav ul {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 2rem;
}

.main-nav a {
  display: flex;
  align-items: center;
  height: 100%;
  color: var(--color-outline);
  font-weight: 500;
  font-size: 14px;
  padding: 0 0.5rem;
}

.main-nav a:hover {
  color: var(--color-error);
  background-color: var(--color-surface-container);
}

.search-form-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 320px;
}

.search-form-wrapper .icon {
  position: absolute;
  left: 12px;
  color: var(--color-outline);
}

.icon {
  width: 1.5em;
  height: 1.5em;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
}

.search-form-wrapper input {
  width: 100%;
  background-color: var(--color-surface-container-low);
  border: 1px solid var(--color-outline-20);
  border-radius: var(--border-radius-sm);
  padding: 8px 16px 8px 40px;
  font-size: 14px;
  font-family: inherit;
}

.search-form-wrapper input:focus {
  outline: none;
  border-color: var(--color-error);
  box-shadow: 0 0 0 1px var(--color-error);
}

/* Hero Section */
.hero-section {
  padding: 2rem 0;
  background-color: var(--color-background);
}

.hero-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-outline-20);
  border-radius: var(--border-radius-xl);
  padding: 3rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 18px;
  color: var(--color-on-surface-variant);
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-error);
  color: var(--color-white);
  padding: 1rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
  gap: 0.5rem;
  border-radius: var(--border-radius-sm);
}

.btn-primary:hover {
  background-color: var(--color-on-error-container);
}

.hero-image {
  height: 400px;
  border-radius: var(--border-radius-xl);
  overflow: hidden;
}

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

/* Category Cards */
.section-light {
  background-color: var(--color-surface-container);
}

.category-card,
.product-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-outline-20);
  border-radius: var(--border-radius-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

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

.category-card:hover,
.product-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.category-card-image {
  display: block;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid var(--color-outline-10);
}

.category-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.category-card-header,
.product-card-header {
  padding: 1.5rem;
  background-color: var(--color-surface-container-low);
  border-bottom: 1px solid var(--color-outline-10);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-card-header {
  padding: 0.75rem 1.5rem;
  font-family: monospace;
  font-size: 12px;
  color: var(--color-outline);
}

.category-card-header h3 {
  font-size: 24px;
  color: var(--color-error);
  margin: 0;
}

.category-card-body,
.product-card-body {
  padding: 1.5rem;
  flex-grow: 1;
  text-align: center;
}

.product-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-image {
  height: 160px;
  object-fit: contain;
  margin-bottom: 1rem;
  transition: transform 0.2s;
}

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

.product-card-body h2 {
  font-size: 20px;
  margin-bottom: 0.5rem;
}

.product-card-body h3 {
  font-size: 20px;
  margin-bottom: 0.5rem;
}

.product-card-body p {
  color: var(--color-outline);
  font-size: 14px;
  margin-bottom: 1rem;
}

.category-card-body p {
  color: var(--color-on-surface-variant);
  margin-bottom: 1rem;
}

.category-card-body ul li {
  margin-bottom: 0.5rem;
}

.category-card-body ul a {
  color: var(--color-error);
  font-weight: 700;
}

.category-card-body ul a:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  background-color: var(--color-surface-container);
  color: var(--color-secondary);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.badge-spec {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface-container-low);
  border: 1px solid var(--color-outline-20);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
}

.badge-spec-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--color-outline);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.badge-spec-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-on-surface);
  text-align: center;
}

.category-card-footer,
.product-card-footer {
  padding: 0 1.5rem 1.5rem;
  margin-top: auto;
}

.category-card-footer a,
.product-card-footer a {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-error);
  font-weight: 700;
}

/* Guide Cards */
.guide-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-outline-20);
  border-radius: var(--border-radius-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: box-shadow 0.3s ease;
}

.guide-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.guide-card-image {
  display: block;
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-bottom: 1px solid var(--color-outline-10);
}

.guide-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.guide-card-header {
  padding: 1.25rem 1.5rem 0.5rem;
}

.guide-card-header h3 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-card-header h3 a {
  color: var(--color-on-surface);
  text-decoration: none;
}

.guide-card-header h3 a:hover {
  color: var(--color-error);
}

.guide-card-body {
  padding: 0 1.5rem 1.5rem;
  flex-grow: 1;
  text-align: left;
}

.guide-card-body p {
  color: var(--color-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-outline-10);
  background-color: var(--color-surface-container-low);
  text-align: left;
  margin-top: auto;
}

.guide-card-footer a {
  color: var(--color-error);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.3s ease;
}

.guide-card-footer a:hover {
  gap: 8px;
}

/* Sidebar Layout */
.page-layout {
  display: flex;
  gap: var(--grid-gutter);
  padding: calc(var(--section-gap) - 48px) 0 var(--section-gap);
}

.site-sidebar {
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border-right: 1px solid var(--color-outline-20);
  padding: 1.5rem 0;
}

.site-sidebar .widget {
  padding: 0 1rem;
  margin-bottom: 1.5rem;
}

.site-sidebar .widget .widget-title {
  font-size: 18px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-outline-20);
}

.site-sidebar .widget ul li {
  margin-bottom: 0.5rem;
}

.site-sidebar .widget ul a {
  display: block;
  padding: 8px 12px;
  color: var(--color-on-surface-variant);
  border-radius: var(--border-radius-sm);
  font-size: 14px;
}

.site-sidebar .widget ul a:hover {
  background-color: var(--color-surface-container);
}

.content-area {
  flex: 1;
  min-width: 0;
  background-color: var(--color-white);
  padding: 3rem;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Prose (Content formatting) */
.prose h2 {
  font-size: 32px;
  margin: 2rem 0 1rem;
  color: var(--color-on-surface);
}

.prose h3 {
  font-size: 24px;
  margin: 1.5rem 0 1rem;
  color: var(--color-error);
}

.prose p {
  margin-bottom: 1.5rem;
  color: var(--color-on-surface-variant);
}

.prose ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.prose a,
.entry-content a {
  color: #2563eb;
  text-decoration: underline;
}

.prose a:hover,
.entry-content a:hover {
  color: #1d4ed8;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background-color: var(--color-white);
  border-radius: var(--border-radius-xl);
  box-shadow: 0 0 0 1px var(--color-outline-20), 0 4px 16px rgba(0, 0, 0, 0.04);
}

table th,
table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border: 1px solid var(--color-outline-20);
  line-height: 1.5;
  color: var(--color-on-surface-variant);
}

table tr:first-child th,
table tr:first-child td {
  border-top: none;
}

table tr:last-child th,
table tr:last-child td {
  border-bottom: none;
}

table tr th:first-child,
table tr td:first-child {
  border-left: none;
}

table tr th:last-child,
table tr td:last-child {
  border-right: none;
}

table th {
  background-color: var(--color-surface-container-low);
  font-weight: 600;
  color: var(--color-on-surface);
}

table tbody tr {
  transition: all 0.2s ease;
}

table tbody tr:hover td {
  background-color: var(--color-surface);
}

/* Pros and Cons Table Redesign */
.pros-cons-table {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.pros-cons-table caption {
  font-weight: 800;
  font-size: 1.5rem;
  padding: 1.5rem 1.5rem 0.5rem;
  margin: 0;
  color: var(--color-on-surface);
  text-align: center;
  background: var(--color-white);
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.pros-cons-table th,
.pros-cons-table td {
  width: 50%;
  vertical-align: top;
  border: none;
  border-top: 1px solid var(--color-outline-10);
  padding: 1rem 1.5rem;
}

.pros-cons-table tr:first-child td {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-on-surface);
  background-color: var(--color-white);
  text-align: center;
  border-top: none;
}

/* Pros Column */
.pros-cons-table tr:not(:first-child) td:first-child {
  background-color: rgba(22, 163, 74, 0.05);
  color: #166534;
}

.pros-cons-table tr:not(:first-child) td:first-child::before {
  content: '';
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="%2316a34a"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>');
  margin-right: 8px;
  vertical-align: text-bottom;
}

/* Cons Column */
.pros-cons-table tr:not(:first-child) td:last-child {
  background-color: rgba(220, 38, 38, 0.05);
  color: #991b1b;
  border-left: 1px solid var(--color-white);
}

.pros-cons-table tr:not(:first-child) td:last-child:not(:empty)::before {
  content: '';
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="%23dc2626"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>');
  margin-right: 8px;
  vertical-align: text-bottom;
}

.pros-cons-table tr:hover td {
  background-color: inherit;
  /* Disable hover effect for this table */
}

/* Responsive Tables */
@media (max-width: 768px) {
  table:not(.pros-cons-table) {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
}

/* Footer */
.site-footer {
  background-color: var(--color-on-surface);
  color: var(--color-secondary-fixed-dim);
  border-top: 4px solid var(--color-error);
  padding: 3rem 0;
  margin-top: auto;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--grid-gutter);
}

.site-footer .footer-brand .brand-title {
  color: var(--color-white);
  font-size: 24px;
  margin-bottom: 1rem;
}

.site-footer .footer-brand p {
  color: var(--color-secondary-fixed-dim);
}

.site-footer .widget .widget-title {
  color: var(--color-white);
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: 1rem;
}

.site-footer .widget ul li {
  margin-bottom: 0.75rem;
}

/* Single active widget column layout (desktop) */
@media (min-width: 1025px) {
  .site-footer .container:has(> :nth-child(2):last-child) {
    grid-template-columns: 1fr 2fr;
  }

  .site-footer .container:has(> :nth-child(2):last-child) .widget ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .site-footer .container:has(> :nth-child(2):last-child) .widget ul li {
    margin-bottom: 0;
  }
}

.site-footer a,
.site-footer a:visited {
  color: var(--color-secondary-fixed-dim);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:active {
  color: var(--color-error);
}

/* Responsive */
@media (max-width: 1024px) {
  .site-sidebar {
    display: none;
  }

  /* Hide sidebar on small screens */
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer .container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-top {
    width: 100%;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .header-collapsible {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    padding-top: 1rem;
    border-top: 1px solid var(--color-outline-20);
  }

  .header-collapsible.active {
    display: flex;
  }

  .main-nav {
    display: block;
    width: 100%;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: 0.5rem 0;
    width: 100%;
    border-bottom: 1px solid var(--color-outline-10);
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .site-footer .container {
    grid-template-columns: 1fr;
  }

  .font-display-lg {
    font-size: 36px;
    line-height: 44px;
  }

  .font-headline-lg {
    font-size: 26px;
    line-height: 34px;
  }

  .py-section-gap {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .site-header {
    height: auto;
    padding: 1rem 0;
  }

  .site-header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .search-form-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .gallery-bento {
    padding: 1rem;
  }

  .hero-card {
    padding: 1rem;
  }

  .content-area {
    padding: 1.5rem;
  }
}

/* Single Product Page */
.breadcrumbs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-outline);
  font-size: 11px; /* Decreased font size */
  text-transform: uppercase;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0.25rem 0; /* Added small vertical padding */
  opacity: 0.8; /* Muted color */
  font-family: monospace;
}

.breadcrumbs a, .breadcrumbs span, .breadcrumbs svg {
  flex-shrink: 0;
}

.breadcrumbs a {
  display: flex;
  align-items: center;
}

.breadcrumbs svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.breadcrumbs span.current {
  color: var(--color-on-surface);
  font-weight: bold;
}

.breadcrumbs a:hover {
  color: var(--color-error);
}

.product-header-section {
  margin-bottom: 4rem;
}

.gallery-bento {
  background-color: var(--color-surface);
  border: 1px solid var(--color-outline-20);
  border-radius: var(--border-radius-xl);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-height: 500px;
  height: auto;
}

.gallery-bento img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.star-rating {
  display: flex;
  color: #f59e0b;
  margin-bottom: 1.5rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.spec-card {
  background-color: var(--color-surface-container);
  border: 1px solid var(--color-outline-20);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.spec-card span:first-child {
  font-size: 12px;
  color: var(--color-outline);
  text-transform: uppercase;
}

.spec-card span:last-child {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-on-surface);
}

/* Related Posts Grid */
.related-posts-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  /* Prevent horizontal scroll from blowing out */
}

.related-posts-section .entry-title {
  margin-bottom: 1.5rem;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* 2 columns on all screens */
  gap: 0.75rem;
  /* Smaller gap for mobile */
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .related-posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    /* 3 columns on tablet */
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .related-posts-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    /* 5 columns on desktop */
    gap: 1.5rem;
  }
}

.related-post-item {
  height: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.related-post-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background-color: var(--color-surface, #f7f9fb);
  border: 1px solid var(--color-outline-variant, #c5c6cc);
  border-radius: var(--border-radius-lg, 8px);
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.related-post-link * {
  box-sizing: border-box;
}

.related-post-link:hover {
  border-color: var(--color-primary, #06101d);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.related-post-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  /* 4:3 Aspect Ratio */
  background-color: var(--color-surface-variant, #e0e3e5);
  overflow: hidden;
}

.related-post-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-post-link:hover .related-post-img {
  transform: scale(1.05);
}

.related-post-text {
  padding: 0.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.related-post-title {
  margin: 0;
  font-size: 13px;
  /* Slightly smaller on mobile to fit long words */
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-on-surface, #191c1e);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
  /* Forces long words to break */
  transition: color 0.3s ease;
}

@media (min-width: 640px) {
  .related-post-title {
    font-size: 14px;
  }
}

.related-post-link:hover .related-post-title {
  color: var(--color-primary, #06101d);
}

/* Fix for Tables Causing Horizontal Scroll */
.entry-content table,
.prose table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  word-wrap: break-word;
  overflow-wrap: break-word;
  border-collapse: collapse;
}

.entry-content table td,
.entry-content table th,
.prose table td,
.prose table th {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  width: 100%;
}

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

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none;
}

.pagination .page-numbers:hover {
  background-color: #eff6ff;
  color: #2563eb;
}

.pagination .page-numbers.current {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  cursor: default;
}

.pagination .prev.page-numbers,
.pagination .next.page-numbers {
  padding-left: 1rem;
  padding-right: 1rem;
  width: auto;
  font-size: 14px;
  font-weight: 700;
}

.pagination .dots.page-numbers {
  border-color: transparent;
  background-color: transparent;
  cursor: default;
  box-shadow: none;
}

.pagination .dots.page-numbers:hover {
  background-color: transparent;
  color: #374151;
}