/* blog-layout.css
   Layout for homepage/blog listing and single banner
*/

/* ==== basics & box-sizing ==== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ==== site banner (background + overlay) ==== */
.site-banner {
  position: relative;
  width: 100%;
  height: clamp(260px, 34vw, 520px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  color: #fff;
}
.site-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
  z-index: 1;
}
.site-banner__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.site-banner--center .site-banner__content {
  text-align: center;
  padding-left: 20px;
  padding-right: 20px;
}
.site-banner__title {
  margin: 0;
  font-size: clamp(24px, 4.2vw, 44px);
  line-height: 1.05;
  font-weight: 700;
}
.site-banner__subtitle {
  margin-top: 10px;
  font-size: clamp(13px, 2vw, 18px);
  color: rgba(255, 255, 255, 0.92);
  max-width: 70ch;
}

/* ==== category pills ==== */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.category-pills .pill {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid #ddd;
  background: #fff;
  color: #222;
  font-size: 0.95rem;
}
/* .category-pills .pill.active {
  background: #111;
  color: #fff;
  border-color: #111;
} */

/* ==== primary two-column layout (#primary contains main + sidebar) ==== */
#primary.content-area {
  display: flex !important;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: nowrap;
}
#primary .site-main {
  flex: 1 1 66.6667%;
  min-width: 0; /* critical */
}
#secondary,
.widget-area,
aside.widget-area {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
}

/* ==== per-post card horizontal layout (image left, content right) ==== */
.ast-row article.post,
.ast-article-inner,
.post-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
  flex-wrap: nowrap;
}
.ast-blog-featured-section,
.post-thumb,
.post-thumb-img-content,
.ast-width-md-6 {
  flex: 0 0 48%;
  max-width: 48%;
  min-width: 0;
}
.post-content,
.ast-width-md-6.post-content {
  flex: 1 1 52%;
  min-width: 0;
}
.post-card img,
.site-banner img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* small screens: stack */
@media (max-width: 900px) {
  #primary.content-area {
    flex-direction: column;
  }
  #primary .site-main,
  #secondary,
  .widget-area {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .ast-blog-featured-section,
  .post-content {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .site-banner {
    height: clamp(220px, 38vw, 380px);
  }
  .site-banner__content {
    padding: 18px;
  }
  .site-banner--left .site-banner__content {
    padding-left: 18px;
  }
}

/* ==== small helper tweaks ==== */
.load-more {
  display: block;
  margin: 20px auto;
  padding: 10px 16px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
}

/* ---------- Layout fix: banner full-width + columns only inside .page-grid ---------- */

/* 1) Ensure #primary is NOT a flex container (undo prior rule) */
#primary.content-area {
  display: block !important; /* remove flex behavior on the primary wrapper */
  width: 100%;
}

/* 2) Make the inner .page-grid the two-column flex container (main + sidebar) */
.page-grid {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: nowrap;
}

/* Make main take 2/3 and sidebar 1/3 */
.page-grid > main.site-main,
.page-grid > main#main {
  flex: 1 1 66.6667%;
  min-width: 0; /* critical to prevent overflow pushing sidebar down */
}
.page-grid > aside#secondary,
.page-grid > .sidebar-col,
.page-grid > .widget-area {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
}

/* 3) Make banner full-bleed (edge-to-edge) even though it's inside #primary */
.site-banner {
  width: 100vw; /* span full viewport width */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw; /* pull it out of centered container */
  margin-right: -50vw;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: clamp(260px, 34vw, 520px);
  z-index: 1;
}

/* Ensure overlay and content inside banner still positioned correctly */
.site-banner__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.site-banner__content {
  position: relative;
  z-index: 2;
}

/* 4) Make sure when banner image is <img> (not background) it behaves similarly */
.site-banner img {
  width: 100vw;
  height: auto;
  display: block;
  object-fit: cover;
  margin-left: calc(-50vw + 50%); /* keep centered if needed */
}

/* 5) Responsive: stack the two columns on narrow screens */
@media (max-width: 900px) {
  .page-grid {
    flex-direction: column;
  }
  .page-grid > main.site-main,
  .page-grid > aside#secondary,
  .page-grid > .widget-area {
    flex: 1 1 100%;
    max-width: 100%;
  }
  /* banner becomes normal width on small screens so it doesn't overflow horizontally */
  .site-banner,
  .site-banner img {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    left: auto;
    right: auto;
  }
}
.site-banner--left {
  text-align: center;
  color: white;
}
.site-banner__content .site-banner__title {
  color: white;
}
.category-pills .pill.active {
  background: #223c81;
  color: #fff;
  border-color: #f0f5fa;
}
.category-pills .pill {
  border-radius: 15px !important;
}

.category-pills .pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  color: #222;
  text-decoration: none;
  display: inline-block;
  margin-right: 8px;
}
/* .category-pills .pill.active {
  background: #111;
  color: #fff;
  border-color: #111;
} */
.ajax-loading {
  color: #666;
  padding: 24px 0;
  text-align: left;
}

/*new css*/
/* blog-layout.css - layout & banner styles for home.php */

/* layout container */
.container.blog-list-container-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* banner */
.site-banner {
  position: relative;
  width: 100%;
  height: clamp(260px, 34vw, 520px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  color: #fff;
}
.site-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
  z-index: 1;
}
.site-banner__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}
.site-banner--left .site-banner__content {
  text-align: left;
  padding-left: 32px;
}
.site-banner__title {
  margin: 0;
  font-size: clamp(24px, 4.2vw, 44px);
  line-height: 1.05;
  font-weight: 700;
}
.site-banner__subtitle {
  margin-top: 10px;
  font-size: clamp(13px, 2vw, 18px);
  color: rgba(255, 255, 255, 0.92);
  max-width: 70ch;
}

/* pills */

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 18px 0;
  row-gap: 10px;
}
.category-pills .pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  color: #222;
  text-decoration: none;
  display: inline-block;
}
.category-pills .pill:hover {
  background: #f5f5f5;
}
/* .category-pills .pill.active {
  background: #111;
  color: #fff;
  border-color: #111;
} */

/* page grid (main + sidebar) */
.page-grid {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: nowrap;
}
.page-grid > main.site-main {
  flex: 1 1 66.6667%;
  min-width: 0;
}
.page-grid > aside.widget-area,
.page-grid > #secondary {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
}

/* per-post card */
.post-card {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #eee;
  align-items: flex-start;
}
.post-thumb-link {
  flex: 0 0 160px;
  max-width: 160px;
  display: block;
}
.post-thumb-link img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.post-body {
  flex: 1 1 calc(100% - 160px);
  min-width: 0;
}
.cat-links {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.entry-title {
  margin: 0 0 8px 0;
}
.meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.excerpt {
  color: #333;
}

/* pagination */
.my-pagination {
  margin-top: 20px;
}

/* responsive */
@media (max-width: 900px) {
  .page-grid {
    flex-direction: column;
  }
  .page-grid > main.site-main,
  .page-grid > aside.widget-area {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .site-banner {
    height: clamp(220px, 38vw, 380px);
  }
  .site-banner__content {
    padding: 18px;
  }
  .site-banner--left .site-banner__content {
    padding-left: 18px;
  }
  .post-card {
    flex-direction: column;
  }
  .post-thumb-link {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }
  .post-body {
    flex: 1 1 100%;
  }
}

.post-card {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #eee;
  align-items: stretch; /* make all children full height */
}

.post-thumb-link {
  flex: 0 0 160px; /* fixed width */
  max-width: 160px;
  display: flex;
  align-items: stretch; /* wrapper fills card height */
}

.post-thumb-link img {
  width: 100%;
  height: 100%; /* fill parent height */
  object-fit: cover; /* crop neatly */
  display: block;
}
.post-thumb-link {
  flex: 0 0 160px;
  aspect-ratio: 2.5 / 3.5; /* or whatever you like */
  overflow: hidden;
}
.post-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-body {
  padding-top: 15px;
  padding-bottom: 10px;
  padding-right: 5px;
  padding-left: 10px;
}

/*blog details page*/
/* single.php layout (uses the same page-grid) */
/* SINGLE POST PAGE ONLY */
body.single-post .single-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

body.single-post .single-page-grid {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: nowrap;
}

body.single-post .single-page-grid > main.site-main {
  flex: 1 1 66.6667%;
  min-width: 0;
}

body.single-post .single-page-grid > aside.widget-area,
body.single-post .single-page-grid > #secondary {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
}

/* single content */
body.single-post .single-post .single-meta {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

body.single-post .single-content {
  line-height: 1.7;
  color: #222;
}

body.single-post .single-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* sidebar widgets */
body.single-post .widget {
  margin-bottom: 24px;
  background: #fff;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 6px;
}

body.single-post .widget .widget-title {
  margin: 0 0 12px 0;
  font-weight: 700;
  font-size: 1.05rem;
}

body.single-post .related-list,
body.single-post .trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.single-post .related-list li,
body.single-post .trending-list li {
  margin-bottom: 8px;
}

body.single-post .related-list li a,
body.single-post .trending-list li a {
  color: #222;
  text-decoration: none;
}

body.single-post .related-list li a:hover,
body.single-post .trending-list li a:hover {
  color: #0073aa;
}

/* responsive */
@media (max-width: 900px) {
  body.single-post .single-page-grid {
    flex-direction: column;
  }
  body.single-post .single-page-grid > main.site-main,
  body.single-post .single-page-grid > aside.widget-area {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.category-pills .pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid #ddd;
  background: white;
  color: #223c81;
  text-decoration: none;
  display: inline-block;
  border-radius: 10px !important;
  border: none;
  box-shadow: 0.5px 0.5px 0.5px 0.8px #85818129;
  border-radius: 10px !important;
}
.category-pills .pill:hover {
  background: #f6f6f6;
  /* color: black; */
}
.category-pills .pill.active {
  /* background: #111; */
  /* color: #fff; */
  /* border-color: #111; */
}
.category-pills .pill.active:hover {
  background: #223c81;
  color: #fff;
  border-color: #f0f5fa;
}

.cat-links a.cat-pill {
  background: aliceblue;
  padding: 4px 8px;
  margin-right: 6px;
  border-radius: 5px;
  color: black;
  font-weight: 500;
  text-decoration: none;
  font-size: 12.1px;
}

.cat-links a.cat-pill:hover {
  background: #0073aa; /* Astra blue */
  color: #fff;
}
/* .cat-links a.cat-pill:hover {
  background: #076b97;
  color: white;
} */

.meta {
  color: #666;
  font-size: 0.8rem;
  margin-bottom: 5px;
}

/* breadcrumb thin strip — overlap variant */
.nw-breadcrumb-strip {
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  padding: 6px 16px;
  box-sizing: border-box;
  font-size: 13px;
  z-index: 20;
  color: #33475b;
}

/* make it overlap the hero bottom when parent provides negative margin */
.nw-breadcrumb-strip.overlap {
  max-width: calc(100% - 40px);
  margin: 0 auto;
  margin-top: -20px; /* tweak -18 to -26px depending on your hero */
  border-radius: 10px;
  padding: 8px 18px;
  box-shadow: 0 10px 30px rgba(16, 40, 80, 0.06);
}

/* inner container (use your site container width if available) */
.nw-breadcrumb-strip .nw-breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* links & separators */
.nw-breadcrumb-strip a {
  color: #0b63e6;
  font-weight: 600;
  text-decoration: none;
}
.nw-breadcrumb-strip .sep {
  color: #98a6b3;
  margin: 0 6px;
}

/* responsive: remove overlap on small screens */
@media (max-width: 720px) {
  .nw-breadcrumb-strip.overlap {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 8px 12px;
  }
}
@media (max-width: 767px) {
  .category-pills {
    margin-top: 0px;
  }
  .footer {
    padding-top: 30px;
  }
  .footer .quick-address span {
    font-size: 14px;

    margin-bottom: 2px;
  }
  .ast-pagination {
    padding-top: 1em;
  }
  .ast-row article.post,
  .ast-article-inner {
    flex-direction: column;
  }
  .blog-list-container-page .page-grid {
    gap: 0px;
  }
  body.single-post .toc-column {
    position: static;
  }
  .category-pills {
    z-index: 9;
  }
}

/* Tablet view only: between 768px and 991px */
@media (min-width: 768px) and (max-width: 1024px) {
  .page-grid {
    display: grid !important; /* force grid layout */
    grid-template-columns: 1fr 0.6fr; /* main wider, sidebar narrower */
    gap: 20px; /* space between columns */
    align-items: start;
    padding-bottom: 7%;
  }
  .ct-title {
    font-size: 12px;
  }
  .category-pills {
    z-index: 9;
  }
  .category-pills .pill {
    padding: 4px 12px;

    font-size: 12px;
  }
  .post-thumb-link {
    min-width: auto;
  }
  .excerpt {
    font-size: 14px;
  }
  aside#secondary {
    width: 100%;
  }
  .post-thumb-link {
    max-width: 100%;
  }
  aside#secondary {
    max-width: 100% !important;
    width: -webkit-fill-available;
  }
  .blog-list-container-page .post-card.ast-row article.post,
  .ast-article-inner {
    flex-direction: row !important;
  }
  .blog-list-container-page .post-card.ast-row article.post,
  .ast-article-inner.post-card {
    flex-direction: row !important;
  }
  .post-card {
    flex-direction: row !important;
  }
  .post-thumb-link {
    height: -webkit-fill-available;
  }
}
.meta a.author-link {
  color: #666;
  text-decoration: none;
}

.meta a.author-link:hover {
  color: #189dd8;
}
