/* =========================
  BANNER SECTION
=========================  */
.premium-banner {
  position: relative;
  width: 100%;
  height: clamp(400px, 55vh, 700px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #000;
}

/* Cinematic Background Animation */
.banner-bg-image {
  position: absolute;
  inset: -5%;
  /* Prevent white edges during scale */
  background-image: url("https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=2564&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  z-index: 0;
  animation: cinematicPan 25s linear infinite alternate;
}

/* Vignette / Spotlight Overlay */
.banner-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(15, 15, 15, 0.2) 0%,
    rgba(15, 15, 15, 0.8) 100%
  );
  z-index: 1;
}

/* Content Container */
.banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--space-4);
  max-width: 1000px;
  width: 100%;
}

/* --- ADVANCED GLASSMORPHISM BREADCRUMB --- */
.breadcrumb {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-pill);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  opacity: 0;
  animation: fadeUp 1s var(--premium-ease) forwards;
  margin-bottom: var(--space-3);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 0;
  padding-left: 0;
}

.breadcrumb li {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
}

.breadcrumb a {
  color: var(--color-surface);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  opacity: 0.8;
}

.breadcrumb a:hover {
  opacity: 1;
  color: var(--color-surface);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* SVG Chevron Separator */
.breadcrumb .separator {
  opacity: 0.4;
  display: flex;
  align-items: center;
}

.breadcrumb .current {
  color: var(--color-yellow);
  font-weight: 600;
  opacity: 1;
}

/* --- TYPOGRAPHY --- */
.title-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.page-title {
  font-size: var(--fs-xxl);
  color: var(--color-surface);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s var(--premium-ease) 0.2s forwards;
  margin-bottom: 0;
}

.page-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.75);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s var(--premium-ease) 0.4s forwards;
}

/* --- GLOWING BRAND ACCENT LINE --- */
.brand-accent-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 3;
  background: linear-gradient(
    90deg,
    var(--color-blue) 0%,
    var(--color-red) 33%,
    var(--color-yellow) 66%,
    var(--color-green) 100%
  );
}

/* Subtle glow beneath the line */
.brand-accent-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 12px;
  z-index: 2;
  filter: blur(8px);
  opacity: 0.6;
  background: linear-gradient(
    90deg,
    var(--color-blue) 0%,
    var(--color-red) 33%,
    var(--color-yellow) 66%,
    var(--color-green) 100%
  );
}

/* --- KEYFRAMES --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cinematicPan {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.08);
  }
}

/* =========================
  BLOGS LISTING SECTION
========================= */

.blogs-listing-section {
  position: relative;
  overflow: hidden;
  padding-block: clamp(50px, 6vw, 90px);
  background:
    radial-gradient(circle at 8% 12%, rgba(66, 133, 244, 0.1), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(52, 168, 83, 0.1), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--color-bg) 100%);
}

.blogs-listing-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(66, 133, 244, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 133, 244, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 75%);
  pointer-events: none;
}

.blogs-listing-section .container {
  position: relative;
  z-index: 2;
}

/* =========================
  SECTION HEAD
========================= */

.blogs-section-head {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.blogs-section-head .section-title {
  margin-inline: auto;
  text-align: center;
}

.blogs-section-head p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--color-text-muted);
  text-align: center;
}

/* =========================
  CATEGORY FILTER
========================= */

.blog-category-filter {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 42px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;

  flex-wrap: wrap;
}

.blog-category-filter a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 18px;
  border-radius: var(--radius-pill);

  color: var(--color-text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);

  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;

  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.blog-category-filter a span {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: var(--radius-pill);
  color: #fff;
  background: linear-gradient(90deg, var(--color-blue), var(--color-green));

  font-size: 0.75rem;
  line-height: 1;
}

.blog-category-filter a:hover,
.blog-category-filter a.active {
  color: #fff;
  background: linear-gradient(90deg, var(--color-blue), var(--color-green));
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.blog-category-filter a:hover span,
.blog-category-filter a.active span {
  color: var(--color-text);
  background: #fff;
}

/* =========================
  BLOG GRID
========================= */

.blogs-grid {
  width: 100%;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 2vw, 32px);

  align-items: stretch;
}

/* If only one card exists, don't stretch it full width */
.blogs-grid .blog-card:only-child {
  max-width: 460px;
}

/* =========================
  BLOG CARD
========================= */

.blog-card {
  position: relative;
  overflow: hidden;

  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;

  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);

  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);

  transition:
    transform 0.45s var(--premium-ease, cubic-bezier(0.16, 1, 0.3, 1)),
    box-shadow 0.45s var(--premium-ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 28px 75px rgba(15, 23, 42, 0.13),
    0 12px 28px rgba(66, 133, 244, 0.08);
}

/* =========================
  IMAGE
========================= */

.blog-image {
  position: relative;
  display: block;
  overflow: hidden;

  width: 100%;
  height: 250px;

  border-radius: 28px 28px 0 0;
  isolation: isolate;
}

.blog-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;

  background:
    linear-gradient(to top, rgba(5, 8, 18, 0.72), transparent 58%),
    radial-gradient(circle at 20% 20%, rgba(66, 133, 244, 0.22), transparent 35%);

  opacity: 0.9;
  transition: var(--transition);
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  border-radius: 0;
  transform: scale(1.01);
  transition: transform 0.65s var(--premium-ease, cubic-bezier(0.16, 1, 0.3, 1));
}

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

/* =========================
  CATEGORY BADGE
========================= */

.blog-category {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;

  display: inline-flex;
  align-items: center;

  max-width: calc(100% - 36px);
  padding: 8px 14px;

  border-radius: 999px;

  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;

  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================
  CONTENT
========================= */

.blog-content {
  position: relative;
  z-index: 2;

  flex: 1;
  display: flex;
  flex-direction: column;

  padding: 24px 28px 28px;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;

  margin-bottom: 16px;

  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.blog-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.blog-meta i {
  color: var(--color-blue);
  font-size: 0.95rem;
}

.blog-content h3 {
  margin-bottom: 14px;

  font-size: clamp(1.18rem, 1.25vw, 1.4rem);
  line-height: 1.3;
  min-height: auto;
}

.blog-content h3 a {
  color: var(--color-text);
  text-decoration: none;

  background-image: linear-gradient(90deg, var(--color-blue), var(--color-green));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;

  transition:
    background-size 0.35s var(--ease),
    color 0.35s var(--ease);
}

.blog-card:hover .blog-content h3 a {
  color: var(--color-blue);
  background-size: 100% 2px;
}

.blog-content p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.7;

  margin-bottom: 24px;

  text-align: left;
  min-height: auto;
}

/* =========================
  READ MORE
========================= */

.blog-read-more {
  margin-top: auto;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  width: fit-content;

  color: var(--color-text);
  font-size: var(--fs-sm);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.blog-read-more i {
  width: 28px;
  height: 28px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  color: #fff;
  background: linear-gradient(90deg, var(--color-blue), var(--color-green));

  font-size: 0.95rem;
  line-height: 1;

  transition: var(--transition);
}

.blog-read-more:hover {
  color: var(--color-blue);
  text-decoration: none;
}

.blog-read-more:hover i {
  transform: translateX(5px);
  background: linear-gradient(90deg, var(--color-yellow), var(--color-red));
}

/* =========================
  NO BLOGS FOUND
========================= */

.no-blogs-found {
  grid-column: 1 / -1;
  text-align: center;

  padding: var(--space-5);
  border-radius: var(--radius-xl);

  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
}

.no-blogs-found h3 {
  margin-bottom: var(--space-2);
}

.no-blogs-found p {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

/* =========================
  CODEIGNITER PAGER
========================= */

.blogs-pagination {
  margin-top: 48px;
}

.blogs-pagination ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;

  flex-wrap: wrap;
  margin: 0;
  padding: 0;

  list-style: none;
}

.blogs-pagination li a,
.blogs-pagination li span {
  min-width: 42px;
  height: 42px;
  padding: 0 15px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  color: var(--color-text);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.08);

  font-size: var(--fs-sm);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;

  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.blogs-pagination li a:hover,
.blogs-pagination li.active a,
.blogs-pagination li.active span {
  color: #fff;
  background: linear-gradient(90deg, var(--color-blue), var(--color-green));
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

/* =========================
  RESPONSIVE
========================= */

@media (max-width: 1199px) {
  .blogs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .blogs-listing-section {
    padding-block: 42px 90px;
  }

  .blogs-section-head {
    margin-bottom: 32px;
  }

  .blog-category-filter {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;

    padding-bottom: 8px;
    margin-bottom: 32px;

    scrollbar-width: none;
  }

  .blog-category-filter::-webkit-scrollbar {
    display: none;
  }

  .blog-category-filter a {
    white-space: nowrap;
  }

  .blogs-grid {
    grid-template-columns: 1fr;
  }

  .blogs-grid .blog-card:only-child {
    max-width: 100%;
  }

  .blog-image {
    height: 230px;
  }

  .blog-content {
    padding: 22px;
  }

  .blog-content h3 {
    font-size: 1.2rem;
  }

  .blogs-pagination {
    margin-bottom: 70px;
  }
}

@media (max-width: 480px) {
  .blog-image {
    height: 210px;
  }

  .blog-meta {
    gap: 8px;
    font-size: 0.78rem;
  }

  .blog-category {
    left: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
  }

  .blogs-pagination ul {
    gap: 8px;
  }

  .blogs-pagination li a,
  .blogs-pagination li span {
    min-width: 38px;
    height: 38px;
    font-size: 0.8rem;
  }
}