/* =====================================
   CBW ALL BLOGS PAGE
===================================== */

:root {
  --cbw-yellow: #ffcd29;
  --cbw-yellow-dark: #e9b700;
  --cbw-black: #111111;
  --cbw-dark: #1b1b1b;
  --cbw-text: #444444;
  --cbw-light: #f8f9fb;
  --cbw-border: #e7e7e7;
  --cbw-white: #ffffff;
  --cbw-shadow: 0 14px 40px rgba(0,0,0,0.07);
  --cbw-radius: 18px;
}

/* =========================
   ASTRA RESET + TOP GAP FIX
========================= */
.cbw-all-blogs-template .site-content,
.cbw-all-blogs-template .ast-container,
.cbw-all-blogs-template .ast-article-single,
.cbw-all-blogs-template .ast-article-post,
.cbw-all-blogs-template .entry-content,
.cbw-all-blogs-template .site-main,
.cbw-all-blogs-template .content-area,
.cbw-all-blogs-template .site-primary-footer-wrap,
.cbw-all-blogs-template .ast-builder-layout-element {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.cbw-all-blogs-template .ast-container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.cbw-all-blogs-template .entry-content > .cbw-blogs-page:first-child {
  margin-top: 0 !important;
}

/* =========================
   PAGE WRAPPER
========================= */
.cbw-blogs-page {
  background: #ffffff;
  color: var(--cbw-black);
  font-family: 'Poppins', sans-serif;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.cbw-blogs-page *,
.cbw-blogs-page *::before,
.cbw-blogs-page *::after {
  box-sizing: border-box;
}

.cbw-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto !important;
  padding: 0 20px;
}

/* =========================
   TYPOGRAPHY / COMMON
========================= */
.cbw-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cbw-yellow-dark);
}

.cbw-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  margin: 0 0 24px !important;
  font-size: 14px;
  font-weight: 500;
  color: #666666;
}

.cbw-breadcrumb a {
  color: #666666;
  text-decoration: none;
}

.cbw-breadcrumb a:hover {
  color: var(--cbw-black);
}

.cbw-breadcrumb span {
  color: #999999;
}

/* =========================
   HERO
========================= */
.cbw-blogs-hero {
  position: relative;
  overflow: hidden;
  margin-top: 0 !important;
  padding: 72px 0 56px;
  background:
		radial-gradient(circle at top right, rgba(255, 205, 41, 0.18), transparent 32%),
		linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  border-bottom: 1px solid var(--cbw-border);
}

.cbw-blogs-hero__content {
  max-width: 860px;
}

.cbw-blogs-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cbw-black);
}

.cbw-blogs-hero p {
  margin: 0;
  max-width: 780px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--cbw-text);
}

.cbw-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.cbw-meta-box {
  background: rgba(255,255,255,0.84);
  border: 1px solid var(--cbw-border);
  border-radius: 16px;
  padding: 18px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  min-width: 0;
}

.cbw-meta-box strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  line-height: 1.2;
  color: var(--cbw-black);
}

.cbw-meta-box span {
  display: block;
  font-size: 14px;
  color: var(--cbw-text);
}

/* =========================
   TOOLBAR
========================= */
.cbw-blogs-toolbar {
  padding: 24px 0;
  background: var(--cbw-white);
  border-bottom: 1px solid var(--cbw-border);
}

.cbw-blogs-toolbar__wrap {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}

.cbw-toolbar-intro {
  min-width: 0;
}

.cbw-toolbar-intro h2 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.2;
  color: var(--cbw-black);
}

.cbw-toolbar-intro p {
  margin: 0;
  font-size: 15px;
  color: var(--cbw-text);
}

.cbw-blog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 440px;
  width: 100%;
  min-width: 0;
}

.cbw-blog-search input[type="search"] {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--cbw-border);
  border-radius: 12px;
  background: #fff;
  color: var(--cbw-black);
  font-size: 14px;
  outline: none;
}

.cbw-blog-search input[type="search"]:focus {
  border-color: var(--cbw-yellow);
  box-shadow: 0 0 0 4px rgba(255,205,41,0.16);
}

.cbw-blog-search button {
  min-height: 50px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--cbw-yellow);
  color: var(--cbw-black);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s ease;
  flex-shrink: 0;
}

.cbw-blog-search button:hover {
  background: var(--cbw-yellow-dark);
}

/* =========================
   MAIN LAYOUT
========================= */
.cbw-blogs-layout {
  padding: 40px 0 80px;
  background: #ffffff;
}

.cbw-blogs-layout__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
  min-width: 0;
}

.cbw-blogs-main {
  min-width: 0;
}

.cbw-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  min-width: 0;
}

/* =========================
   BLOG CARD
========================= */
.cbw-blog-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: 100%;
  background: #ffffff;
  border: 1px solid var(--cbw-border);
  border-radius: var(--cbw-radius);
  overflow: hidden;
  box-shadow: var(--cbw-shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.cbw-blog-card:hover {
  transform: translateY(-6px);
  border-color: #d8d8d8;
  box-shadow: 0 18px 46px rgba(0,0,0,0.1);
}

/* =========================
   IMAGE FIX
========================= */
.cbw-blog-card__thumb {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  height: 240px;
  min-height: 240px;
  background: #f3f3f3;
  border-bottom: 1px solid var(--cbw-border);
  flex-shrink: 0;
}

.cbw-blog-card__thumb img,
.cbw-blog-card__thumb .cbw-force-img {
  display: block;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  margin: 0 !important;
  border: 0 !important;
  transform: none !important;
  position: absolute;
  inset: 0;
}

.cbw-blog-card__placeholder {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255,205,41,0.18), rgba(255,255,255,1)),
    #fafafa;
  color: var(--cbw-black);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

/* =========================
   CARD CONTENT
========================= */
.cbw-blog-card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 20px;
}

.cbw-blog-card__top {
  margin-bottom: 14px;
  min-width: 0;
}

.cbw-blog-card__cat {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(255,205,41,0.17);
  color: var(--cbw-black);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  max-width: 100%;
}

.cbw-blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #6c6c6c;
  min-width: 0;
}

.cbw-blog-card__title {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.28;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cbw-blog-card__title a {
  color: var(--cbw-black);
  text-decoration: none;
}

.cbw-blog-card__title a:hover {
  color: #000000;
}

.cbw-blog-card__excerpt {
  margin: 0 0 18px;
  color: var(--cbw-text);
  font-size: 15px;
  line-height: 1.8;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cbw-blog-card__bottom {
  margin-top: auto;
  min-width: 0;
}

.cbw-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cbw-black);
  text-decoration: none;
}

.cbw-read-more:hover {
  color: #000;
}

/* =========================
   SIDEBAR
========================= */
.cbw-blogs-sidebar {
  position: sticky;
  top: 30px;
  min-width: 0;
}

.cbw-sidebar-card {
  background: #ffffff;
  border: 1px solid var(--cbw-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--cbw-shadow);
  margin-bottom: 22px;
  min-width: 0;
}

.cbw-sidebar-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.25;
  color: var(--cbw-black);
}

.cbw-sidebar-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--cbw-text);
}

.cbw-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cbw-cat-list li + li {
  margin-top: 10px;
}

.cbw-cat-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid var(--cbw-border);
  color: var(--cbw-black);
  text-decoration: none;
  transition: 0.25s ease;
  min-width: 0;
}

.cbw-cat-list a:hover {
  background: #fff9df;
  border-color: #f0d46d;
}

.cbw-cat-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cbw-cat-list strong {
  font-size: 13px;
  min-width: 28px;
  text-align: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--cbw-yellow);
  color: var(--cbw-black);
  flex-shrink: 0;
}

/* =========================
   PAGINATION
========================= */
.cbw-pagination {
  margin-top: 38px;
}

.cbw-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cbw-pagination a,
.cbw-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--cbw-border);
  background: #ffffff;
  color: var(--cbw-black);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.cbw-pagination .current {
  background: var(--cbw-yellow);
  border-color: var(--cbw-yellow);
}

/* =========================
   EMPTY STATE
========================= */
.cbw-no-posts {
  padding: 40px 24px;
  border: 1px solid var(--cbw-border);
  border-radius: 18px;
  background: #fafafa;
}

.cbw-no-posts h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.cbw-no-posts p {
  margin: 0;
  font-size: 15px;
  color: var(--cbw-text);
}

/* =========================
   ACCESSIBILITY
========================= */
.screen-reader-text {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1180px) {
  .cbw-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cbw-blogs-layout__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cbw-blogs-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .cbw-hero-meta {
    grid-template-columns: 1fr;
  }

  .cbw-blogs-toolbar__wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .cbw-blog-search {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .cbw-blogs-hero {
    padding: 56px 0 42px;
  }

  .cbw-blogs-hero h1 {
    font-size: 34px;
  }

  .cbw-toolbar-intro h2 {
    font-size: 24px;
  }

  .cbw-blog-grid {
    grid-template-columns: 1fr;
  }

  .cbw-blog-card__title {
    font-size: 20px;
  }

  .cbw-blog-search {
    flex-direction: column;
  }

  .cbw-blog-search button,
  .cbw-blog-search input[type="search"] {
    width: 100%;
  }

  .cbw-blog-card__thumb {
    height: 220px;
    min-height: 220px;
  }
}
/* =========================
   FINAL REAL FIX (PADDING ISSUE)
========================= */

/* remove broken padding */
.cbw-blog-card {
  padding: 0 !important;
}

/* add safe spacing inside content instead */
.cbw-blog-card__content {
  padding: 20px !important;
}

.cbw-blog-card__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;  /* FULL IMAGE SHOW */
  background: #f3f3f3;             /* empty space clean lage */
}
