/* ============================================================
   JAPAN TALENT MATCHING — BLOG PAGE (Enterprise Blue-Gray)
   ------------------------------------------------------------
   • Hero section with static Unsplash background
   • Category filters with professional buttons
   • Post grid with smooth fade-in animation
   • Pagination with number buttons
   • Advertisement cards (below pagination)
============================================================= */

/* ─── Root Tokens ─── */
:root {
  --aqua-light: #f7f9fc; /* repurposed: page surface */
  --aqua-soft: #e6ebf2;  /* repurposed: soft border */
  --aqua-mid: #3b82f6;   /* repurposed: accent */
  --aqua-deep: #1e40af;  /* repurposed: accent hover */
  --aqua-text: #0b1320;  /* repurposed: primary text */
  --ink: #0b1320;
  --muted: #6b7280;
  --white-glass: rgba(255, 255, 255, 0.92);
  --shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

/* ─── General Page ─── */
body.page-template-page-blogs {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  background: #ffffff;
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.75;
}

/* ─── HERO SECTION ─── */
.jt-blog-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 420px;
  margin-bottom: 80px;
  box-shadow: var(--shadow);
}

.jt-blog-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jt-blog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 19, 32, 0.82), rgba(11, 19, 32, 0.28));
}

/* 🧩 Text container fix */
.jt-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  color: #fff;
  padding-bottom: 90px;
  z-index: 2;
}

/* Title */
.jt-hero-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #ffffff;
  text-shadow: 0 3px 10px rgba(11, 19, 32, 0.55);
}

/* Subtitle */
.jt-hero-content p {
  color: #e5e7eb;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 700px;
  margin: 0 auto;
  text-shadow: 0 2px 6px rgba(11, 19, 32, 0.45);
}

/* Accent Tag */
.jt-hero-content span.inline-block {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(11, 19, 32, 0.35);
}

/* ✅ Responsive adjustments */
@media (max-width: 640px) {
  .jt-blog-hero {
    height: 520px;
  }

  .jt-hero-content {
    padding-bottom: 60px;
  }

  .jt-hero-content h1 {
    font-size: 1.6rem;
    line-height: 1.35;
    margin-bottom: 6px;
  }

  .jt-hero-content p {
    font-size: 0.9rem;
    line-height: 1.45;
    max-width: 85%;
  }
}

/* ─── CATEGORY FILTERS ─── */
.jt-blog-filters {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.jt-filter-btn {
  background: #ffffff;
  border: 1px solid #e6ebf2;
  color: #1f2a3a;
  padding: 10px 26px;
  font-size: 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.jt-filter-btn:hover {
  background: #f7f9fc;
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.28);
}

.jt-filter-btn.active {
  background: rgba(37, 99, 235, 0.12);
  color: #0b1320;
  font-weight: 600;
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

/* ─── BLOG GRID ─── */
.jt-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  padding-bottom: 60px;
}

.jt-blog-card {
  background: var(--white-glass);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid #e6ebf2;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.jt-blog-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.jt-blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
}

.jt-blog-thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.jt-card-content {
  padding: 18px 24px 24px;
}

.jt-card-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f1c2e;
  margin-bottom: 8px;
}

.jt-card-content p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.jt-card-content .text-accent {
  color: #2563eb;
  font-weight: 600;
  font-size: 0.8rem;
}

.jt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─── PAGINATION ─── */
.jt-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
}

.jt-pagination a,
.jt-pagination span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  background: #ffffff;
  border: 1px solid #e6ebf2;
  color: #1f2a3a;
  transition: all 0.25s ease;
}

.jt-pagination a:hover {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.30);
  transform: translateY(-2px);
}

.jt-pagination .current {
  background: rgba(37, 99, 235, 0.14);
  color: #0b1320;
  font-weight: 700;
  border-color: rgba(37, 99, 235, 0.35);
}

/* ─── ADVERTISEMENT CARDS (Below Pagination) ─── */
.jt-blog-ads {
  margin-top: 80px;
  margin-bottom: 80px;
  display: grid;
  gap: 28px;
}

@media (min-width: 768px) {
  .jt-blog-ads {
    grid-template-columns: repeat(3, 1fr);
  }
}

.jt-ad-card {
  position: relative;
  height: 230px;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.jt-ad-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.jt-ad-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.20);
}

.jt-ad-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 19, 32, 0.55);
}

.jt-ad-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
  padding: 20px;
  z-index: 2;
}

.jt-ad-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.jt-ad-btn {
  background: rgba(37, 99, 235, 0.92);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.25s ease;
  text-decoration: none;
}

.jt-ad-btn:hover {
  background: #1e40af;
  transform: translateY(-2px);
}

/* ─── Fade-In Animation Script Helper ─── */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ─── RESPONSIVE FIXES ─── */
@media (max-width: 768px) {
  .jt-blog-hero {
    height: 320px;
  }
  .jt-blog-hero h1 {
    bottom: 70px;
    font-size: 1.8rem;
  }
  .jt-blog-hero p {
    font-size: 0.9rem;
    bottom: 40px;
  }
}

.jt-pagination-wrapper ul {
  display: flex;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.jt-pagination-wrapper li a,
.jt-pagination-wrapper li span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  background: #ffffff;
  border: 1px solid #e6ebf2;
  color: #1f2a3a;
  transition: all 0.25s ease;
}

.jt-pagination-wrapper li a:hover {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.30);
  transform: translateY(-2px);
}

.jt-pagination-wrapper li span.current {
  background: rgba(37, 99, 235, 0.14);
  color: #0b1320;
  font-weight: 700;
  border-color: rgba(37, 99, 235, 0.35);
}

/* ─── MOBILE FIX: Prevent Hero Text Overlap ─── */
@media (max-width: 640px) {
  .jt-blog-hero {
    height: 420px; /* increased height for text breathing space */
  }

  .jt-blog-hero h1 {
    font-size: 1.6rem;
    line-height: 1.35;
    margin-bottom: 10px;
  }

  .jt-blog-hero p {
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 90%;
    bottom: 35px;
  }

  .jt-blog-hero .absolute.bottom-0 {
    bottom: 30px; /* push the whole text block slightly up */
    padding: 1.5rem 1rem;
  }
}
