/* ========================= BLOG SECTION (HOMEPAGE) ========================= */
/* (Keep this section for homepage “Latest Blogs” grid) */
.blog-section {
  padding: 70px 0;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
}

.blog-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 28px;
}

.blog-title {
  font-size: 34px;
  font-weight: 800;
  color: #111;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.blog-subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  max-width: 540px;
  color: rgba(0, 0, 0, .65);
}

.blog-viewall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: #111;
  border: 1px solid rgba(0, 0, 0, .14);
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(6px);
  transition: 0.25s ease;
  text-decoration: none;
}

.blog-viewall:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 154, 58, .6);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
}

.blog-viewall-arrow {
  transition: 0.25s ease;
}

.blog-viewall:hover .blog-viewall-arrow {
  transform: translateX(4px);
}

/* Shared grid/cards (used by homepage + blog pages) */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.blog-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 15px 45px rgba(0, 0, 0, .06);
  transform: translateZ(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 65px rgba(0, 0, 0, .12);
}

.blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-thumb {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: #f1f1f1;
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.45s ease;
  display: block;
  position: relative;
}

.blog-card:hover .blog-thumb img {
  transform: scale(1.08);
}

.blog-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .0) 25%, rgba(0, 0, 0, .35) 100%);
  pointer-events: none;
}

.blog-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #111;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .65);
  backdrop-filter: blur(6px);
  z-index: 2;
}

.badge-gold {
  background: rgba(196, 154, 58, .92);
  color: #111;
}

.badge-pro {
  background: rgba(0, 0, 0, .90);
  color: #fff;
}

.blog-content {
  padding: 18px 18px 16px;
}

.blog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(0, 0, 0, .55);
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-meta-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.blog-meta-dot {
  opacity: 0.4;
}

.blog-card-title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  color: #111;
}

.blog-card-desc {
  margin: 0 0 14px;
  color: rgba(0, 0, 0, .70);
  font-size: 14px;
  line-height: 1.6;
  min-height: 68px;
}

.blog-card-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

/* Default readmore (homepage); blog pages override below */
.blog-readmore {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: #111;
  background: linear-gradient(90deg, rgba(196, 154, 58, .9), rgba(255, 215, 90, .9));
  overflow: hidden;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.blog-readmore::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -120%;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, .9) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  transition: 0.55s ease;
}

.blog-card:hover .blog-readmore::before {
  left: 120%;
}

.blog-card:hover .blog-readmore {
  transform: translateY(-2px);
  filter: drop-shadow(0 12px 24px rgba(196, 154, 58, .3));
}

.blog-readmore-icon {
  font-size: 16px;
  transition: transform 0.25s ease;
}

.blog-card:hover .blog-readmore-icon {
  transform: rotate(-8deg) translateX(2px);
}

/* Responsive (homepage grid + shared cards) */
@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .blog-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-thumb {
    height: 210px;
  }

  .blog-title {
    font-size: 28px;
  }
}

/* ======================= /BLOG SECTION (HOMEPAGE) ======================= */



/* =========================================================
   BLOG PAGES (NEW STRUCTURE)
   /blog/  +  /blog/{category}/  +  /blog/{category}/{post}.html
   Uses: .blog-wrap .blog-hero .blog-cats .pill
         .post-wrap .post .post-hero .related
========================================================= */

/* ---------- LISTING PAGES ---------- */
.blog-wrap {
  padding: 30px 0 70px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
}

.blog-wrap .blog-hero {
  margin: 10px 0 18px;
}

.blog-wrap .blog-hero h1 {
  margin: 0 0 8px;
  font-size: 36px;
  font-weight: 950;
  letter-spacing: -0.6px;
  color: #111;
}

.blog-wrap .blog-hero p {
  margin: 0;
  max-width: 70ch;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(0, 0, 0, .65);
}

/* Category pills */
.blog-wrap .blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 26px;
}

.blog-wrap .blog-cats .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  text-decoration: none;
  color: #111;
  border: 1px solid rgba(0, 0, 0, .14);
  background: rgba(255, 255, 255, .70);
  backdrop-filter: blur(6px);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.blog-wrap .blog-cats .pill:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 154, 58, .65);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .10);
}

.blog-wrap .blog-cats .pill.active {
  border-color: rgba(196, 154, 58, .90);
  background: linear-gradient(90deg, rgba(196, 154, 58, .18), rgba(255, 215, 90, .16));
}

/* Ensure listing grid always correct (avoids global conflicts) */
.blog-wrap .blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Make cards aligned + button at bottom */
.blog-wrap .blog-card,
.post-wrap .blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-wrap .blog-card-link,
.post-wrap .blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Product-style thumbs (avoid image overlay + keep centered) */
.blog-wrap .blog-thumb {
  height: 230px;
  background: #f3f3f3;
}

.blog-wrap .blog-thumb::after {
  display: none;
  /* no dark overlay on product cutouts */
}

.blog-wrap .blog-thumb img {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  padding: 18px !important;
  transform: none !important;
  margin: 0 !important;
}

/* Keep badge top-left always (prevents it appearing centered) */
.blog-wrap .blog-badge,
.post-wrap .blog-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}

/* Content spacing + safe wrapping */
.blog-wrap .blog-content,
.post-wrap .blog-content {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-wrap .blog-card-title,
.post-wrap .blog-card-title,
.blog-wrap .blog-card-desc,
.post-wrap .blog-card-desc {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Clamp to avoid “overlapping / breaking” */
.blog-wrap .blog-card-title,
.post-wrap .blog-card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.blog-wrap .blog-card-desc,
.post-wrap .blog-card-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  flex: 1;
}

/* Footer stays at bottom */
.blog-wrap .blog-card-footer,
.post-wrap .blog-card-footer {
  margin-top: auto;
  padding-top: 10px;
}

/* Animated Read More (applies to listing + related cards on post page) */
.blog-wrap .blog-readmore,
.post-wrap .blog-readmore {
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .2px;
  color: #111;
  background: linear-gradient(90deg, rgba(196, 154, 58, .92), rgba(255, 215, 90, .92));
  border: 1px solid rgba(0, 0, 0, .08);
  text-decoration: none;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.blog-wrap .blog-readmore::before,
.post-wrap .blog-readmore::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -140%;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, .85) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  transition: .55s ease;
}

.blog-wrap .blog-card:hover .blog-readmore::before,
.post-wrap .blog-card:hover .blog-readmore::before {
  left: 140%;
}

.blog-wrap .blog-card:hover .blog-readmore,
.post-wrap .blog-card:hover .blog-readmore {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(196, 154, 58, .25);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .12));
}

.blog-wrap .blog-readmore-icon,
.post-wrap .blog-readmore-icon {
  font-size: 14px;
  transition: transform .25s ease;
}

.blog-wrap .blog-card:hover .blog-readmore-icon,
.post-wrap .blog-card:hover .blog-readmore-icon {
  transform: translateX(3px) rotate(-8deg);
}

/* ---------- SINGLE POST PAGE ---------- */
.post-wrap {
  padding: 30px 0 70px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
}

.post {
  max-width: 880px;
  margin: 0 auto;
}

.post-head h1 {
  margin: 0 0 10px;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.6px;
  color: #111;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(0, 0, 0, .55);
}

/* Main post hero image (limit size so it’s not huge) */
.post-hero {
  margin: 16px 0 18px;
  display: flex;
  justify-content: center;
}

.post-hero img {
  width: 100%;
  max-width: 760px;
  max-height: 420px;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 18px;
  background: #f3f3f3;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .10);
}

/* Post body */
.post-body {
  font-size: 16px;
  line-height: 1.85;
  color: rgba(0, 0, 0, .82);
}

.post-body h2 {
  margin: 26px 0 10px;
  font-size: 22px;
  font-weight: 950;
  color: #111;
}

.post-body p {
  margin: 0 0 14px;
}

/* ---------- RELATED POSTS (inside <section class="related">) ---------- */
.post-wrap .related {
  margin-top: 28px;
}

.post-wrap .related h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 950;
  color: #111;
}

/* Related grid */
.post-wrap .related .blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 12px;
}

/* Related thumb: fix overlay + show proper thumbnail box */
.post-wrap .related .blog-thumb {
  height: 200px;
  background: #f3f3f3;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}

.post-wrap .related .blog-thumb::after {
  display: none;
}

.post-wrap .related .blog-thumb img {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  padding: 18px !important;
  transform: none !important;
  margin: 0 !important;
}

/* Related meta tighter */
.post-wrap .related .blog-meta {
  font-size: 12px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
  .blog-wrap .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-wrap .related .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-wrap .blog-hero h1 {
    font-size: 30px;
  }

  .post-head h1 {
    font-size: 30px;
  }

  .post-hero img {
    max-width: 100%;
    max-height: 360px;
    padding: 14px;
  }
}

@media (max-width: 680px) {
  .blog-wrap .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-wrap .blog-thumb {
    height: 210px;
  }

  .post-head h1 {
    font-size: 26px;
  }

  .post-hero img {
    max-height: 300px;
    padding: 12px;
  }
}