/* ═══════════════════════════════════════════════════
   LATEST BLOGS SECTION — home-blogs.css
   Matches LumaGreens Solutions design system
   ═══════════════════════════════════════════════════ */

/* ─── Section Wrapper ─── */
.home-blogs {
  background: var(--cream);
  padding: 7rem 7vw;
  position: relative;
  overflow: hidden;
}

/* Subtle decorative background element */
.home-blogs::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 168, 75, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.home-blogs::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 184, 154, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

/* ─── Section Header ─── */
.home-blogs-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.home-blogs-header-left {
  flex: 1;
  max-width: 36rem;
}


/* ─── Swiper Container ─── */
.home-blogs-swiper-wrap {
  position: relative;
  z-index: 1;
}

.home-blogs-swiper {
  overflow: visible;
  padding: 30px 0;
  /* Horizontal padding removed for desktop to avoid alignment issues */
  margin: 0;
}

.home-blogs-swiper-wrapper {
  display: flex;
  /* gap: 1.5rem; */
}

/* Clip overflow so cards don't overflow page horizontally */
.home-blogs-swiper-clip {
  overflow: hidden;
  /* Default back to hidden to prevent horizontal page scroll on desktop */
}

/* ─── Blog Slide Card ─── */
.hb-slide {
  height: auto;
}

.hb-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(26, 51, 32, 0.07);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
}

.hb-card:hover {
  /* transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(9, 90, 44, 0.12); */
  border-color: rgba(26, 51, 32, 0.12);
}

/* ─── Card Image ─── */
.hb-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--parchment);
}

.hb-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.hb-card:hover .hb-card-img img {
  transform: scale(1.04);
}

/* Category badge */
.hb-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--forest);
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  z-index: 1;
}

/* ─── Card Body ─── */
.hb-card-body {
  padding: 1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Meta row */
.hb-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(26, 51, 32, 0.45);
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.hb-card-dot {
  opacity: 0.4;
  font-size: 1rem;
  line-height: 1;
}

/* Title */
.hb-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--forest);
  line-height: 1.4;
  margin-bottom: 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s;
}

.hb-card:hover .hb-card-title {
  color: var(--moss);
}

/* Excerpt */
.hb-card-excerpt {
  font-size: 0.85rem;
  line-height: 1.65;
  color: rgba(26, 51, 32, 0.58);
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 1.2rem;
}

/* Read more link */
.hb-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: auto;
  transition: gap 0.25s, color 0.25s;
}

.hb-card-link svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.hb-card:hover .hb-card-link {
  color: var(--moss);
  gap: 0.7rem;
}

.hb-card:hover .hb-card-link svg {
  transform: translateX(3px);
}

/* ─── View All Button (footer row) ─── */
.hb-footer-row {
  display: flex;
  justify-content: center;
  margin-top: 2.2rem;
}

.hb-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--forest);
  color: var(--cream);
  padding: 0.85rem 2rem;
  border-radius: 2px;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s, gap 0.25s;
}

.hb-view-all-btn:hover {
  background: var(--moss);
  transform: translateY(-1px);
  gap: 0.9rem;
}

/* ─── Swiper Navigation Arrows ─── */
.hb-swiper-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0;
}

.hb-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(9, 90, 44, 0.2);
  background: var(--white);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.2s;
  flex-shrink: 0;
}

.hb-nav-btn:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--gold);
}

.hb-nav-btn.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ─── Skeleton Loading ─── */
.hb-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.hb-skeleton-card {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(26, 51, 32, 0.07);
}

.hb-skeleton {
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  background-size: 200% 100%;
  animation: hb-shine 1.5s linear infinite;
  border-radius: 3px;
}

@keyframes hb-shine {
  to {
    background-position-x: -200%;
  }
}

.hb-skeleton-img {
  height: 180px;
  width: 100%;
  border-radius: 0;
}

.hb-skeleton-body {
  padding: 1.6rem 1.8rem;
}

.hb-skeleton-meta {
  height: 10px;
  width: 45%;
  margin-bottom: 14px;
}

.hb-skeleton-title {
  height: 22px;
  width: 85%;
  margin-bottom: 10px;
}

.hb-skeleton-title-2 {
  height: 22px;
  width: 60%;
  margin-bottom: 16px;
}

.hb-skeleton-text {
  height: 13px;
  width: 100%;
  margin-bottom: 8px;
}

.hb-skeleton-text-short {
  height: 13px;
  width: 75%;
  margin-bottom: 20px;
}

.hb-skeleton-link {
  height: 12px;
  width: 32%;
  margin-top: 8px;
}

.swiper-desktop {
  display: flex !important;
}

.swiper-mobile {
  display: none !important;
}

/* ─── Responsive ─── */
@media screen and (max-width: 1024px) {
  .home-blogs {
    padding: 5rem 5vw;
  }
}

@media screen and (max-width: 768px) {
  .home-blogs {
    padding: 4.5rem 5vw;
  }

  /* Ensure card hover shadows/transforms aren't clipped on mobile */
  .home-blogs-swiper-clip, .home-blogs-swiper {
    overflow: visible !important;
  }

  .home-blogs-swiper {
    padding: 30px 15px;
    /* Added horizontal padding to prevent side cuts on mobile */
    margin: 0;
  }

  .home-blogs-header {
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
  }

  .home-blogs-header-left {
    flex: 1 1 auto;
    min-width: 0;
  }

  .hb-swiper-nav {
    flex-shrink: 0;
  }

  .hb-card-body {
    padding: 1.1rem 1.2rem 1.3rem;
  }

  .hb-card-title {
    font-size: 1.05rem;
  }

  .hb-skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .hb-skeleton-grid .hb-skeleton-card:nth-child(n+3) {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  .swiper-desktop {
    display: none !important;
  }

  .swiper-mobile {
    display: flex !important;
    justify-content: end;
    padding-bottom: 1rem;
  }

  .hb-nav-btn {
    width: 38px;
    height: 38px;
  }

  .home-blogs {
    padding: 3.5rem 1.2rem;
    /* Adjusted for better spacing on very small screens */
  }

  .home-blogs-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  .hb-swiper-nav {
    align-self: flex-start;
  }

  /* Increase card view on small phones */
  .hb-card-body {
    padding: 1rem 1rem 1.2rem;
  }

  .hb-skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .hb-skeleton-grid .hb-skeleton-card:nth-child(n+3) {
    display: none;
  }
}