
/* ---------- Main layout ---------- */
.main-grid{
  display:grid;
  grid-template-columns: 1fr 340px;
  gap:calc(var(--gap) * 1.2);
  align-items:start;
  margin-top:calc(var(--gap) * 1.25);
}
@media (max-width: 1000px){
  .main-grid{ grid-template-columns:1fr; }
  .sidebar{ order:2; }
}

/* ---------- Post list (cards for premium) ---------- */
.archive-grid, .featured-grid {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:1.15rem;
}
@media (max-width:1100px){ .archive-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width:700px){ .archive-grid{ grid-template-columns: 1fr; } }

/* Article card (used on homepage / archive grid & related) */
.post.card, .related-card, .card {
  background:var(--color-surface);
  border:1px solid var(--muted-border);
  border-radius:var(--radius-md);
  overflow:hidden;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: var(--card-shadow);
  display:flex;
  flex-direction:column;
  min-height:220px;
}
.post.card:hover, .related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(11,20,40,0.08);
}

/* Thumbnail */
.post.card .post-thumb,
.related-card .related-thumb,
.card-thumb { display:block; }
.post.card .post-thumb img,
.related-card .related-thumb img,
.card-thumb img { width:100%; height:auto; display:block; }

/* Card body */
.post.card .card-body,
.related-card .related-body,
.card-body { padding:14px; display:flex; flex-direction:column; gap:10px; flex:1; }
.card-title, .related-title, .post.card .post-title { font-family:var(--font-head); font-weight:700; color:var(--color-text); margin:0; font-size:1.05rem; line-height:1.2; }
.card-meta, .related-meta, .post-meta { color:var(--color-muted); font-size:0.9rem; }

/* Excerpt */
.card-excerpt, .post.card .excerpt, .related-card .related-excerpt { color:var(--color-muted); font-size:0.95rem; line-height:1.5; }

/* List view (for archive-list) */
.list-item {
  display:flex;
  gap:1rem;
  padding:18px 0;
  border-bottom:1px solid var(--muted-border);
}
.list-left { flex:0 0 150px; }
.list-left img{ width:150px; height:auto; border-radius:8px; }
.list-right{ flex:1 1 auto; min-width:0; }

/* ---------- Single post ---------- */
.entry-header { margin-bottom:18px; }
.post-title { font-family:var(--font-head); font-weight:900; font-size:2.2rem; margin:0 0 8px; line-height:1.1; }
.entry-content { font-size:1rem; color:var(--color-text); line-height:1.8; }
.post-featured-image { border-radius:10px; overflow:hidden; margin-bottom:18px; }

/* Content ad wrapper */
.content-ad-wrap { margin:24px 0; padding:18px; border-radius:10px; background:linear-gradient(180deg, rgba(250,250,250,0.6), transparent); border:1px dashed rgba(0,0,0,0.04); }

/* ---------- Sidebar (premium card widgets) ---------- */
.sidebar .widget {
  background:#ffffff;
  padding:14px;
  border-radius:10px;
  border:1px solid var(--muted-border);
  box-shadow: var(--card-shadow);
  margin-bottom:calc(var(--gap) * 0.8);
}
.widget-title { font-weight:700; margin:0 0 10px; font-size:1.05rem; color:var(--color-text); }
.recent-posts .post-thumb img { width:100%; height:auto; display:block; border-radius:8px; }
.recent-posts .item { display:flex; gap:10px; align-items:center; margin-bottom:10px; }
.recent-posts .item .title { font-size:0.95rem; color:var(--color-accent); font-weight:700; }

/* ---------- Author box ---------- */
.author-box {
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding:14px;
  border-radius:10px;
  background:linear-gradient(180deg, rgba(255,255,255,0.6), transparent);
  border:1px solid var(--muted-border);
  margin-bottom:16px;
}
.author-avatar img { width:92px; height:92px; border-radius:999px; display:block; }
.author-meta { flex:1; min-width:0; }
.author-name{ font-weight:800; margin:0 0 6px; font-family:var(--font-head); color:var(--color-text); }

/* ---------- Footer ---------- */
/* ---------- Footer: clean responsive layout ---------- */

/* Full-width background wrapper so footer spans edge-to-edge */
.footer-wrap {
  width: 100%;
  background: #000; /* default black background */
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* Container holds centered content */
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 30px calc(var(--gap) * 1.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Left: footer nav (links) */
.footer-left { flex: 1 1 60%; }
.footer-left .footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-left .footer-menu li { margin: 0; }
.footer-left .footer-menu a {
  color: #fff;
  text-decoration: none;
  opacity: 0.95;
  transition: color .12s ease, opacity .12s ease;
  font-weight: 600;
}
.footer-left .footer-menu a:hover,
.footer-left .footer-menu a:focus {
  color: var(--color-accent, #0b76ef);
  opacity: 1;
}

/* Right: copyright */
.footer-right { flex: 0 0 auto; text-align: right; min-width: 200px; }
.footer-copy { margin: 0; color: rgba(255,255,255,0.88); font-size: 14px; }

/* Small screens: stack items and center */
@media (max-width: 900px) {
  .footer-inner {
    display: block;
    text-align: center;
    padding: 26px calc(var(--gap) * 0.9);
  }
  .footer-left { margin-bottom: 14px; }
  .footer-left .footer-menu { justify-content: center; gap: 12px; }
  .footer-right { text-align: center; min-width: 0; }
}

/* Optional: light footer variant (use class .site-footer.is-light) */
.site-footer.is-light .footer-wrap { background: var(--color-surface, #f8fafc); color: var(--color-text, #0f1724); border-top-color: rgba(15,23,36,0.06); }
.site-footer.is-light .footer-left .footer-menu a { color: var(--color-text, #0f1724); }
.site-footer.is-light .footer-copy { color: rgba(15,23,36,0.7); }

/* Fix for stray bottom margin from previous content (common cause of gap) */
.entry-content,
.main-grid,
.container {
  margin-bottom: 0; /* keep footer flush if content had large bottom margin */
}

/* ---------- Buttons & UI ---------- */
.button, button, .btn {
  display:inline-block;
  padding:8px 14px;
  border-radius:8px;
  background:var(--color-accent);
  color:#fff;
  text-decoration:none;
  font-weight:700;
  border:0;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.button:hover{ transform:translateY(-3px); box-shadow:0 14px 30px rgba(43,110,253,0.14); }

/* ---------- Utility ---------- */
a{ color:var(--color-accent); }
img{ max-width:100%; height:auto; display:block; }

/* Accessibility: focus outlines */
a:focus, button:focus, .primary-nav .menu a:focus { outline:3px solid rgba(43,110,253,0.12); outline-offset:3px; }

/* Small devices */
@media(max-width:700px){
  .header-top{ display:flex; align-items:center; justify-content:space-between; padding:12px; min-height:auto; }
  .header-right { justify-self:end; }
  .primary-nav { display:none; } /* mobile menu needed */
  .category-menu { gap:.5rem; }
  .post-title { font-size:1.6rem; }
}


/* ---------- Related — small card style ---------- */
.related-posts { margin-top: 36px; }
.related-posts > h3 { margin: 0 0 14px 0; font-family: var(--font-head); font-weight:800; font-size:1.2rem; }

/* Compact grid — horizontal small cards */
.related-small-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}

/* Individual small card */
.related-small-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--color-surface);
  border: 1px solid var(--muted-border);
  border-radius: 10px;
  transition: transform .12s ease, box-shadow .12s ease;
  min-height: 84px;
  overflow: hidden;
}
.related-small-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(11,20,40,0.06);
}

.related-small-thumb {
  flex: 0 0 auto;
  width: 120px;
  height: 84px;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0.02));
}
.related-small-thumb img { width: 100%; height: 100%; object-fit: cover; display:block; }

/* Title & meta */
.related-small-body { flex: 1 1 auto; min-width: 0; display:flex; flex-direction:column; gap:6px; }
.related-small-title {
  font-family: var(--font-head);
  font-weight:700;
  color: var(--color-text);
  text-decoration: none;
  display: block;
  font-size: 0.98rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-small-title:hover { color: var(--color-accent); text-decoration: underline; }

.related-small-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Responsive: reduce columns on small screens */
@media (max-width: 1000px){
  .related-small-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px){
  .related-small-grid { grid-template-columns: 1fr; }
  .related-small-card { padding: 12px; }
  .related-small-thumb { width: 110px; height: 66px; }
  .related-small-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}


/* ------------------------------------------
   PREMIUM ARCHIVE PAGE STYLES
---------------------------------------------*/

/* Title */
.premium-archive-title {
    font-family: var(--font-head);
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0 0 6px;
    color: var(--color-text);
}

/* Description */
.premium-archive-desc {
    margin-top: 4px;
    color: var(--color-muted);
}

/* Top bar layout */
.premium-archive-top {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* CATEGORY CHIP FILTER */
.premium-cat-filter ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    list-style: none;
    margin: 0;
}

.cat-chip {
    padding: 6px 14px;
    background: rgba(20,30,45,0.06);
    font-size: 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--color-text);
    transition: .2s;
}

.cat-chip:hover,
.cat-chip.active {
    background: var(--color-accent);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(43,110,253,0.2);
}

/* VIEW TOGGLE */
.premium-view-toggle {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    padding: 6px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    background: rgba(20,20,20,0.06);
    color: var(--color-text);
    transition: .2s;
}

.toggle-btn.active,
.toggle-btn:hover {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(43,110,253,0.25);
}

/* GRID VIEW */
.premium-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
}

@media (max-width: 900px){
    .premium-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 600px){
    .premium-grid { grid-template-columns: 1fr; }
}

.premium-card {
    background: var(--color-surface);
    border: 1px solid var(--muted-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition:.25s;
}

.premium-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(11,20,40,0.1);
}

.premium-card .thumb-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

.card-body {
    padding: 16px;
}

.card-title a {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 800;
}

.card-title a:hover { color: var(--color-accent); }

.card-meta {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: 4px;
}

.card-excerpt {
    margin-top: 10px;
    color: var(--color-muted);
}

/* LIST VIEW */
/* ---------------------------
   Premium List - modern / compact
   Replace previous .premium-list rules with this block
   --------------------------- */

.premium-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Each list item becomes a subtle card */
.premium-list-item {
  display: flex;
  gap: 18px;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,250,0.96));
  border: 1px solid var(--muted-border);
  box-shadow: 0 8px 20px rgba(11,20,40,0.04);
  transition: transform .18s ease, box-shadow .18s ease;
  align-items: flex-start;
}

/* Hover lifts the card and increases shadow */
.premium-list-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(11,20,40,0.10);
}

/* thumbnail area (left) */
.list-thumb {
  flex: 0 0 120px;
  width: 120px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0.02));
  box-shadow: inset 0 -6px 18px rgba(0,0,0,0.02);
  display: block;
}
.list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

/* content area (right) */
.list-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* title */
.list-title {
  margin: 0;
  line-height: 1.12;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.25rem;
}
.list-title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color .12s ease;
}
.list-title a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* meta (date / author) */
.list-meta {
  color: var(--color-muted);
  font-size: 0.88rem;
  display: block;
  margin-top: 2px;
}

/* excerpt: 2 lines clamp, subtle color */
.list-excerpt {
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 0.975rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;     /* show 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* small CTA or meta row (optional) — right aligned */
.list-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* subtle divider for long lists */
.premium-list-item + .premium-list-item {
  /* small spacing handled by gap; optional extra border removed for modern look */
}

/* Responsiveness */
@media (max-width: 900px) {
  .premium-list-item {
    padding: 14px;
    gap: 12px;
  }
  .list-thumb {
    flex: 0 0 100px;
    width: 100px;
    height: 72px;
  }
  .list-title { font-size: 1.1rem; }
}
@media (max-width: 600px) {
  .premium-list-item {
    flex-direction: row;
    gap: 12px;
  }
  .list-thumb {
    flex: 0 0 84px;
    width: 84px;
    height: 64px;
  }
  .list-title { font-size: 1rem; }
  .list-excerpt { -webkit-line-clamp: 3; } /* allow a bit more on tiny screens */
}

/* Fallback placeholder image if a thumbnail is missing (used in markup when no post thumbnail) */
/* Example usage in template already prints an img tag pointing to a placeholder; keep that file in place. */


/* Pagination */
.premium-pagination {
    margin-top: 30px;
}

/* No posts */
.premium-nopost {
    margin-top: 40px;
    text-align:center;
}

