/* Cogito News Frontend */
.cogito-blog-wrap {
  --c-bg: transparent;
  --c-card-bg: #ffffff;
  --c-border: rgba(0,0,0,.08);
  --c-title: #111;
  --c-text: #333;
  --c-meta: #666;
  --c-accent: #0073aa;
  --c-btn-bg: #111;
  --c-btn: #fff;
  --c-btn-bg-h: #333;
  --c-btn-h: #fff;
  --c-gap: 20px;
  --c-radius: 16px;
  --c-cols-d: 3;
  --c-cols-t: 2;
  --c-cols-m: 1;

  background: var(--c-bg);
}

.cogito-blog-wrap .cogito-grid {
  display: grid;
  gap: var(--c-gap);
  grid-template-columns: repeat(var(--c-cols-d), 1fr);
}
@media (max-width: 1024px) {
  .cogito-blog-wrap .cogito-grid { grid-template-columns: repeat(var(--c-cols-t), 1fr); }
}
@media (max-width: 767px) {
  .cogito-blog-wrap .cogito-grid { grid-template-columns: repeat(var(--c-cols-m), 1fr); }
}

.cogito-card {
  display: flex;
  flex-direction: column;
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--c-radius);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cogito-card:hover { transform: translateY(-3px); }

.cogito-card .cogito-thumb img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 16/9; object-fit: cover;
}
.cogito-card .cogito-card-body { padding: 16px; }

.cogito-meta { color: var(--c-meta); font-size: 13px; margin-bottom: 8px; display: flex; align-items:center; gap:8px; }
.cogito-meta .cogito-sep { opacity: .5; }

.cogito-title { margin: 0 0 8px 0; font-size: 20px; line-height: 1.3; color: var(--c-title); }
.cogito-title a { color: inherit; text-decoration: none; }
.cogito-title a:hover { color: var(--c-accent); }

.cogito-excerpt { color: var(--c-text); margin-bottom: 12px; }

.cogito-readmore { display:inline-block; text-decoration:none; font-weight:600; color: var(--c-accent); }

.cogito-loadmore-wrap { display:flex; justify-content:center; margin-top:20px; }
.cogito-load-more {
  appearance:none; border:0; cursor:pointer;
  background: var(--c-btn-bg); color: var(--c-btn);
  border-radius: 999px; padding: 12px 18px; font-weight: 600;
}
.cogito-load-more:hover { background: var(--c-btn-bg-h); color: var(--c-btn-h); }
.cogito-load-more[disabled] { opacity:.6; cursor:not-allowed; }

/* ===== Rows / News List layout ===== */
.cogito-blog-wrap.style-rows .cogito-grid{
  grid-template-columns: 1fr !important;
  gap: var(--rows-gap, 16px);
}
.cogito-blog-wrap.style-rows .cogito-card{
  display: flex; flex-direction: row;
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--c-radius);
  overflow: hidden;
}
.cogito-blog-wrap.style-rows.rows-dividers .cogito-card{
  border: 0; border-bottom: 1px solid var(--c-border);
  border-radius: 0; background: transparent; padding-bottom: 16px;
}
.cogito-blog-wrap.style-rows .cogito-thumb{ flex:0 0 var(--rows-thumb-w, 34%); max-width: var(--rows-thumb-w, 34%); }
.cogito-blog-wrap.style-rows .cogito-thumb img{
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: var(--rows-aspect, 16/9); display:block;
}
.cogito-blog-wrap.style-rows .cogito-card-body{ flex:1; padding:16px 18px; display:flex; flex-direction:column; justify-content:center; }
.cogito-blog-wrap.style-rows .cogito-title{ font-size:22px; margin:0 0 6px; }
.cogito-blog-wrap.style-rows .cogito-excerpt{ margin-bottom:6px; }
.cogito-blog-wrap.style-rows .cogito-meta{ margin-bottom:6px; }

@media (max-width: 767px){
  .cogito-blog-wrap.style-rows .cogito-card{
    flex-direction: column; border-radius: var(--c-radius);
    border: 1px solid var(--c-border);
  }
  .cogito-blog-wrap.style-rows.rows-dividers .cogito-card{
    border: 0; border-bottom: 1px solid var(--c-border); border-radius: 0;
  }
  .cogito-blog-wrap.style-rows .cogito-thumb{ max-width: 100%; flex-basis: auto; }
}
