/* ===== Home: Blog slider ===== */
.home-blog {
  --hb-blue: #1a4791;
  --hb-blue-dark: #0f2d5e;
  --hb-green: #8dc63f;
  --hb-text: #5b6573;
  --hb-title: #14213d;
  position: relative;
  padding: 60px 0 50px;
  background:
    radial-gradient(circle at 8% 12%, rgba(141, 198, 63, .10), transparent 32%),
    radial-gradient(circle at 92% 88%, rgba(26, 71, 145, .10), transparent 36%),
    linear-gradient(180deg, #f5f8fc 0%, #ffffff 100%);
  overflow: hidden;
}

/* Header */
.home-blog .hb-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.home-blog .hb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--hb-green);
  margin-bottom: 6px;
}
.home-blog .hb-eyebrow:before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--hb-green);
  border-radius: 2px;
}
.home-blog .hb-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--hb-blue);
}
.home-blog .hb-subtitle {
  margin: 6px 0 0;
  color: var(--hb-text);
  font-size: 14px;
}
.home-blog .hb-all {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--hb-blue);
  color: var(--hb-blue);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  transition: all .25s ease;
}
.home-blog .hb-all:hover,
.home-blog .hb-all:focus {
  background: var(--hb-blue);
  color: #fff;
  text-decoration: none;
}
.home-blog .hb-all i { transition: transform .25s ease; }
.home-blog .hb-all:hover i { transform: translateX(4px); }

/* Carousel equal height */
.home-blog .owl-carousel .owl-stage { display: flex; }
.home-blog .owl-carousel .owl-item { display: flex; }
.home-blog .owl-carousel .owl-stage-outer { padding: 14px 6px 26px; margin: -14px -6px -26px; }

/* Card: leaf shape (ไม่ใช่สี่เหลี่ยม) */
.home-blog .hb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 6px;
}
.home-blog .hb-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 70px 14px 70px 14px;
  background: #e9eef5;
  box-shadow: 0 14px 34px rgba(16, 32, 64, .14);
  transition: border-radius .5s ease, box-shadow .4s ease;
}
.home-blog .hb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}
.home-blog .hb-card:hover .hb-media {
  border-radius: 14px 70px 14px 70px;
  box-shadow: 0 20px 44px rgba(16, 32, 64, .2);
}
.home-blog .hb-card:hover .hb-media img { transform: scale(1.05); }

/* Floating content panel overlaps the image */
.home-blog .hb-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: -22px 14px 0;
  padding: 24px 20px 18px;
  background: #fff;
  border-radius: 14px 44px 14px 44px;
  box-shadow: 0 12px 30px rgba(16, 32, 64, .10);
  transition: transform .4s ease, box-shadow .4s ease;
}
.home-blog .hb-card:hover .hb-body {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(16, 32, 64, .16);
}
.home-blog .hb-body:before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  width: 38px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--hb-green), #b5dc7d);
}

/* Round date badge on the seam */
.home-blog .hb-date {
  position: absolute;
  top: -28px;
  right: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: linear-gradient(135deg, var(--hb-blue) 0%, #2d6cc7 100%);
  box-shadow: 0 8px 20px rgba(26, 71, 145, .35);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
}
.home-blog .hb-date strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.home-blog .hb-date span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, .85);
  letter-spacing: .3px;
}
.home-blog .hb-tag {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(141, 198, 63, .15);
  color: #5d8f1f;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Body text */
.home-blog .hb-card-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  min-height: 3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-blog .hb-card-title a {
  color: var(--hb-title);
  text-decoration: none;
  transition: color .2s ease;
}
.home-blog .hb-card:hover .hb-card-title a { color: var(--hb-blue); }
.home-blog .hb-excerpt {
  margin: 0 0 14px;
  color: var(--hb-text);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-blog .hb-more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #edf1f6;
  color: var(--hb-blue);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.home-blog .hb-more:hover,
.home-blog .hb-more:focus { color: var(--hb-green); text-decoration: none; }
.home-blog .hb-more .hb-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(26, 71, 145, .08);
  transition: all .25s ease;
}
.home-blog .hb-card:hover .hb-more .hb-arrow {
  background: var(--hb-green);
  color: #fff;
  transform: translateX(4px);
}

/* Stretched link: whole card clickable */
.home-blog .hb-card-title a:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.home-blog .hb-more { position: relative; z-index: 2; }

/* Nav + dots */
.home-blog .hb-slider { position: relative; }
.home-blog .owl-theme .owl-nav {
  margin: 0;
}
.home-blog .owl-theme .owl-nav [class*='owl-'] {
  position: absolute;
  top: 30%;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0 !important;
  border-radius: 50%;
  background: #fff;
  color: var(--hb-blue);
  font-size: 15px;
  line-height: 38px;
  box-shadow: 0 6px 18px rgba(16, 32, 64, .15);
  transition: all .25s ease;
}
.home-blog .owl-theme .owl-nav .owl-prev { left: -18px; }
.home-blog .owl-theme .owl-nav .owl-next { right: -18px; }
.home-blog .owl-theme .owl-nav [class*='owl-']:hover {
  background: var(--hb-blue);
  color: #fff;
}
.home-blog .owl-theme .owl-nav .disabled { opacity: 0; pointer-events: none; }
.home-blog .owl-theme .owl-dots { margin-top: 18px; }
.home-blog .owl-theme .owl-dots .owl-dot span {
  width: 8px;
  height: 8px;
  margin: 4px;
  background: #cfd8e6;
  transition: all .3s ease;
}
.home-blog .owl-theme .owl-dots .owl-dot.active span,
.home-blog .owl-theme .owl-dots .owl-dot:hover span {
  width: 26px;
  background: var(--hb-blue);
}

/* Responsive */
@media (max-width: 1260px) {
  .home-blog .owl-theme .owl-nav .owl-prev { left: 0; }
  .home-blog .owl-theme .owl-nav .owl-next { right: 0; }
}
@media (max-width: 767px) {
  .home-blog { padding: 40px 0 30px; }
  .home-blog .hb-head { flex-direction: column; align-items: flex-start; margin-bottom: 20px; }
  .home-blog .hb-title { font-size: 23px; }
  .home-blog .owl-theme .owl-nav { display: none; }
  .home-blog .hb-body { margin: -22px 12px 0; padding: 28px 18px 18px; }
  .home-blog .hb-media { border-radius: 70px 14px 70px 14px; }
}

/* ย่อความกว้างรวมของ section ให้กระชับขึ้น */
.home-blog .hb-head,
.home-blog .hb-slider { max-width: 1040px; margin-left: auto; margin-right: auto; }
