/* Grid Wrapper */
.gl-wrap {
  --gap: 24px;
}

/* Grid container: flexible column system */
.gl-grid {
  display: grid;
  gap: var(--gap);
  /* Automatically fit as many cards as possible, each min 260px wide */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Default Card (auto span 1) */
.gl-card {
  background: #fff;
  border: 1px solid #e9edf2;
  border-radius: 16px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Hover */
.gl-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Column Presets — only used for large layouts */
@media (min-width: 1200px) {
  .gl-wrap.cols-4 .gl-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gl-wrap.cols-3 .gl-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gl-wrap.cols-2 .gl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet view (≤1024px) — auto 2 per row */
@media (max-width: 1024px) {
  .gl-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Mobile view (≤600px) — single column */
@media (max-width: 600px) {
  .gl-grid {
    grid-template-columns: 1fr;
  }
}

/* Thumbnail */
.custom-grid .gl-thumb img,
.custom-grid .gl-thumb-fallback {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f1f1f1;
  border-top-right-radius: 15px;
  border-top-left-radius: 15px;
}

/* Body */
.custom-grid .gl-body {
  padding: 14px 16px 18px;
}

.custom-grid .gl-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  color:#6ec1e4;
}

.custom-grid .gl-title a {
  color: #6ec1e4;
  text-decoration: none;
}

.custom-grid .gl-title a:hover {
  text-decoration: underline;
}

.custom-grid .gl-sub {
  margin: 0;
  color: #8aa2b5;
  font-size: 14px;
}

/* Pagination */
.gl-pagination {
  margin-top: 28px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.gl-pagination a,
.gl-pagination span {
  display: inline-block;
  min-width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  border: 1px solid #e9edf2;
  border-radius: 10px;
  padding: 0 10px;
  text-decoration: none;
  color: #111;
  font-weight: 600;
  background: #fff;
}

.gl-pagination .current {
  background: #2aa0ff;
  color: #fff;
  border-color: #2aa0ff;
}
 