/* ==========================================================================
   BLOGS SECTION - MODERN PREMIUM WOW
   ========================================================================== */
.blogs {
  position: relative;
  overflow: hidden;
}

.blogs-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.blogs-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(255, 154, 46, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(26, 109, 212, 0.04) 0%, transparent 50%);
}

.blogs-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 109, 212, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 109, 212, 0.015) 1px, transparent 1px);
  background-size: 50px 50px;
}

.blogs-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.blogs-blob-1 {
  top: -10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(26, 109, 212, 0.06) 0%, transparent 70%);
  animation: blogs-float 18s ease-in-out infinite;
}

.blogs-blob-2 {
  bottom: -15%;
  left: -8%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255, 154, 46, 0.05) 0%, transparent 70%);
  animation: blogs-float 14s ease-in-out infinite reverse 2s;
}

@keyframes blogs-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -25px) scale(1.05); }
}

/* ─── Badge ─── */
.blogs-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 7px 20px;
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px var(--accent-glow);
}

#blogs-swiper {
  position: relative;
  padding-bottom: 4rem;
  z-index: 1;
}

/* ─── Card ─── */
.blog-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 2px 20px rgba(10, 25, 49, 0.04),
    0 1px 4px rgba(10, 25, 49, 0.02);
  position: relative;
}

/* Conic gradient border on hover */
.blog-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    rgba(255, 154, 46, 0.3) 90deg,
    rgba(26, 109, 212, 0.25) 180deg,
    rgba(255, 106, 0, 0.2) 270deg,
    transparent 360deg
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1.5px;
  animation: blog-conic-rotate 3s linear infinite;
  pointer-events: none;
  z-index: 5;
}

@keyframes blog-conic-rotate {
  to { transform: rotate(360deg); }
}

.blog-card:hover::before {
  opacity: 1;
}

.blog-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 24px 50px rgba(26, 39, 68, 0.08),
    0 8px 20px rgba(26, 39, 68, 0.04);
}

/* ─── Image ─── */
.blog-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.blog-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 60%,
    rgba(3, 10, 22, 0.1) 100%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.blog-card:hover .blog-image::after {
  opacity: 1;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-image img {
  transform: scale(1.08);
}

/* ─── Content ─── */
.blog-content {
  padding: 26px 28px 30px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255, 125, 0, 0.1), rgba(255, 154, 46, 0.08));
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 125, 0, 0.15);
  width: fit-content;
  transition: all 0.4s ease;
}

.blog-card:hover .blog-badge {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.blog-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.4s ease;
}

.blog-card:hover .blog-title {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-card-date {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-card-date i {
  font-size: 1rem;
  color: var(--accent);
}

.blog-desc {
  color: var(--text-secondary);
  font-size: 1.35rem;
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  transition: color 0.4s ease;
}

.blog-card:hover .blog-desc {
  color: var(--text-primary);
}

.blog-link {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.4s ease;
  width: fit-content;
  position: relative;
  padding-bottom: 2px;
}

.blog-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-link::after {
  width: 100%;
}

.blog-link i {
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-link {
  color: var(--accent);
}

.blog-card:hover .blog-link i {
  transform: translateX(6px);
}

/* ─── Swiper Pagination ─── */
.blogs-swiper-pagination {
  position: relative;
  text-align: center;
  margin-top: 20px;
}

.blogs-swiper-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(26, 109, 212, 0.15);
  opacity: 1;
  transition: all 0.4s ease;
}

.blogs-swiper-pagination .swiper-pagination-bullet-active {
  background: var(--accent-gradient);
  width: 28px;
  border-radius: 5px;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ─── Blog Nav ─── */
.blogs .swiper-button-next,
.blogs .swiper-button-prev {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 36px;
  background: transparent;
  color: var(--accent) !important;
  transition: all 0.4s ease;
  z-index: 10;
  opacity: 0.5;
}

.blogs .swiper-button-next:hover,
.blogs .swiper-button-prev:hover {
  opacity: 1;
  transform: scale(1.2);
}

.blogs .swiper-button-next::after,
.blogs .swiper-button-prev::after {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1.6rem;
}

.blogs .swiper-button-next::after {
  content: '\f054';
}

.blogs .swiper-button-prev::after {
  content: '\f053';
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .blog-image {
    height: 180px;
  }

  .blog-content {
    padding: 20px 22px 24px;
  }

  .blog-title {
    font-size: 1.6rem;
  }

  .blog-desc {
    font-size: 1.3rem;
  }

  .blog-badge {
    font-size: 1rem;
  }

  .blogs .swiper-button-next,
  .blogs .swiper-button-prev {
    width: 30px;
    height: 30px;
  }

  .blogs .swiper-button-next::after,
  .blogs .swiper-button-prev::after {
    font-size: 1.3rem;
  }
}

/* ==========================================================================
   LIHAT SEMUA ARTIKEL BUTTON
   ========================================================================== */
.blogs-actions {
  text-align: center;
  margin-top: 20px;
  position: relative;
  z-index: 2;
}

.btn-lihat-semua {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  border-radius: 60px;
  padding: 0;
  background: transparent;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-lihat-semua:hover {
  transform: translateY(-3px);
}

.btn-ls-bg {
  position: absolute;
  inset: 0;
  border-radius: 60px;
  background: var(--accent-gradient);
  box-shadow: 0 6px 24px var(--accent-glow);
  transition: all 0.4s ease;
}

.btn-lihat-semua:hover .btn-ls-bg {
  box-shadow: 0 10px 36px var(--accent-glow), 0 0 0 3px rgba(255,125,0,0.15);
}

.btn-ls-content {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 1;
}

.btn-ls-content i:first-child {
  font-size: 1.2rem;
  opacity: 0.85;
}

.btn-ls-arrow {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-lihat-semua:hover .btn-ls-arrow {
  transform: translateX(6px);
}

/* ==========================================================================
   ALL BLOGS MODAL
   ========================================================================== */
.all-blogs-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.all-blogs-modal.open {
  opacity: 1;
  visibility: visible;
}

.all-blogs-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 22, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.all-blogs-panel {
  position: relative;
  width: 96%;
  max-width: 1240px;
  max-height: 90vh;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 40px 100px rgba(3, 10, 22, 0.25),
    0 8px 32px rgba(3, 10, 22, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateY(30px) scale(0.97);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.all-blogs-modal.open .all-blogs-panel {
  transform: translateY(0) scale(1);
}

/* Close button */
.all-blogs-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(26, 39, 68, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.all-blogs-close svg {
  width: 20px;
  height: 20px;
}

.all-blogs-close:hover {
  background: var(--accent-gradient);
  color: #fff;
  transform: rotate(90deg);
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* Header */
.all-blogs-header {
  padding: 36px 40px 24px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(26, 39, 68, 0.06);
}

.all-blogs-title {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.all-blogs-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.all-blogs-subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin: 0 0 18px;
}

/* Filters */
.all-blogs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ab-filter {
  padding: 8px 20px;
  border-radius: 30px;
  border: 1px solid rgba(26, 39, 68, 0.08);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.ab-filter:hover {
  border-color: rgba(255, 125, 0, 0.2);
  color: var(--accent);
  background: rgba(255, 125, 0, 0.04);
}

.ab-filter.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* Scrollable grid area */
.all-blogs-scroll {
  overflow-y: auto;
  padding: 24px 40px 40px;
  flex: 1;
}

.all-blogs-scroll::-webkit-scrollbar {
  width: 6px;
}

.all-blogs-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.all-blogs-scroll::-webkit-scrollbar-thumb {
  background: rgba(26, 39, 68, 0.12);
  border-radius: 10px;
}

/* Grid */
.all-blogs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.all-blogs-grid .ab-card {
  display: flex;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(26, 39, 68, 0.06);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(20px);
  animation: ab-card-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 2px 12px rgba(26, 39, 68, 0.03);
  position: relative;
}

.all-blogs-grid .ab-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 19px;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    rgba(255, 154, 46, 0.25) 90deg,
    rgba(26, 109, 212, 0.2) 180deg,
    rgba(255, 106, 0, 0.15) 270deg,
    transparent 360deg
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1.5px;
  animation: ab-card-conic 3s linear infinite;
  pointer-events: none;
}

@keyframes ab-card-conic {
  to { transform: rotate(360deg); }
}

.all-blogs-grid .ab-card:hover::before {
  opacity: 1;
}

.all-blogs-grid .ab-card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow:
    0 20px 48px rgba(26, 39, 68, 0.08),
    0 6px 16px rgba(26, 39, 68, 0.04);
}

@keyframes ab-card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ab-card-image {
  width: 180px;
  min-height: 160px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.ab-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(3,10,22,0.06));
}

.ab-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.ab-card:hover .ab-card-image img {
  transform: scale(1.08);
}

.ab-card-body {
  flex: 1;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.ab-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255,125,0,0.08), rgba(255,154,46,0.06));
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid rgba(255,125,0,0.12);
  width: fit-content;
  transition: all 0.4s ease;
}

.ab-card:hover .ab-card-badge {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px var(--accent-glow);
}

.ab-card-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.4s ease;
  margin: 0;
}

.ab-card:hover .ab-card-title {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ab-card-date {
  font-size: 1.05rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ab-card-date i {
  color: var(--accent);
  font-size: 0.95rem;
}

.ab-card-excerpt {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.ab-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.3s ease;
}

.ab-card:hover .ab-card-link {
  gap: 10px;
}

/* Responsive */
@media (max-width: 900px) {
  .all-blogs-grid {
    grid-template-columns: 1fr;
  }

  .all-blogs-header {
    padding: 24px 24px 20px;
  }

  .all-blogs-scroll {
    padding: 16px 24px 24px;
  }

  .all-blogs-title {
    font-size: 1.8rem;
  }

  .ab-card-image {
    width: 140px;
    min-height: 130px;
  }

  .ab-card-body {
    padding: 14px 16px;
  }

  .ab-card-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 500px) {
  .all-blogs-panel {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .ab-card {
    flex-direction: column;
  }

  .ab-card-image {
    width: 100%;
    height: 180px;
    min-height: auto;
  }
}
