.calio-post-grid-wrap {
  display: grid;
  gap: 18px;
}

.calio-post-grid {
  display: grid;
  gap: 24px;
}

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

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

.calio-post-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calio-post-grid-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: #fff;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, background-color .28s ease;
}

.calio-post-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

.calio-post-grid-card:focus-within {
  border-color: rgba(59, 130, 246, 0.42);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.calio-post-grid-media {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 220px;
  background: #e2e8f0;
}

.calio-post-grid-media img {
  width: 100%;
  height: 100%;
  display: block;
  -o-object-fit: cover;
     object-fit: cover;
  transition: transform .35s ease, opacity .3s ease;
}

.calio-post-grid-card:hover .calio-post-grid-media img,
.calio-post-grid-card:focus-within .calio-post-grid-media img {
  transform: scale(1.04);
}

.calio-post-grid.ratio-square .calio-post-grid-media { aspect-ratio: 1 / 1; }
.calio-post-grid.ratio-landscape .calio-post-grid-media { aspect-ratio: 4 / 3; }
.calio-post-grid.ratio-portrait .calio-post-grid-media { aspect-ratio: 3 / 4; }
.calio-post-grid.ratio-auto .calio-post-grid-media { aspect-ratio: auto; }

.calio-post-grid-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.calio-post-grid.chrome-flat .calio-post-grid-card {
  box-shadow: none;
}

.calio-post-grid.chrome-soft .calio-post-grid-card {
  background: linear-gradient(-180deg, #fff, #f8fafc);
}

.calio-post-grid.chrome-outlined .calio-post-grid-card {
  border-width: 2px;
  border-color: rgba(148, 163, 184, 0.22);
  background: #fff;
}

.calio-post-grid.chrome-elevated .calio-post-grid-card {
  border-color: transparent;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.14);
}

.calio-post-grid-category-row,
.calio-post-grid-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.calio-post-grid-eyebrow {
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.calio-post-grid-category {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.calio-post-grid.feature-first .calio-post-grid-card.is-featured {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 42%),
    linear-gradient(-180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 1));
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.14);
}

.calio-post-grid.feature-first .calio-post-grid-card.is-featured .calio-post-grid-media {
  min-height: 280px;
}

.calio-post-grid.feature-first .calio-post-grid-card.is-featured .calio-post-grid-title {
  font-size: clamp(1.45rem, 1.1rem + 1vw, 2rem);
}

.calio-post-grid.feature-first .calio-post-grid-card.is-featured .calio-post-grid-content {
  padding: 26px;
  gap: 16px;
}

.calio-post-grid-featured-badge {
  display: inline-flex;
  align-items: center;
  width: -moz-fit-content;
  width: fit-content;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.calio-post-grid.feature-first.cols-3 .calio-post-grid-card.is-featured,
.calio-post-grid.feature-first.cols-4 .calio-post-grid-card.is-featured {
  grid-column: span 2;
}

.calio-post-grid-meta { color: #64748b; font-size: 12px; }
.calio-post-grid-meta-item + .calio-post-grid-meta-item::before { content: '/'; margin-left: 12px; color: rgba(100, 116, 139, 0.6); }
.calio-post-grid.meta-stacked .calio-post-grid-meta {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}
.calio-post-grid.meta-stacked .calio-post-grid-meta-item + .calio-post-grid-meta-item::before {
  content: none;
}
.calio-post-grid.meta-compact .calio-post-grid-meta {
  gap: 6px 10px;
  font-size: 11px;
}
.calio-post-grid-title { margin: 0; font-size: 1.25rem; line-height: 1.28; }
.calio-post-grid-title a { color: #0f172a; text-decoration: none; transition: color .2s ease; }
.calio-post-grid-card:hover .calio-post-grid-title a,
.calio-post-grid-card:focus-within .calio-post-grid-title a { color: #2563eb; }
.calio-post-grid-excerpt { color: #475569; font-size: 14px; line-height: 1.7; }
.calio-post-grid-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  width: -moz-fit-content;
  width: fit-content;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.calio-post-grid-button::after { content: '->'; transition: transform .2s ease; }
.calio-post-grid-button:hover,
.calio-post-grid-button:focus-visible { background: #2563eb; color: #fff; }
.calio-post-grid-button:hover::after,
.calio-post-grid-button:focus-visible::after { transform: translateX(-2px); }
.calio-post-grid-button:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; }
.calio-post-grid.skin-editorial .calio-post-grid-card { border-radius: 28px; }
.calio-post-grid.skin-editorial .calio-post-grid-title { font-size: 1.4rem; }
.calio-post-grid.skin-overlay .calio-post-grid-card { position: relative; justify-content: flex-end; background: #0f172a; }
.calio-post-grid.skin-overlay .calio-post-grid-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(-180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.72));
}
.calio-post-grid.skin-overlay .calio-post-grid-content { position: absolute; left: 0; bottom: 0; right: 0; z-index: 1; color: #fff; }
.calio-post-grid.skin-overlay .calio-post-grid-title a,
.calio-post-grid.skin-overlay .calio-post-grid-excerpt,
.calio-post-grid.skin-overlay .calio-post-grid-meta { color: #fff; }
.calio-post-grid.skin-overlay .calio-post-grid-category { background: rgba(255, 255, 255, 0.14); color: #fff; }
.calio-post-grid-empty {
  padding: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 18px;
  color: #64748b;
  text-align: center;
}

.calio-post-grid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.calio-post-grid-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.calio-post-grid-load-more:hover,
.calio-post-grid-load-more:focus-visible {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.calio-post-grid-load-more:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.calio-post-grid-status {
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.calio-post-grid-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calio-post-grid-page-number,
.calio-post-grid-page-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.calio-post-grid-page-number:hover,
.calio-post-grid-page-number:focus-visible,
.calio-post-grid-page-nav:hover,
.calio-post-grid-page-nav:focus-visible {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.1);
}

.calio-post-grid-page-number.is-current,
.calio-post-grid-page-number[aria-current='page'] {
  border-color: rgba(37, 99, 235, 0.18);
  background: #2563eb;
  color: #fff;
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.18);
}

.calio-post-grid-page-nav[disabled] {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.calio-post-grid-page-number:focus-visible,
.calio-post-grid-page-nav:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .calio-post-grid.feature-first .calio-post-grid-card.is-featured {
    grid-column: span 2;
  }

  .calio-post-grid.cols-3,
  .calio-post-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .calio-post-grid,
  .calio-post-grid.cols-2,
  .calio-post-grid.cols-3,
  .calio-post-grid.cols-4 { grid-template-columns: minmax(0, 1fr); }

  .calio-post-grid.feature-first .calio-post-grid-card.is-featured {
    grid-column: auto;
  }

  .calio-post-grid-content { padding: 18px; }

  .calio-post-grid-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .calio-post-grid-pagination {
    justify-content: center;
  }
}

