/* Blog pages: listing + article */
.blog-page,
.blog-post-page {
  background: #f5f7fa;
}

.blog-hero,
.blog-post-hero {
  background: #003f87;
  color: #ffffff;
  padding: 170px 0 68px;
}

.blog-hero__container,
.blog-post-hero__container {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.blog-hero__title,
.blog-post-hero__title {
  font-size: clamp(36px, 4.8vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.blog-hero__subtitle,
.blog-post-hero__excerpt {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.45;
}

.blog-hero__newsletter {
  margin: 28px auto 0;
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-hero__newsletter-field {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.blog-hero__newsletter-icon {
  position: absolute;
  left: 18px;
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0.55;
}

.blog-hero__newsletter-input {
    height: 56px;
    width: 100%;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    background: #ffffff;
    padding: 0 20px 0 50px;
    font-size: 15px;
    color: #666666;
    outline: none;
}

.blog-hero__newsletter-input::placeholder {
  color: #666666;
}

.blog-hero__newsletter-input:focus {
  border-color: #1a9ce7;
  background: #ffffff;
}

.blog-hero__newsletter-btn {
  border: none;
  border-radius: 999px;
  height: 56px;
  min-width: 148px;
  padding: 0 28px;
  color: #ffffff;
  background: #1a9ce7;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.blog-hero__newsletter-btn:hover {
  background: #0f8dd9;
}

.blog-listing {
  padding-top: 58px;
  padding-bottom: 84px;
}

.blog-listing__toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.blog-categories {
  width: 100%;
}

.blog-categories__summary {
  list-style: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  user-select: none;
  transition: color 0.2s ease;
}

.blog-categories__summary::-webkit-details-marker {
  display: none;
}

.blog-categories__summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid #1a1a1a;
  border-bottom: 2px solid #1a1a1a;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.blog-categories[open] .blog-categories__summary::after {
  border-right-color: #1a9ce7;
  border-bottom-color: #1a9ce7;
  transform: rotate(-135deg) translateY(-1px);
}

.blog-categories[open] .blog-categories__summary {
  color: #1a9ce7;
}

.blog-categories__panel {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e6ebf0;
  padding: 20px 24px;
}

/* Hierarchical layout */
.blog-categories__all-row {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef1f5;
}

.blog-categories__all {
  text-decoration: none;
  color: #3b4350;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
  transition: background 0.15s, color 0.15s;
}

.blog-categories__all.is-active,
.blog-categories__all:hover {
  background: #ebf7ff;
  color: #0f8dd9;
}

.blog-categories__columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 32px;
}

.blog-categories__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-categories__group-title {
  font-size: 13px;
  font-weight: 600;
  color: #6d7480;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 0;
  margin-bottom: 4px;
}

.blog-categories__item {
  text-decoration: none;
  color: #3b4350;
  border-radius: 8px;
  padding: 9px 14px;
  display: block;
  font-size: 14px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border: 1px solid #E5E5E5;
}

.blog-categories__item:hover {
  background: #f3f6f9;
  color: #1a1a1a;
  border-color: #c8d0da;
}

.blog-categories__item.is-active {
  background: #ebf7ff;
  color: #0f8dd9;
  border-color: #b9ddf6;
  font-weight: 500;
}

.blog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

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

.blog-search__icon {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0.6;
}

.blog-search__input {
  width: 280px;
  border: 1.5px solid #dbe2ea;
  border-radius: 999px;
  height: 48px;
  padding: 0 20px 0 46px;
  background: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  color: #666666;
}

.blog-search__input:focus {
  border-color: #1a9ce7;
  color: #666666;
}

.blog-search__input::placeholder {
  color: #666666;
}

.blog-search__btn {
  border: none;
  border-radius: 999px;
  height: 42px;
  padding: 0 20px;
  color: #ffffff;
  background: #1a9ce7;
  font-weight: 600;
  cursor: pointer;
}

.blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 18px;
}

.blog-post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-post-card__image-link {
  display: block;
  background: #ffffff;
}

.blog-post-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.blog-post-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 26px;
}

.blog-post-chip {
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  padding: 8px 10px;
  background: #f2f4f6;
  color: #6d7480;
}

.blog-post-card__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}

.blog-post-card__title a {
  color: #1a1a1a;
  text-decoration: none;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-card__excerpt {
  margin: 0;
  color: #6d7480;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 63px;
}

.blog-post-card__read {
  color: #1a9ce7;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.blog-empty-state {
  grid-column: 1 / -1;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8ef;
  padding: 26px;
  text-align: center;
  color: #546073;
}

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}

.blog-pagination__page,
.blog-pagination__link {
  text-decoration: none;
  color: #324155;
  height: 36px;
  min-width: 36px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.blog-pagination__page {
  background: #ffffff;
  border: 1px solid #dde5ee;
}

.blog-pagination__page.is-active {
  background: #d9effc;
  border-color: #d9effc;
  color: #00589c;
}

.blog-pagination__link.is-disabled {
  color: #9aa4b5;
}

.blog-post-hero__back {
  text-decoration: none;
  color: #9ec6e6;
  font-size: 14px;
  margin-bottom: 16px;
  display: inline-block;
}

.blog-post-content-wrap {
  padding-top: 48px;
  padding-bottom: 28px;
  max-width: 1060px;
}

.blog-post-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.blog-post-meta {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #6d7480;
  font-size: 13px;
}

.blog-post-content {
  max-width: 820px;
  margin: 0 auto;
  color: #1f2a37;
  line-height: 1.6;
  font-size: 17px;
}

.blog-post-content > * {
  margin-bottom: 18px;
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4 {
  margin: 34px 0 14px;
  color: #111827;
  line-height: 1.25;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  display: block;
}

.blog-recommended {
  padding: 34px 0 12px;
}

.blog-recommended__title {
  margin-bottom: 18px;
  font-size: 40px;
  line-height: 1.15;
}

.blog-about {
  padding: 32px 0 84px;
}

.blog-about__container {
  max-width: 980px;
}

.blog-about__title {
  margin-bottom: 14px;
  font-size: 32px;
}

.blog-about__text {
  color: #4a5565;
  line-height: 1.7;
}

@media (max-width: 1280px) {
  .blog-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 992px) {
  .blog-hero,
  .blog-post-hero {
    padding-top: 140px;
  }

  .blog-listing__toolbar {
    flex-direction: column;
  }

  .blog-search {
    width: 100%;
    min-width: 0;
  }

  .blog-categories {
    width: 100%;
  }

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

  .blog-recommended__title {
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .blog-hero,
  .blog-post-hero {
    padding-top: 118px;
    padding-bottom: 44px;
  }

  .blog-hero__newsletter {
    flex-direction: column;
  }

  .blog-hero__newsletter-btn,
  .blog-hero__newsletter-input {
    width: 100%;
  }

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

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

  .blog-post-content {
    font-size: 16px;
  }

  .blog-recommended__title,
  .blog-about__title {
    font-size: 28px;
  }
}
