/* ==========================================================================
   OpenPropert Blog Grid — blog-grid.css
   ========================================================================== */

/* ── Wrapper ── */
.obg-wrapper {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Grid ── */
.obg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  min-height: 200px;
  transition: opacity 0.25s ease;
}

.obg-grid.obg-loading {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Card ── */
.obg-card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.obg-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

/* Thumbnail */
.obg-card__thumb-link {
  display: block;
  overflow: hidden;
}

.obg-card__thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #f0f0f0;
}

.obg-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.obg-card:hover .obg-card__thumb img {
  transform: scale(1.04);
}

/* Body */
.obg-card__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Meta row */
.obg-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}

.obg-card__date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.obg-card__date svg,
.obg-card__category svg {
  flex-shrink: 0;
  color: #aaa;
}

.obg-card__sep {
  color: #ccc;
}

.obg-card__category {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.obg-card__category:hover {
  color: #1d4ed8;
}

/* Title */
.obg-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
  color: #111;
}

.obg-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.obg-card__title a:hover {
  color: var(--black);
}

/* Excerpt */
.obg-card__excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: var(--black); /* matches screenshot's colored excerpt style */
  margin: 0 0 14px;
  flex: 1;
}

/* Read more */
.obg-card__read-more {
  display: inline-block;
  font-size: 13px;
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
  margin-top: auto;
  transition: color 0.15s;
}

.obg-card__read-more:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* No-thumb variant: slightly different body padding */
.obg-card--no-thumb .obg-card__body {
  padding-top: 20px;
}

/* ── Loading spinner ── */
.obg-spinner {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.obg-spinner.obg-spinner--active {
  display: flex;
}

.obg-spinner__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--black);
  margin: 0 4px;
  animation: obg-bounce 0.7s ease-in-out infinite;
}

.obg-spinner__dot:nth-child(2) { animation-delay: 0.15s; }
.obg-spinner__dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes obg-bounce {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50%       { transform: translateY(-8px); opacity: 1; }
}

/* ── Pagination ── */
.obg-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 40px;
  padding-bottom: 16px;
}

.obg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-family: inherit;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1;
}

.obg-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.obg-btn--active {
  background: var(--black);
  border-color: var(--black);
  color: #fff;
  font-weight: 700;
}

.obg-btn--active:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

.obg-btn--disabled,
.obg-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.obg-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 38px;
  color: #9ca3af;
  font-size: 14px;
}

/* No posts */
.obg-no-posts {
  grid-column: 1 / -1;
  text-align: center;
  color: #6b7280;
  padding: 48px 0;
  font-size: 15px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .obg-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .obg-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .obg-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .obg-card__title {
    font-size: 16px;
  }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  .obg-card,
  .obg-card__thumb img,
  .obg-btn,
  .obg-grid {
    transition: none;
  }
  .obg-spinner__dot {
    animation: none;
  }
}


/* ── Category archive page ── */
.obg-category-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px 60px;
}

.obg-category-header {
    padding: 40px 0 32px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 36px;
}

.obg-category-header__inner {
    max-width: 600px;
}

.obg-category-header__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--black);
    margin: 0 0 6px;
}

.obg-category-header__title {
    font-size: 32px;
    font-weight: 800;
    color: #111;
    margin: 0 0 10px;
    line-height: 1.2;
}

.obg-category-header__desc {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Remove double max-width when grid sits inside category body */
.obg-category-body .obg-wrapper {
    max-width: 100%;
    padding: 0;
}