/* ==========================================================================
   Blog home – richer categorized carousels
   ========================================================================== */

.blog-home {
  --bh-primary: #33a1fd;
  --bh-primary-2: #2b9dfa;
  --bh-soft: #ebf6ff;
  --bh-soft-2: #f0f7fb;
  --bh-text: #282f3e;
  --bh-muted: #8d9bb6;
  --bh-line: #ebecf2;
  --bh-radius: 24px;
  --bh-shadow: 0 20px 56px rgba(102, 119, 141, 0.1);

  position: relative;
  padding: 56px 0 96px;
  min-height: 60vh;
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(51, 161, 253, 0.12), transparent 55%),
    radial-gradient(700px 360px at 0% 20%, rgba(43, 157, 250, 0.08), transparent 50%),
    linear-gradient(180deg, #f7fafc 0%, #f5f5f5 40%, #f5f5f5 100%);
  overflow: hidden;
}

.blog-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(51, 161, 253, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.7;
}

.blog-home > .container {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                        */
/* -------------------------------------------------------------------------- */
.blog-home-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  margin-top: 36px;
  padding: 36px 40px;
  border-radius: var(--bh-radius);
  border: 1px solid rgba(235, 236, 242, 0.9);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 247, 251, 0.95) 100%);
  box-shadow: var(--bh-shadow);
  overflow: hidden;
}

.blog-home-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -8%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(51, 161, 253, 0.18), transparent 70%);
  pointer-events: none;
}

.blog-home-hero::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #53b1f5, #2b9dfa);
}

.blog-home-hero-text {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.blog-home-hero-title {
  font-size: 34px;
  line-height: 1.25;
  color: var(--bh-text);
  letter-spacing: -0.02em;
}

.blog-home-hero-desc {
  font-size: 14px;
  line-height: 26px;
  color: var(--bh-muted);
}

.blog-home-search {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 340px;
  max-width: 460px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--bh-line);
  box-shadow: 0 10px 28px rgba(102, 119, 141, 0.08);
}

.blog-home-search .icon-search {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bh-muted);
  font-size: 18px;
  pointer-events: none;
  z-index: 1;
}

.blog-home-search input[type="search"] {
  flex: 1 1 auto;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 0 44px 0 12px;
  font-size: 13px;
  color: #586889;
  outline: none;
}

.blog-home-search .btn {
  height: 44px;
  border-radius: 12px;
  padding: 0 22px;
  white-space: nowrap;
  background: linear-gradient(92.84deg, #53b1f5 -8%, #2b9dfa 116%);
  border: 0;
  box-shadow: 0 10px 22px rgba(51, 161, 253, 0.28);
}

.blog-home-search .btn:hover {
  filter: brightness(1.03);
}

/* -------------------------------------------------------------------------- */
/* Section                                                                     */
/* -------------------------------------------------------------------------- */
.blog-home-section {
  position: relative;
  margin-bottom: 28px;
  padding: 28px 28px 22px;
  border-radius: var(--bh-radius);
  background: #fff;
  border: 1px solid rgba(235, 236, 242, 0.95);
  box-shadow: 0 14px 42px rgba(102, 119, 141, 0.07);
  overflow: hidden;
}

.blog-home-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(51, 161, 253, 0.55), transparent);
  opacity: 0.85;
}

.blog-home-section:last-child {
  margin-bottom: 0;
}

.blog-home-section-head {
  position: relative;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--bh-line);
}

.blog-home-section-title {
  position: relative;
  display: inline-block;
  font-size: 22px;
  line-height: 1.35;
  color: var(--bh-text);
  z-index: 1;
}

.blog-home-section-title::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -10px;
  right: 8%;
  top: 55%;
  height: 42%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--bh-soft), rgba(235, 246, 255, 0));
}

.blog-home-section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bh-soft);
  font-size: 12px;
  font-weight: 700;
  color: var(--bh-primary);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.blog-home-section-link:hover {
  background: var(--bh-primary);
  color: #fff;
}

.blog-home-section-link i {
  font-size: 13px;
  transition: transform .2s ease;
}

.blog-home-section-link:hover i {
  transform: translateX(-3px);
}

/* Nav arrows */
.blog-home-nav {
  display: flex;
  gap: 8px;
}

.blog-home-prev,
.blog-home-next {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--bh-line);
  background: #fff;
  color: #586889;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .22s ease;
  padding: 0;
  box-shadow: 0 6px 16px rgba(102, 119, 141, 0.06);
}

.blog-home-prev:hover,
.blog-home-next:hover {
  background: linear-gradient(135deg, #53b1f5, #2b9dfa);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(51, 161, 253, 0.3);
}

.blog-home-prev.swiper-button-disabled,
.blog-home-next.swiper-button-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.blog-home-prev i,
.blog-home-next i {
  font-size: 14px;
}

/* Swiper */
.blog-home-section .blog-category-swiper {
  overflow: hidden;
  padding: 6px 4px 10px;
  margin: 0 -4px;
}

.blog-home-section .swiper-slide {
  height: auto;
}

/* -------------------------------------------------------------------------- */
/* Cards                                                                       */
/* -------------------------------------------------------------------------- */
.blog-home-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--bh-line);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(102, 119, 141, 0.06);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.blog-home-card:hover {
  transform: translateY(-6px);
  border-color: rgba(51, 161, 253, 0.28);
  box-shadow: 0 22px 48px rgba(102, 119, 141, 0.14);
}

.blog-home-card-media {
  position: relative;
  margin: 0;
}

.blog-home-card-thumb {
  display: block;
  overflow: hidden;
  background: var(--bh-soft-2);
}

.blog-home-card-thumb img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform .55s ease;
}

.blog-home-card:hover .blog-home-card-thumb img {
  transform: scale(1.06);
}

.blog-home-card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(14, 23, 51, 0.28));
  pointer-events: none;
}

.blog-home-card-cat {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  color: var(--bh-primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 8px 18px rgba(14, 23, 51, 0.12);
  transition: background .2s ease, color .2s ease;
}

.blog-home-card-cat:hover {
  background: var(--bh-primary);
  color: #fff;
}

.blog-home-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  padding: 16px 16px 18px;
}

.blog-home-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 24px;
  max-height: 48px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.blog-home-card-title a {
  color: var(--bh-text);
  transition: color .2s ease;
}

.blog-home-card-title a:hover {
  color: var(--bh-primary);
}

.blog-home-card-excerpt {
  margin: 0;
  font-size: 12px;
  line-height: 20px;
  color: var(--bh-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.blog-home-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--bh-line);
  font-size: 11px;
  color: var(--bh-muted);
}

.blog-home-card-date,
.blog-home-card-views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-home-card-date i,
.blog-home-card-views i {
  font-size: 14px;
  color: #a8b2c7;
}

.blog-home-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  height: 40px;
  border-radius: 12px;
  background: #f7f8fc;
  color: #586889;
  font-size: 12px;
  font-weight: 700;
  transition: all .22s ease;
}

.blog-home-card-cta i {
  font-size: 14px;
  transition: transform .22s ease;
}

.blog-home-card:hover .blog-home-card-cta,
.blog-home-card-cta:hover {
  background: linear-gradient(92.84deg, #53b1f5 -8%, #2b9dfa 116%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(51, 161, 253, 0.28);
}

.blog-home-card:hover .blog-home-card-cta i,
.blog-home-card-cta:hover i {
  transform: translateX(-3px);
}

.blog-home-empty {
  padding: 72px 28px;
  background: #fff;
  border-radius: var(--bh-radius);
  border: 1px solid var(--bh-line);
  color: var(--bh-muted);
  box-shadow: var(--bh-shadow);
}

.blog-home-empty h3 {
  color: var(--bh-text);
  margin-bottom: 8px;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */
@media only screen and (max-width: 991px) {
  .blog-home-hero {
    padding: 28px;
  }

  .blog-home-hero-title {
    font-size: 28px;
  }

  .blog-home-section {
    padding: 22px 18px 16px;
  }
}

@media only screen and (max-width: 767px) {
  .blog-home {
    padding: 28px 0 56px;
  }

  .blog-home-hero {
    padding: 22px;
    margin-bottom: 22px;
  }

  .blog-home-hero::after {
    width: 100%;
    height: 3px;
    top: 0;
    bottom: auto;
  }

  .blog-home-hero-title {
    font-size: 24px;
  }

  .blog-home-search {
    max-width: none;
    width: 100%;
  }

  .blog-home-section {
    padding: 16px 12px 10px;
    margin-bottom: 16px;
    border-radius: 18px;
  }

  .blog-home-section-head {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .blog-home-section-title {
    font-size: 16px;
  }

  .blog-home-section-link {
    padding: 6px 10px;
    font-size: 11px;
  }

  .blog-home-prev,
  .blog-home-next {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .blog-home-section .blog-category-swiper {
    padding: 2px 0 6px;
    margin: 0;
  }

  /* Compact 2-column cards */
  .blog-home-card {
    border-radius: 14px;
  }

  .blog-home-card:hover {
    transform: translateY(-3px);
  }

  .blog-home-card-thumb img {
    height: 104px;
  }

  .blog-home-card-cat {
    top: 8px;
    right: 8px;
    padding: 3px 7px;
    border-radius: 7px;
    font-size: 9px;
  }

  .blog-home-card-body {
    gap: 6px;
    padding: 10px 10px 12px;
  }

  .blog-home-card-title {
    font-size: 12px;
    line-height: 18px;
    max-height: 36px;
  }

  .blog-home-card-excerpt {
    display: none;
  }

  .blog-home-card-meta {
    padding-top: 6px;
    font-size: 10px;
    gap: 4px;
  }

  .blog-home-card-date i,
  .blog-home-card-views i {
    font-size: 12px;
  }

  .blog-home-card-views {
    display: none;
  }

  .blog-home-card-cta {
    height: 32px;
    border-radius: 9px;
    font-size: 11px;
    gap: 4px;
  }

  .blog-home-card-cta i {
    font-size: 12px;
  }
}
