/* =============================================
   BLOGS.CSS — Blog-specific styles only
   navbar / footer / backTop / #ctaBanner
   ➜ style.css ෙකේ already defined
============================================= */

/* ── Page Hero ── */
.page-hero {
  background: var(--dark);
  padding: 60px 0 48px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(245,197,24,0.13) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; color: #fff; line-height: 1.2;
}
.page-hero p {
  color: rgba(255,255,255,0.6);
  max-width: 620px; margin-bottom: 0;
}
.cat-badge {
  display: inline-block;
  background: var(--yellow); color: #111;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 13px; border-radius: 3px; margin-bottom: 14px;
}
.breadcrumb-item a { color: var(--yellow); text-decoration: none; }
.breadcrumb-item.active { color: rgba(255,255,255,0.5); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.35); }

/* ── Our Projects — Topic cards ── */
.projects-section { padding: 72px 0 80px; background: #f8f8f8; }

.topic-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
  transition: box-shadow 0.28s, transform 0.28s;
  height: 100%; display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.topic-card,
.topic-card h5,
.topic-card p,
.topic-card span,
.topic-card * {
  text-decoration: none !important;
  color: inherit;
}
.topic-card:hover {
  box-shadow: 0 12px 38px rgba(0,0,0,0.13);
  transform: translateY(-5px); color: inherit;
}
.topic-card-img {
  position: relative; height: 220px;
  overflow: hidden; background: var(--dark); flex-shrink: 0;
}
.topic-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.42s ease;
}
.topic-card:hover .topic-card-img img { transform: scale(1.07); }
.topic-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--yellow); color: #111;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; padding: 4px 11px; border-radius: 3px;
}
.blogs-count {
  position: absolute; bottom: 14px; right: 14px;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 0.75rem; font-weight: 600;
  padding: 4px 10px; border-radius: 20px; backdrop-filter: blur(4px);
}
.topic-card-body {
  padding: 24px 26px 26px;
  display: flex; flex-direction: column; flex: 1;
}
.topic-card-body h5 {
  font-size: 1.08rem; font-weight: 800;
  color: var(--dark); line-height: 1.35; margin-bottom: 10px;
  text-decoration: none;
}
.topic-card-body p {
  font-size: 0.87rem; color: #777;
  line-height: 1.7; margin-bottom: 20px; flex: 1;
  text-decoration: none;
}
.topic-view-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.82rem; font-weight: 700; color: var(--dark);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 2px solid var(--yellow); padding-bottom: 2px;
  width: fit-content; transition: color 0.2s;
}
.topic-card:hover .topic-view-btn { color: var(--yellow); }
.topic-view-btn i { transition: transform 0.2s; }
.topic-card:hover .topic-view-btn i { transform: translateX(4px); }

/* ── Blog List — Blog cards ── */
.blogs-section { padding: 64px 0 80px; background: #f8f8f8; }

.blog-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
  transition: box-shadow 0.28s, transform 0.28s;
  height: 100%; display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.blog-card:hover {
  box-shadow: 0 12px 38px rgba(0,0,0,0.13);
  transform: translateY(-5px); color: inherit;
}
.blog-card-img {
  position: relative; height: 210px;
  overflow: hidden; background: #e8e8e8; flex-shrink: 0;
}
.blog-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.42s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.07); }
.blog-num-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--yellow); color: #111;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; padding: 3px 10px; border-radius: 3px;
}
.blog-card-body {
  padding: 20px 22px 24px;
  display: flex; flex-direction: column; flex: 1;
}
.blog-card-meta { font-size: 0.78rem; color: #999; margin-bottom: 9px; }
.blog-card-meta i { color: var(--yellow); }
.blog-card-body h5 {
  font-size: 1rem; font-weight: 700; color: var(--dark);
  line-height: 1.4; margin-bottom: 14px; flex: 1;
}
.blog-read-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 700; color: var(--dark);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 2px solid var(--yellow); padding-bottom: 2px;
  width: fit-content; transition: color 0.2s;
}
.blog-card:hover .blog-read-btn { color: var(--yellow); }
.blog-read-btn i { transition: transform 0.2s; }
.blog-card:hover .blog-read-btn i { transform: translateX(4px); }

/* ── Blog Detail Page ── */
.blog-hero-img {
  width: calc(100% - 240px);
  height: 620px;
  display: block;
  object-fit: cover;
  object-position: center top;
  margin: 40px auto 0;
}

.blog-content-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 120px 80px;
}
.blog-content-wrap h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800; color: var(--dark);
  line-height: 1.25; text-align: center; margin-bottom: 16px;
}

.blog-meta {
  display: flex; flex-wrap: wrap;
  justify-content: center; align-items: center;
  font-size: 0.82rem; color: #999;
  text-align: center; margin-bottom: 36px;
  letter-spacing: 0.04em;
}
.blog-meta .sep { margin: 0 8px; color: #ddd; }
.blog-meta a {
  color: var(--dark); text-decoration: none;
  font-weight: 700; text-transform: uppercase; font-size: 0.78rem;
}
.blog-meta a:hover { color: var(--yellow); }

/* Body — override style.css global justify */
.blog-body p {
  color: #333 !important;
  line-height: 1.85 !important;
  font-size: 1rem !important;
  margin-bottom: 22px !important;
  text-align: justify !important;
  hyphens: none !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}

.blog-tags {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 36px; padding: 14px 18px;
  border: 1px solid #eee; border-radius: 4px;
  font-size: 0.82rem; color: #aaa;
}
.blog-comment-section {
  margin-top: 36px; padding-top: 28px; border-top: 1px solid #eee;
}
.blog-comment-section h4 {
  font-size: 1.1rem; font-weight: 800; color: var(--dark); margin-bottom: 10px;
}
.blog-comment-section p { font-size: 0.85rem; color: #999; }
.blog-comment-section a {
  color: var(--yellow); text-decoration: none; font-weight: 600;
}

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; color: #999;
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 28px; transition: color 0.2s;
}
.back-link:hover { color: var(--yellow); }
.back-link i { transition: transform 0.2s; }
.back-link:hover i { transform: translateX(-4px); }

/* ── Related blogs ── */
.related-section { padding: 48px 0 64px; background: #f8f8f8; }
.related-section h4 {
  font-size: 1.1rem; font-weight: 800; color: var(--dark); margin-bottom: 20px;
}
.related-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: #fff; border: 1.5px solid #eee;
  border-radius: 8px; margin-bottom: 10px;
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.related-item:last-child { margin-bottom: 0; }
.related-item:hover {
  border-color: var(--yellow); background: #fffbef;
  box-shadow: 0 4px 14px rgba(245,197,24,0.15); color: inherit;
}
.related-item.current {
  border-color: var(--yellow); background: #fffbef; pointer-events: none;
}
.rel-num {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: var(--dark); color: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 800;
  transition: background 0.2s, color 0.2s;
}
.related-item:hover .rel-num,
.related-item.current .rel-num { background: var(--yellow); color: #111; }
.rel-text strong {
  display: block; font-size: 0.9rem; font-weight: 700;
  color: var(--dark); line-height: 1.3;
}
.rel-text span { font-size: 0.76rem; color: #999; }
.rel-arrow { color: #ccc; margin-left: auto; transition: color 0.2s, transform 0.2s; }
.related-item:hover .rel-arrow { color: var(--yellow); transform: translateX(4px); }

/* =============================================
   RESPONSIVE — Bootstrap breakpoints
============================================= */

/* Tablet — md (max 991px) */
@media (max-width: 991px) {
  .page-hero { padding: 48px 0 36px; }

  .projects-section { padding: 56px 0 64px; }
  .topic-card-img { height: 190px; }

  .blogs-section { padding: 56px 0 64px; }
  .blog-card-img { height: 190px; }

  .blog-hero-img {
    width: calc(100% - 100px);
    height: 480px;
    margin: 28px auto 0;
  }
  .blog-content-wrap { padding: 56px 60px 64px; }
  .blog-content-wrap h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
}

/* Mobile — sm (max 767px) */
@media (max-width: 767px) {
  .page-hero { padding: 36px 0 28px; }

  .projects-section { padding: 40px 0 48px; }
  .topic-card-img { height: 170px; }
  .topic-card-body { padding: 16px 18px 18px; }

  .blogs-section { padding: 40px 0 48px; }
  .blog-card-img { height: 170px; }

  .blog-hero-img {
    width: 100%;
    height: auto;
    max-height: 360px;
    margin: 20px auto 0;
  }
  .blog-content-wrap {
    padding: 40px 24px 48px;
    max-width: 100%;
  }
  .blog-content-wrap h1 { font-size: clamp(1.4rem, 4vw, 1.9rem); }

  .related-section { padding: 36px 0 48px; }
}

/* Small mobile — xs (max 575px) */
@media (max-width: 575px) {
  .page-hero { padding: 28px 0 22px; }

  .projects-section { padding: 32px 0 40px; }
  .topic-card-img { height: 150px; }

  .blogs-section { padding: 32px 0 40px; }
  .blog-card-img { height: 150px; }

  .blog-hero-img {
    width: 100%;
    height: auto;
    max-height: 280px;
    margin: 16px auto 0;
  }
  .blog-content-wrap { padding: 32px 16px 40px; }
  .blog-content-wrap h1 { font-size: clamp(1.2rem, 3.5vw, 1.6rem); }

  .blog-meta { font-size: 0.74rem; }
  .blog-meta .sep { margin: 0 5px; }

  .related-section { padding: 28px 0 36px; }
  .related-item { padding: 10px 12px; gap: 10px; }
  .rel-num { width: 30px; height: 30px; font-size: 0.75rem; }
}