/* Shared enhancements for the blog listing and article pages. */
.blog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.blog-search {
  position: relative;
  flex: 1 1 360px;
  max-width: 480px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.blog-search i {
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--gray);
  transform: translateY(-50%);
  pointer-events: none;
}

.blog-search input {
  width: 100%;
  min-height: 48px;
  padding: 11px 42px 11px 44px;
  color: var(--dark);
  background: #fff;
  border: 1px solid #CBDCE1;
  border-radius: 10px;
  font: inherit;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2,168,212, 0.14);
}

.blog-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  display: none;
  width: 34px;
  height: 34px;
  color: var(--gray);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  transform: translateY(-50%);
}

.blog-search-clear.is-visible {
  display: inline-grid;
  place-items: center;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.blog-filter {
  min-height: 42px;
  padding: 9px 15px;
  color: var(--gray);
  background: #fff;
  border: 1px solid #CBDCE1;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.blog-filter:hover,
.blog-filter.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.blog-results-summary {
  margin: -16px 0 24px;
  color: var(--gray);
  font-size: 14px;
}

.blog-empty {
  display: none;
  padding: 44px 24px;
  text-align: center;
  background: var(--light);
  border: 1px dashed #CBDCE1;
  border-radius: 12px;
}

.blog-empty.is-visible {
  display: block;
}
.blog-empty i {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 30px;
}
.blog-empty h2 {
  margin-bottom: 6px;
  font-size: 20px;
}
.blog-empty p {
  color: var(--gray);
}
.blog-card[hidden] {
  display: none;
}
.blog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: default;
}

.blog-card .blog-image {
  flex: 0 0 auto;
}

.blog-card .blog-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px;
}

.blog-card .blog-title {
  margin-bottom: 12px;
  font-size: clamp(1.22rem, 2vw, 1.42rem);
  line-height: 1.35;
}

.blog-card .blog-excerpt {
  flex: 1;
  margin-bottom: 20px;
}

.blog-card .blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.blog-card .blog-meta span,
.mall-guide .meta span,
.mall-guide .mall-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.blog-card .blog-meta i,
.mall-guide .meta i,
.mall-guide .mall-location i {
  display: inline-grid;
  place-items: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  line-height: 1;
  text-align: center;
}

.blog-card .read-more {
  align-self: flex-start;
  margin-top: 15px;
}

.blog-card .read-more i,
.mall-guide .cta a i,
.article-share-actions i {
  display: inline-grid;
  place-items: center;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin: 0;
  line-height: 1;
}
.blog-card:focus-within {
  outline: 3px solid rgba(2,168,212, 0.22);
  outline-offset: 3px;
}
.blog-title a {
  color: inherit;
  text-decoration: none;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  width: 0;
  height: 3px;
  background: var(--primary, #02A8D4);
  transition: width 0.08s linear;
}

.article-toc {
  margin: 0 auto 32px;
  padding: 22px 24px;
  background: #F8FBFC;
  border: 1px solid #E2EDF0;
  border-radius: 12px;
}

.article-toc h2 {
  margin: 0 0 12px !important;
  font-size: 18px !important;
}

.article-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 0 !important;
  padding-left: 20px !important;
}

.article-toc a {
  color: #334E55;
  text-decoration: none;
}

.article-toc a:hover {
  color: var(--primary);
}
.article-content h2[id] {
  scroll-margin-top: 100px;
}

.article-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 42px;
  padding: 20px;
  background: #F8FBFC;
  border: 1px solid #E2EDF0;
  border-radius: 12px;
}

.article-share strong {
  font-family: "Manrope", sans-serif;
}
.article-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-share button,
.article-share a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 13px;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.article-share .share-whatsapp {
  background: #00738F;
}
.article-share .share-facebook {
  background: #02A8D4;
}
.article-share .share-instagram {
  background: linear-gradient(135deg, #833ab4, #e1306c 58%, #fcaf45);
}
.article-share .share-copy {
  color: var(--dark);
  background: #E2EDF0;
}

.share-status {
  width: 100%;
  margin: 8px 0 0;
  color: #476269;
  font-size: 12px;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .blog-card .blog-content {
    padding: 22px 20px;
  }
  .blog-tools {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .blog-search {
    flex-basis: auto;
    max-width: none;
  }
  .blog-filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .blog-filter {
    flex: 0 0 auto;
  }
  .article-toc ol {
    grid-template-columns: 1fr;
  }
  .article-share {
    align-items: flex-start;
    flex-direction: column;
  }
  .mall-guide .article-content {
    padding-right: 0;
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress {
    transition: none;
  }
}
