/* Public blog index (/blog/) — Document360-inspired listing layout. */

.blog-page-content {
  --blog-ink: #111827;
  --blog-copy: #283449;
  --blog-muted: #758094;
  --blog-blue: var(--t-color-action, #2563eb);
  --blog-blue-dark: var(--t-color-action-hover, #1d4ed8);
  --blog-border: #e4e7ec;
  --blog-hero: #eef3fb;
  width: 100%;
  overflow: visible;
  color: var(--blog-ink);
  background: #fff;
  font-family: var(--t-font-body, "Work Sans", system-ui, sans-serif);
}

.blog-page-content *,
.blog-page-content *::before,
.blog-page-content *::after {
  box-sizing: border-box;
}

/* Hero */
.blog-hero {
  width: 100%;
  padding: clamp(44px, 4vw, 52px) 24px 22px;
  text-align: center;
  background: linear-gradient(180deg, var(--blog-hero) 0%, #f8fbff 100%);
}

.blog-hero__inner {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.blog-hero__eyebrow {
  margin: 0 0 12px;
  color: var(--blog-blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.blog-page-content .blog-hero__title {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  color: var(--blog-ink);
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

@media (min-width: 641px) {
  .blog-page-content .blog-hero__title {
    white-space: nowrap;
  }
}

.blog-hero__title span {
  color: transparent;
  background: linear-gradient(92deg, #0ea5e9 0%, #2563eb 50%, #7245e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.blog-hero__subtitle {
  max-width: 880px;
  margin: 16px auto 0;
  color: var(--blog-muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
}

@media (min-width: 900px) {
  .blog-hero__subtitle {
    white-space: nowrap;
  }
}

.blog-search-dock {
  position: -webkit-sticky;
  position: sticky;
  top: 86px;
  z-index: 19;
  width: 100%;
  margin-bottom: 0;
  padding: 12px 24px 0;
  border-bottom: 1px solid rgba(203, 213, 225, 0.72);
  background: rgba(248, 251, 255, 0.96);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.blog-search-dock__inner {
  width: min(1024px, 100%);
  margin: 0 auto;
}

.blog-hero-search {
  width: min(650px, 100%);
  height: 50px;
  margin: 0 auto;
  padding: 0 7px 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e2e4e9;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(47, 43, 67, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.blog-hero-search:focus-within {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 10px 26px rgba(47, 43, 67, 0.08);
}

.blog-hero-search > svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: #96a0b2;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.blog-hero-search input[type="search"] {
  min-width: 0;
  height: 100%;
  flex: 1 1 auto;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--blog-ink);
  background: transparent;
  font: inherit;
  font-size: 0.94rem;
  box-shadow: none;
  appearance: none;
}

.blog-hero-search input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.blog-hero-search input[type="search"]::placeholder {
  color: #8b95a6;
  opacity: 1;
}

.blog-hero-search button {
  height: 38px;
  flex: 0 0 auto;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--blog-blue);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.blog-hero-search button:hover {
  background: var(--blog-blue-dark);
  transform: translateY(-1px);
}

/* Listing shell */
.blog-list-shell {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 78px;
}

.blog-messages {
  margin: 0 0 22px;
}

.blog-message {
  padding: 13px 16px;
  border-radius: 10px;
  color: #1e40af;
  background: #eff6ff;
  font-size: 0.9rem;
}

.blog-message.success {
  color: #166534;
  background: #ecfdf3;
}

.blog-message.error {
  color: #991b1b;
  background: #fef2f2;
}

.blog-list-toolbar {
  min-height: 32px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.blog-breadcrumb {
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  padding: 7px 13px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  border-radius: 999px;
  color: #667085;
  background: #f4efff;
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.2;
}

.blog-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #6c38dd;
  text-decoration: none;
}

.blog-breadcrumb a:hover {
  color: #4f22b1;
}

.blog-breadcrumb svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-clear-filters {
  flex: 0 0 auto;
  color: var(--blog-blue);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.blog-clear-filters:hover {
  color: var(--blog-blue-dark);
  text-decoration: underline;
}

/* Cards */
.blog-grid-section {
  padding: 0;
}

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

.blog-card {
  min-width: 0;
  min-height: 530px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--blog-border);
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: #d0d5dd;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.08);
}

.blog-card__thumb {
  position: relative;
  margin: 0;
  display: block;
  overflow: hidden;
  aspect-ratio: 2048 / 1165;
  border: 1px solid rgb(226 228 231 / 8%);
  border-radius: 18px;
  background: #f2f4f7;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  text-decoration: none;
}

.blog-card__thumb img,
.blog-card__thumb-placeholder {
  width: 100%;
  height: 100%;
  display: block;
}

.blog-card__thumb img {
  object-fit: cover;
  transition: transform 380ms ease;
}

.blog-card:hover .blog-card__thumb img {
  transform: scale(1.035);
}

.blog-card__thumb-placeholder {
  display: grid;
  place-items: center;
  color: #94a3b8;
  background:
    radial-gradient(circle at 72% 28%, rgba(114, 69, 232, 0.18), transparent 28%),
    linear-gradient(135deg, #eff6ff, #f7f1ff);
}

.blog-card__thumb-placeholder svg {
  width: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-card__read-time {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 15px;
  color: #fff;
  background: rgba(52, 55, 65, 0.72);
  box-shadow: 0 2px 5px rgba(16, 24, 40, 0.12);
  backdrop-filter: blur(5px);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.3;
}

.blog-card__content {
  min-height: 0;
  padding: 24px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.blog-card__body {
  display: flex;
  flex-direction: column;
}

.blog-card__category {
  margin: 0 0 20px;
  align-self: flex-start;
  color: var(--blog-blue);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: uppercase;
}

.blog-card__category--indigo {
  color: #4338ca;
}

.blog-card__category--purple {
  color: #7c3aed;
}

.blog-card__category--green {
  color: #02a639;
}

.blog-card__category--olive {
  color: #879900;
}

.blog-card__category--teal {
  color: #00a8bd;
}

.blog-card__category--pink {
  color: #db2777;
}

.blog-card__category--red {
  color: #dc2626;
}

.blog-card__category--orange {
  color: #ea580c;
}

.blog-card__category--brown {
  color: #b25e09;
}

.blog-page-content .blog-card__title {
  margin: 0;
  padding: 0 0 8px;
  color: var(--blog-ink);
  font-family: var(--t-font-body, "Work Sans", system-ui, sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: normal;
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.blog-card__title a:hover,
.blog-card__title a:focus-visible {
  color: var(--blog-blue);
}

.blog-card__meta {
  margin: 0;
  padding: 0 0 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: #6c757d;
  font-size: 0.875rem;
  line-height: 1.3;
}

.blog-page-content .blog-card__excerpt {
  margin: 0 0 20px;
  padding: 0;
  color: var(--blog-ink);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  display: -webkit-box !important;
  max-height: 4.8em;
  overflow: hidden !important;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  line-clamp: 3;
}

.blog-card__read-link {
  width: fit-content;
  margin: auto 0 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blog-blue);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  text-decoration: none;
}

.blog-card__read-link:hover {
  color: var(--blog-blue-dark);
}

.blog-card__read-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms ease;
}

.blog-card__read-link:hover svg {
  transform: translate(2px, -2px);
}

/* Empty state */
.blog-empty {
  padding: 72px 28px;
  border: 1px dashed #d0d5dd;
  border-radius: 16px;
  text-align: center;
  color: var(--blog-muted);
  background: #fafbfc;
}

.blog-empty__title {
  margin: 0 0 8px;
  color: var(--blog-ink);
  font-size: 1.3rem;
  font-weight: 750;
}

.blog-empty p {
  margin: 0 0 18px;
}

.blog-empty a {
  color: var(--blog-blue);
  font-weight: 650;
}

/* Pagination */
.blog-pagination {
  width: 100%;
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.blog-pagination__rule {
  height: 1px;
  min-width: 24px;
  flex: 1 1 auto;
  background: #e4e7ec;
}

.blog-pagination__items {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.blog-pagination__page,
.blog-pagination__direction,
.blog-pagination__ellipsis {
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 550;
  text-decoration: none;
}

.blog-pagination__direction {
  padding: 0 7px;
  gap: 3px;
}

.blog-pagination__direction svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-pagination__page:hover,
.blog-pagination__direction:hover {
  color: var(--blog-blue);
  background: #eff4ff;
}

.blog-pagination__page.is-current {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.24);
  font-weight: 700;
}

.blog-pagination__ellipsis {
  min-width: 24px;
}

@media (max-width: 960px) {
  .blog-list-shell {
    width: min(100% - 40px, 760px);
  }

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

@media (max-width: 1100px) {
  .blog-search-dock {
    top: 74px;
  }
}

@media (max-width: 640px) {
  .blog-hero {
    padding: 42px 18px 20px;
  }

  .blog-page-content .blog-hero__title {
    display: block;
    overflow: visible;
    font-size: 1.75rem;
    line-height: 1.25;
    white-space: normal;
  }

  .blog-hero__subtitle {
    margin-top: 16px;
  }

  .blog-hero-search {
    height: 50px;
    padding-right: 14px;
  }

  .blog-search-dock {
    margin-bottom: 0;
    padding: 10px 16px 0;
  }

  .blog-hero-search button {
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .blog-list-shell {
    width: calc(100% - 32px);
    padding: 30px 0 56px;
  }

  .blog-list-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
  }

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

  .blog-card {
    min-height: 0;
  }

  .blog-card__content {
    min-height: 290px;
  }

  .blog-page-content .blog-card__title {
    font-size: 1rem;
    line-height: 1.6;
  }

  .blog-pagination {
    margin-top: 32px;
    gap: 7px;
  }

  .blog-pagination__rule {
    display: none;
  }

  .blog-pagination__items {
    width: 100%;
    flex-wrap: wrap;
  }

  .blog-pagination__page,
  .blog-pagination__direction,
  .blog-pagination__ellipsis {
    min-width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .blog-card__thumb img,
  .blog-card__read-link svg,
  .blog-hero-search button {
    transition: none;
  }
}
