/* Advisory cases list (/blog/advisory-cases) ------------------------------- */
/* Values mirror the live page's computed styles at 1440px. */

/* Header ------------------------------------------------------------------- */
.cases-header {
  background-color: #151515;
  background-image:
    linear-gradient(176deg, #000, rgba(0, 0, 0, 0.9) 23%, rgba(22, 22, 22, 0.5)),
    url('/assets/images/cases-header-bg.webp');
  background-size: auto, cover;
  background-position:
    0 0,
    50% 50%;
  color: #fff;
}

.cases-header .container {
  padding-top: 60px;
  padding-bottom: 60px;
}

.cases-headline {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: var(--fs-hero);
  line-height: 1.2;
  color: #fff;
}

.cases-sub {
  margin: 0 0 24px;
  max-width: 400px;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.5;
  color: #fff;
}

/* Rolling strip: subtle hairline top/bottom borders, no edge gradients
   (matches the live cases page's .cases-intro-block wrapper). */
.case-marquee {
  position: relative;
  height: 58px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.case-marquee-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  will-change: transform;
  animation: cases-marquee-scroll 30s linear infinite;
}

@keyframes cases-marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-marquee-track {
    animation: none;
  }
}

.case-marquee-text {
  flex-shrink: 0;
  margin: 0;
  padding: 0 28px;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.95);
}

.case-marquee-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e1512d;
  opacity: 0.9;
}

/* List --------------------------------------------------------------------- */
.cases-list {
  background: #fafafa;
}

.cases-list .container {
  padding-top: 60px;
  padding-bottom: 60px;
}

.cases-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  border: 1px solid rgba(246, 65, 20, 0.3);
  background: rgba(246, 65, 20, 0.05);
}

.cases-notice img {
  width: 20px;
  height: 22px;
}

.cases-notice-text {
  margin: 0;
  font-size: 16px;
  color: #f2542d;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 27px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.cases-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.cases-card-image {
  display: block;
  aspect-ratio: 342 / 240;
  overflow: hidden;
  border: 1px solid #ebebeb;
  border-bottom: 0;
}

.cases-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cases-card:hover .cases-card-image img {
  transform: scale(1.04);
}

.cases-card-body {
  display: block;
  flex: 1;
  padding: 18px;
  background: #fff;
  border: 1px solid #ebebeb;
}

.cases-card-company {
  display: block;
  margin-bottom: 2px;
  font-size: 18px;
  font-weight: 600;
  color: #f2542d;
}

.cases-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 5px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.45;
  color: #161616;
}

.cases-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.5;
  color: #a8a8a8;
}

.cases-item {
  display: flex;
}

.cases-card-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-top: 0;
}

.cases-card-meta-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.cases-card-meta-label {
  flex-shrink: 0;
  font-size: 18px;
  color: #7e8181;
}

.cases-card-meta-value {
  font-size: 18px;
  color: #323232;
  text-align: right;
}

/* Pagination ---------------------------------------------------------------- */
.cases-pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.cases-page-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 10px;
  padding: 9px 20px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  background: #fafafa;
  border: 1px solid #ccc;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.cases-page-link:hover {
  background: #f0f0f0;
  border-color: #aaa;
}

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 991px) {
  .cases-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cases-header {
    padding-top: 56px;
  }

  .cases-sub {
    font-size: 17px;
  }

  .case-marquee-text {
    font-size: 14px;
  }

  .cases-notice {
    height: auto;
    padding: 12px 16px;
    text-align: left;
  }

  .cases-notice-text {
    font-size: 14px;
  }

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