/* ========================================================
   TechBound Blog System Styling
   ======================================================== */

:root {
  --blog-bg: #f8faf9;
  --blog-card-bg: #ffffff;
  --blog-border: rgba(0, 0, 0, 0.08);
  --blog-text: #2d3748;
  --blog-muted: #718096;
  --font-heading: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.blog-hero,
.blog-hero__title,
.blog-hero__lead,
.blog-hero__crumbs,
.blog-search-input,
.blog-search-btn,
.blog-cat-btn,
.blog-results-count,
.blog-card,
.blog-card__title,
.blog-card__excerpt,
.blog-card__date,
.blog-card__more,
.blog-card__footer,
.blog-featured-card,
.blog-featured-title,
.blog-featured-excerpt,
.blog-featured-date,
.blog-featured-cat,
.blog-author-name,
.blog-author-role,
.blog-read-link,
.blog-page-btn,
.post-title,
.post-meta-bar,
.post-body,
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6,
.post-body p,
.post-body li,
.post-body blockquote,
.post-body table,
.post-share-bar,
.related-posts-title {
  font-family: var(--font-heading) !important;
}

/* ===== BLOG HERO SECTION ===== */
.blog-hero {
  position: relative;
  padding: 140px 24px 60px;
  background: linear-gradient(180deg, #07162b 0%, #0e2038 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.blog-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.blog-hero__crumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.blog-hero__crumbs a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s;
}

.blog-hero__crumbs a:hover {
  color: var(--brand);
}

.blog-hero__crumbs span.current {
  color: #4ade80;
}

.blog-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #fff;
}

.blog-hero__lead {
  font-family: var(--font-body);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 680px;
  margin: 0 auto 36px;
}

/* Search bar in Hero */
.blog-search-wrap {
  max-width: 540px;
  margin: 0 auto;
}

.blog-search-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 6px 8px 6px 20px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
}

.blog-search-form:focus-within {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--brand);
  box-shadow: 0 12px 32px rgba(27, 140, 67, 0.3);
}

.blog-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
}

.blog-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.blog-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s;
}

.blog-search-btn:hover {
  background: #167a38;
  transform: scale(1.04);
}

.blog-search-btn:active {
  transform: scale(0.95);
}

/* ===== FEATURED POST (HERO BANNER) ===== */
.blog-featured-section {
  padding: 0 24px 40px;
  margin-top: -30px;
  position: relative;
  z-index: 10;
}

.blog-featured-card {
  max-width: 1360px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.blog-featured-card:hover,
.blog-featured-card.is-hovered,
.blog-featured-card.is-scroll-hovered {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.12);
}

.blog-featured-img-wrap {
  position: relative;
  height: 100%;
  min-height: 380px;
  overflow: hidden;
  background: #07162b;
}

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

.blog-featured-card:hover .blog-featured-img-wrap img,
.blog-featured-card.is-hovered .blog-featured-img-wrap img,
.blog-featured-card.is-scroll-hovered .blog-featured-img-wrap img {
  transform: scale(1.05);
}

.blog-featured-content {
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-featured-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-cat-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(27, 140, 67, 0.1);
  color: var(--brand);
}

.blog-featured-date {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--blog-muted);
}

.blog-featured-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  color: #0a1220;
  margin: 0;
}

.blog-featured-title a {
  color: inherit;
  transition: color 0.2s;
}

.blog-featured-title a:hover {
  color: var(--brand);
}

.blog-featured-excerpt {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  color: #4a5568;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.blog-author-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e7ede9;
  border: 1.5px solid rgba(27, 140, 67, 0.22);
  color: var(--brand);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
}

.blog-author-avatar svg {
  width: 19px;
  height: 19px;
}

.blog-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.blog-author-name {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  color: #0a1220;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-author-role {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--blog-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-author--compact .blog-author-avatar {
  width: 34px;
  height: 34px;
}

.blog-author--compact .blog-author-avatar svg {
  width: 17px;
  height: 17px;
}

.blog-author--compact .blog-author-name {
  font-size: 13px;
}

.blog-author--compact .blog-author-role {
  font-size: 11px;
}

.blog-read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  transition: gap 0.2s ease, transform 0.2s;
}

.blog-read-link:hover {
  gap: 10px;
}

/* ===== MAIN BLOG LISTING SECTION ===== */
.blog-main-section {
  padding: 40px 24px 100px;
  background: var(--blog-bg);
}

.blog-container {
  max-width: 1360px;
  margin: 0 auto;
}

/* Category Filter Tabs */
.blog-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.blog-categories {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  color: #4a5568;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.blog-cat-btn:hover {
  background: #f0fdf4;
  border-color: rgba(27, 140, 67, 0.3);
  color: var(--brand);
  transform: translateY(-1px);
}

.blog-cat-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(27, 140, 67, 0.25);
}

.blog-cat-count {
  font-size: 11px;
  opacity: 0.8;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.blog-cat-btn.is-active .blog-cat-count {
  background: rgba(255, 255, 255, 0.25);
}

.blog-results-count {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--blog-muted);
}

/* Blog Cards Grid (4 per row on desktop) */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 60px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.blog-card:hover,
.blog-card.is-hovered,
.blog-card.is-scroll-hovered,
.blog-card.is-active {
  transform: translateY(-6px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.09);
  border-color: rgba(27, 140, 67, 0.3);
}

.blog-card__media {
  position: relative;
  width: 100%;
  height: 185px;
  overflow: hidden;
  background: #07162b;
}

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

.blog-card:hover .blog-card__media img,
.blog-card.is-hovered .blog-card__media img,
.blog-card.is-scroll-hovered .blog-card__media img {
  transform: scale(1.06);
}

.blog-card__body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.blog-card__title {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.38;
  color: #0a1220;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__title a {
  color: inherit;
  transition: color 0.2s;
}

.blog-card__title a:hover {
  color: var(--brand);
}

.blog-card__excerpt {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.6;
  color: #5a6a77;
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
  color: var(--blog-muted);
}

/* Pagination */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-page-btn:hover {
  background: #f0fdf4;
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}

.blog-page-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(27, 140, 67, 0.28);
}

.blog-page-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* No Results Card */
.blog-no-results {
  background: #ffffff;
  border-radius: 20px;
  padding: 60px 24px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-no-results h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 8px;
  color: #1a202c;
}

.blog-no-results p {
  color: var(--blog-muted);
  margin-bottom: 24px;
}

/* ========================================================
   SINGLE BLOG POST READER STYLING
   ======================================================== */
.post-hero {
  min-height: 460px;
  padding: 150px 20px 72px;
}

.post-hero .hero__content {
  max-width: 900px;
}

.blog-cat-pill--hero {
  background: rgba(27, 140, 67, 0.28);
  border: 1px solid rgba(95, 211, 138, 0.45);
  color: #86efac;
  margin-bottom: 6px;
}

.post-hero__title {
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.18;
  font-weight: 600;
}

.post-article {
  padding-top: 44px;
  background: #ffffff;
}

.post-header {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 32px;
  text-align: center;
}

.post-header__crumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #718096;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.post-header__crumbs a {
  color: #4a5568;
  transition: color 0.2s;
}

.post-header__crumbs a:hover {
  color: var(--brand);
}

.post-title {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #0a1220;
  margin-bottom: 24px;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 14px;
  color: #718096;
}

.post-featured-media {
  max-width: 1040px;
  margin: 0 auto 50px;
  padding: 0 24px;
}

.post-featured-media__wrap {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  max-height: 560px;
  background: #07162b;
}

.post-featured-media__wrap img {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: cover;
  display: block;
}

/* Post Content Body */
.post-content-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.post-body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.8;
  color: #2d3748;
}

.post-body h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  margin: 48px 0 20px;
  color: #0a1220;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(27, 140, 67, 0.2);
}

.post-body h3 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  margin: 36px 0 16px;
  color: #1a202c;
}

.post-body h4,
.post-body h5,
.post-body h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 28px 0 12px;
  color: #1a202c;
}

.post-body p {
  margin-bottom: 24px;
}

.post-body a {
  color: var(--brand);
  text-decoration: underline;
  font-weight: 600;
  transition: opacity 0.2s;
}

.post-body a:hover {
  opacity: 0.85;
}

.post-body strong,
.post-body b {
  color: #0a1220;
  font-weight: 700;
}

.post-body ul,
.post-body ol {
  margin: 0 0 28px 24px;
  padding: 0;
}

.post-body ul {
  list-style: disc;
}

.post-body ol {
  list-style: decimal;
}

.post-body li {
  margin-bottom: 10px;
  padding-left: 6px;
}

.post-body blockquote {
  margin: 36px 0;
  padding: 20px 28px;
  border-left: 4px solid var(--brand);
  background: #f7faf8;
  border-radius: 0 16px 16px 0;
  font-style: italic;
  color: #2d3748;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 32px auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  display: block;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 16px;
}

.post-body th,
.post-body td {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.post-body th {
  background: #edf2f7;
  font-weight: 700;
  color: #1a202c;
}

/* Post Share & Footer */
.post-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  margin-top: 48px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 16px;
}

.post-share-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.post-share-btn:hover {
  background: var(--brand);
  color: #fff;
  transform: scale(1.1);
}

.post-share-btn:active {
  transform: scale(0.92);
}

/* Related Posts Section */
.related-posts-section {
  padding: 80px 24px;
  background: #f8faf9;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.related-posts-inner {
  max-width: 1360px;
  margin: 0 auto;
}

.related-posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.related-posts-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: #0a1220;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (max-width: 1024px) {
  .blog-featured-card {
    grid-template-columns: 1fr;
  }
  .blog-featured-img-wrap {
    min-height: 280px;
  }
  .blog-featured-content {
    padding: 32px 24px;
  }
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .blog-hero {
    padding: 120px 16px 40px;
  }
  .post-hero {
    min-height: 360px;
    padding: 125px 16px 52px;
  }
  .blog-featured-section {
    padding: 0 16px 30px;
  }
  .blog-main-section {
    padding: 30px 16px 80px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .post-article {
    padding-top: 32px;
  }
  .post-content-container {
    padding: 0 16px 60px;
  }
  .post-body {
    font-size: 16.5px;
    line-height: 1.75;
  }
}
