/* Case list (single page) */

.page-case-list {
  padding-top: clamp(76px, 10vw, 96px);
}

.page-case-list .cl-main {
  padding-bottom: 48px;
}

/* ---------- Hero ---------- */
.cl-hero {
  position: relative;
  margin: 0;
  color: #fff;
  background: #01032c;
  overflow: hidden;
  /* Image drives height; text overlays */
}

.cl-hero__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.cl-hero__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 110% 85% at 50% 30%, rgba(0, 12, 32, 0) 0%, rgba(0, 10, 28, 0.35) 100%),
    linear-gradient(180deg, rgba(2, 12, 34, 0.38) 0%, rgba(2, 14, 38, 0.58) 52%, rgba(1, 8, 28, 0.78) 100%);
  pointer-events: none;
}

.cl-hero__inner {
  position: relative;
  z-index: 1;
  position: absolute;
  inset: 0;
  padding: clamp(32px, 5vw, 56px) 0 clamp(36px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cl-hero__crumb {
  margin: 0 0 12px;
  font-size: var(--lp-fs-sm);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.cl-hero__crumb a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.cl-hero__crumb a:hover {
  text-decoration: underline;
}

.cl-hero__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cl-hero__lead {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

/* ---------- Toolbar ---------- */
.cl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--lp-gap);
  margin-bottom: 22px;
}

.cl-toolbar__title {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  color: #1f2937;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cl-toolbar__meta {
  margin: 0;
  font-size: var(--lp-fs-sm);
  color: #6b7280;
}

/* ---------- Grid ---------- */
.cl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--lp-gap);
}

@media (min-width: 640px) {
  .cl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cl-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cl-card {
  margin: 0;
}

.cl-card__hit {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.cl-card__hit:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.14);
}

.cl-card__media {
  background: #f3f4f6;
  overflow: hidden;
}

.cl-card__img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.45s ease;
}

.cl-card__hit:hover .cl-card__img {
  transform: scale(1.04);
}

.cl-card__body {
  padding: 14px 14px 16px;
}

.cl-card__name {
  margin: 0;
  font-size: clamp(16px, 1.25vw, 20px);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  text-transform: uppercase;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ---------- Pagination (reuse productlist style idea) ---------- */
.cl-pagination {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  padding: 18px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
}

.cl-pagination__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: var(--lp-fs-md);
  font-weight: 500;
  color: #1f2937;
  text-decoration: none;
  background: #f3f4f6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cl-pagination__step:hover {
  background: #e5e7eb;
  color: #111827;
}

.cl-pagination__nums {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cl-pagination__nums .page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: var(--lp-fs-md);
  color: #374151;
  text-decoration: none;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cl-pagination__nums .page-num:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.cl-pagination__nums .page-num-current {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  font-weight: 600;
  pointer-events: none;
}

/* ---------- Modal card ---------- */
.cl-lock {
  overflow: hidden;
}

.cl-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.cl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
}

.cl-modal__card {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100vw - 32px));
  margin: 7vh auto 0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  max-height: 86vh;
}

.cl-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.6);
  color: #fff;
  cursor: pointer;
  z-index: 3;
}

.cl-modal__close:hover {
  background: rgba(2, 6, 23, 0.72);
}

.cl-modal__media {
  background: #ffffff;
  display: grid;
  place-items: center;
  padding: 14px;
}

.cl-modal__img {
  max-width: 100%;
  max-height: 52vh;
  object-fit: contain;
}

.cl-modal__body {
  padding: 14px 18px 18px;
  overflow: auto;
}

.cl-modal__name {
  text-align: center;
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.cl-modal__params {
  color: #334155;
  line-height: 1.65;
  font-size: var(--lp-fs-md);
}

/* Table styling inside modal params — mimic product detail specs */
.cl-modal__params {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cl-modal__params table {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.cl-modal__params th,
.cl-modal__params td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.cl-modal__params tr:last-child th,
.cl-modal__params tr:last-child td {
  border-bottom: 0;
}

.cl-modal__params th {
  width: 34%;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  text-align: left;
  white-space: nowrap;
}

.cl-modal__params td {
  color: #334155;
}

.cl-modal__params tr:nth-child(even) td {
  background: #fbfdff;
}

.cl-modal__params a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cl-modal__params.is-empty {
  display: none;
}

.cl-modal__params img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ------------------------------------------------------------
   1920+ scaling (match homepage linear scale)
------------------------------------------------------------ */
@media (min-width: 1921px) {
  .cl-hero__title {
    font-size: calc(1.6vw + 12px);
    line-height: 1.18;
  }

  .cl-hero__lead {
    font-size: calc(0.55vw + 9px);
    line-height: 1.8;
  }

  .cl-card__name,
  .cl-modal__name {
    font-size: calc(0.6vw + 14px);
  }

  .cl-card__desc,
  .cl-modal__params {
    font-size: calc(0.55vw + 9px);
    line-height: 1.8;
  }

  .cl-grid,
  .cl-toolbar {
    gap: var(--lp-gap);
  }

  .cl-modal__img {
    max-height: 58vh;
  }
}

