/* =================================================================
   Nexus Tech — Blog Archive Styles
   Matches FigmaDesign-Blog-Main.svg
================================================================= */

/* ── Blog Hero ─────────────────────────────────────────────────── */
.blog-hero {
  background: #ffffff;
  padding: calc(var(--nexus-nav-h, 143px) + 80px) 185px 80px;
}

.blog-hero__inner {
  max-width: var(--nexus-content-w, 1320px);
  margin: 0 auto;
}

.blog-hero__eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 12px;
}

.blog-hero__headline {
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  color: #111;
  margin-bottom: 16px;
}

.blog-hero__sub {
  font-size: 18px;
  color: #555;
  max-width: 560px;
  line-height: 1.6;
}

/* ── Blog Main Section ─────────────────────────────────────────── */
.blog-main {
  background: #FEFCF3;
  padding: 40px 185px 80px;
}

.blog-container {
  max-width: var(--nexus-content-w, 1320px);
  margin: 0 auto;
}

/* ── Filter Bar ────────────────────────────────────────────────── */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.blog-filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
  border: 1.5px solid #BFBFBF;
  background: #fff;
  color: #1a1a1a;
  text-decoration: none;
}

.blog-filter-btn:hover {
  border-color: #888;
  color: #000;
}

.blog-filter-btn.is-active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* ── Toolbar (filters + search + sort) ───────────────────────────
   Used by the Resources Grid Elementor widget. Wraps .blog-filters
   plus the search/sort controls in a single row. ───────────────── */
.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.blog-toolbar .blog-filters {
  margin-bottom: 0;
  flex: 1 1 auto;
}

.blog-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.blog-search {
  position: relative;
  display: flex;
  align-items: center;
}

.blog-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
  display: flex;
}

.blog-search input[type="search"] {
  width: 220px;
  padding: 12px 16px 12px 40px;
  border-radius: 100px;
  border: 1.5px solid #BFBFBF;
  background: #fff;
  font-size: 14px;
  color: #1a1a1a;
  transition: border-color .2s;
}

.blog-search input[type="search"]:focus {
  outline: none;
  border-color: #000;
}

.blog-sort select {
  padding: 12px 36px 12px 18px;
  border-radius: 100px;
  border: 1.5px solid #BFBFBF;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1 6 6 11 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  appearance: none;
  cursor: pointer;
  transition: border-color .2s;
}

.blog-sort select:focus {
  outline: none;
  border-color: #000;
}

/* ── Author byline (Resources Grid widget cards) ─────────────────── */
.blog-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}

.blog-author img {
  border-radius: 50%;
  display: block;
}

.blog-author__name {
  font-weight: 600;
  color: #444;
}

.blog-featured__author {
  margin-top: 4px;
}

.blog-featured__author .blog-author__name {
  font-size: 15px;
  color: #111;
}

/* ── Card footer: author byline + "Read full article" link ───────── */
.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #EEE;
}

.blog-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
  transition: gap .2s;
}

.blog-card__cta:hover {
  gap: 10px;
}

/* ── Featured Post Card ────────────────────────────────────────── */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border: 1px solid #DCDCDC;
  border-radius: 30px;
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 535px;
}

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

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

.blog-featured__img--placeholder {
  background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

.blog-featured__content {
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.blog-featured__title {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  color: #111;
}

.blog-featured__title a {
  color: inherit;
  text-decoration: none;
}

.blog-featured__title a:hover {
  color: #333;
}

.blog-featured__excerpt {
  font-size: 16px;
  color: #555;
  line-height: 1.65;
}

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

.blog-featured__cta {
  align-self: flex-start;
  margin-top: 8px;
}

/* ── Shared Badge Styles ───────────────────────────────────────── */
.blog-cat-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  background: #000;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity .2s;
  align-self: flex-start;
}

.blog-cat-badge:hover {
  opacity: .8;
}

.blog-date-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  background: #DCDCDC;
  color: #444;
  font-size: 12px;
  font-weight: 600;
}

/* ── Blog Grid ─────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

/* ── Blog Card ─────────────────────────────────────────────────── */
.blog-card {
  background: #fff;
  border: 1px solid #DCDCDC;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .2s;
}

.blog-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.10);
  transform: translateY(-3px);
}

.blog-card__img-wrap {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #eee;
}

.blog-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.blog-card:hover .blog-card__img-wrap img {
  transform: scale(1.04);
}

.blog-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

.blog-card__body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.blog-card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
}

.blog-card__title a:hover {
  color: #333;
}

.blog-card__excerpt {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  flex: 1;
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
}

/* ── Empty State ───────────────────────────────────────────────── */
.blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: #555;
  font-size: 18px;
}

.blog-empty p {
  margin-bottom: 24px;
}

/* ── Pagination ────────────────────────────────────────────────── */
.blog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.blog-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 18px;
  border-radius: 100px;
  background: #fff;
  border: 1.5px solid #DCDCDC;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
  background: #000;
  color: #fff;
  border-color: #000;
}

.blog-pagination .page-numbers.dots {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}

/* ── Single Post ───────────────────────────────────────────────── */
.blog-single {
  background: #FEFCF3;
  padding: calc(var(--nexus-nav-h, 143px) + 64px) 185px 96px;
}

.blog-single__container {
  max-width: 860px;
  margin: 0 auto;
}

.blog-single__back {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color .2s;
}

.blog-single__back:hover {
  color: #111;
}

.blog-single__title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.15;
  color: #111;
  margin: 14px 0 16px;
}

.blog-single__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 32px;
}

.blog-single__featured-img {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 40px;
}

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

.blog-single__content {
  font-size: 17px;
  line-height: 1.75;
  color: #333;
}

.blog-single__content p { margin-bottom: 22px; }

.blog-single__content h2 {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  margin: 44px 0 18px;
}

.blog-single__content h3 {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 36px 0 14px;
}

.blog-single__content a {
  color: #111;
  text-decoration: underline;
  text-decoration-color: #FED906;
  text-decoration-thickness: 2px;
}

.blog-single__content ul,
.blog-single__content ol {
  margin: 0 0 22px 22px;
}

.blog-single__content li { margin-bottom: 8px; }

.blog-single__content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 12px 0 28px;
}

.blog-single__content blockquote {
  border-left: 4px solid #FED906;
  padding: 4px 0 4px 24px;
  margin: 28px 0;
  font-size: 19px;
  font-style: italic;
  color: #444;
}

.blog-single__footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid #DCDCDC;
}

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

@media (max-width: 1200px) {
  .blog-hero,
  .blog-main,
  .blog-single { padding-left: 60px; padding-right: 60px; }
}

@media (max-width: 1024px) {
  .blog-featured {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .blog-featured__img {
    aspect-ratio: 16/7;
  }

  .blog-featured__img img {
    height: 100%;
  }

  .blog-featured__content {
    padding: 36px 36px 40px;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: calc(var(--nexus-nav-h, 143px) + 48px) 24px 56px;
  }

  .blog-main {
    padding: 32px 24px 64px;
  }

  .blog-single {
    padding: calc(var(--nexus-nav-h, 143px) + 40px) 24px 64px;
  }

  .blog-single__featured-img {
    margin-bottom: 28px;
  }

  .blog-filters {
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .blog-filters::-webkit-scrollbar { display: none; }

  .blog-filter-btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Toolbar stacks: scrollable filter row on top, search/sort row below.
     Without this, the fixed-width search input forced the actions row
     (and the whole page) wider than the viewport instead of wrapping. */
  .blog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 28px;
  }

  .blog-toolbar-actions {
    width: 100%;
  }

  .blog-search {
    flex: 1 1 auto;
    min-width: 0;
  }

  .blog-search input[type="search"] {
    width: 100%;
  }

  .blog-sort {
    flex-shrink: 0;
  }

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

  .blog-featured__content {
    padding: 28px 24px 32px;
  }
}

@media (max-width: 480px) {
  .blog-hero__headline {
    font-size: 36px;
  }

  .blog-card__body {
    padding: 22px 22px 26px;
  }
}
