.case-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.case-overview__media,
.case-overview__content {
  min-width: 0;
  min-height: 100%;
}

.case-overview__media {
  display: flex;
}

.case-overview__media .cms-case-cover {
  width: 100%;
  min-height: 100%;
  aspect-ratio: 16 / 11;
  object-fit: contain;
  border: 1px solid #294047;
  box-shadow: 0 24px 54px #0004;
}

.case-overview__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border: 1px solid #294047;
  background: #10191e;
}

.case-overview__content h2 {
  margin: 18px 0 10px;
}

.case-overview__content > p {
  line-height: 1.7;
}

.case-overview .service-intro {
  margin: 0;
}

.case-overview .cms-facts {
  margin-top: 18px;
}

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

.case-work-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid #294047;
  background: #0d171b;
}

.case-work-card--wide {
  grid-column: span 2;
}

.case-work-card h3 {
  margin: 0 0 12px;
}

.case-work-card p,
.case-work-card li {
  color: #c7d7d9;
  line-height: 1.7;
}

.case-work-card ul {
  margin: 0;
  padding-left: 20px;
}

.case-work-card li {
  margin: 8px 0;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 26px;
}

.case-metrics div {
  padding: 18px 20px;
  border: 1px solid #294047;
  background: #0d171b;
}

.case-metrics strong {
  display: block;
  color: #a6f20c;
  font-size: clamp(1.45rem, 2.8vw, 2.4rem);
  line-height: 1;
}

.case-metrics span {
  display: block;
  margin-top: 8px;
  color: #b9c9cc;
}

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

.case-screen {
  min-width: 0;
  border: 1px solid #294047;
  background: #0c1519;
  box-shadow: 0 24px 54px #0005;
}

.case-screen--cover {
  grid-column: span 2;
}

.case-screen__top {
  display: flex;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid #294047;
  background: #081014;
}

.case-screen__top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #20d6cc;
}

.case-screen__top span:nth-child(2) {
  background: #a6f20c;
}

.case-screen__top span:nth-child(3) {
  background: #516871;
}

.case-screen__frame {
  min-height: 0;
  padding: 0;
  background: linear-gradient(135deg, #071014, #101b20);
}

.case-screen__zoom {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #071014;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
}

.case-screen__zoom:focus-visible {
  outline: 3px solid #20d6cc;
  outline-offset: -3px;
}

.case-screen__image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  background: #071014;
}

.case-screen__zoom-label {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 8px 11px;
  border: 1px solid rgba(32, 214, 204, .5);
  border-radius: 999px;
  background: rgba(7, 16, 20, .86);
  color: #eff9f8;
  font-size: 12px;
  font-weight: 900;
  opacity: .9;
  transform: translateY(0);
  transition: opacity .18s ease, transform .18s ease;
}

.case-screen__zoom:hover .case-screen__zoom-label,
.case-screen__zoom:focus-visible .case-screen__zoom-label {
  opacity: 1;
}

.case-lightbox {
  width: min(1500px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #294047;
  background: #071014;
  color: #eff9f8;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .72);
}

.case-lightbox::backdrop {
  background: rgba(2, 7, 9, .82);
  backdrop-filter: blur(7px);
}

.case-lightbox__panel {
  display: grid;
  max-height: calc(100vh - 32px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.case-lightbox__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #294047;
  background: #081014;
}

.case-lightbox__header h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.case-lightbox__close {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid #315052;
  border-radius: 50%;
  background: #10191e;
  color: #eff9f8;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.case-lightbox__close:hover,
.case-lightbox__close:focus-visible {
  border-color: #20d6cc;
  color: #20d6cc;
}

.case-lightbox__media {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, .025) 25%, transparent 25%),
    #050b0e;
  background-size: 18px 18px;
}

.case-lightbox__media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 190px);
  margin: 0 auto;
  object-fit: contain;
  box-shadow: 0 18px 54px rgba(0, 0, 0, .48);
}

.case-lightbox__caption {
  margin: 0;
  padding: 15px 20px 18px;
  border-top: 1px solid #294047;
  color: #b9c9cc;
  line-height: 1.6;
}

.case-screen__body {
  padding: 18px 20px;
}

.case-screen__body h3 {
  margin: 0 0 8px;
  font-size: 1.22rem;
}

.case-screen__body p {
  margin: 0;
  color: #b9c9cc;
  line-height: 1.65;
}

.case-ui {
  height: 100%;
  min-height: 284px;
  color: #eff9f8;
}

.case-ui button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 0;
  background: #a6f20c;
  color: #071014;
  font-weight: 900;
}

.case-ui__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.case-ui__tabs span {
  padding: 7px 10px;
  border: 1px solid #315052;
  background: #10191e;
  color: #dff7f5;
  font-size: .88rem;
}

.case-ui--catalog {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
}

.case-ui--catalog aside {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 16px;
  border: 1px solid #315052;
  background: #0b1216;
}

.case-ui--catalog aside b {
  color: #a6f20c;
}

.case-ui--catalog aside span {
  padding: 8px 10px;
  background: #13242a;
  color: #dff7f5;
}

.case-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.case-product-mini {
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid #315052;
  background: #0b1216;
}

.case-product-mini i {
  justify-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  background: #153a22;
  color: #a6f20c;
  font-style: normal;
  font-size: .78rem;
  font-weight: 800;
}

.case-product-mini strong {
  font-size: 1rem;
  line-height: 1.2;
}

.case-product-mini small {
  color: #9fb1b5;
}

.case-product-mini b {
  align-self: end;
  color: #fff;
}

.case-ui--product {
  display: grid;
  grid-template-columns: minmax(170px, .75fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.case-product-photo {
  min-height: 250px;
  display: grid;
  place-items: start;
  padding: 16px;
  border: 1px solid #315052;
  background:
    radial-gradient(circle at 65% 35%, #20d6cc55, transparent 34%),
    linear-gradient(145deg, #0b1216, #162a31);
}

.case-product-photo span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #a6f20c;
  color: #071014;
  font-weight: 900;
}

.case-product-info {
  display: grid;
  align-content: center;
  gap: 13px;
}

.case-product-info h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
}

.case-product-info > strong {
  color: #a6f20c;
  font-size: 1.45rem;
}

.case-product-info ul {
  margin: 0 0 4px;
  padding-left: 20px;
  color: #d8e6e8;
}

.case-product-info li {
  margin: 7px 0;
}

.case-ui--checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .75fr);
  gap: 16px;
}

.case-checkout-list {
  display: grid;
  gap: 12px;
}

.case-checkout-list div,
.case-phone__item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #315052;
  background: #0b1216;
}

.case-checkout-list span,
.case-phone__item span {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #20d6cc, #a6f20c);
}

.case-checkout-list p,
.case-phone__item p {
  margin: 0;
  line-height: 1.3;
}

.case-checkout-list b,
.case-phone__item b {
  white-space: nowrap;
  color: #a6f20c;
}

.case-checkout-side {
  padding: 16px;
  border: 1px solid #315052;
  background: #10191e;
}

.case-checkout-side h3 {
  margin: 0 0 14px;
}

.case-ui--admin {
  display: grid;
  gap: 16px;
}

.case-admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.case-admin-stats span {
  padding: 14px;
  border: 1px solid #315052;
  background: #0b1216;
  color: #dff7f5;
  font-weight: 800;
}

.case-admin-table {
  display: grid;
  gap: 10px;
}

.case-admin-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 58px;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid #315052;
  background: #0b1216;
}

.case-admin-table b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-admin-table span {
  color: #a6f20c;
}

.case-admin-table i {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #a6f20c 72%, #294047 72%);
}

.case-ui--mobile {
  display: grid;
  place-items: center;
}

.case-phone {
  width: min(260px, 100%);
  min-height: 500px;
  padding: 18px;
  border: 8px solid #061014;
  border-radius: 30px;
  background: #0b1216;
  box-shadow: 0 18px 44px #0008;
}

.case-phone__hero {
  min-height: 126px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid #315052;
  background: linear-gradient(135deg, #12383e, #162a31);
  font-weight: 900;
}

.case-phone .case-ui__tabs {
  overflow: hidden;
  flex-wrap: nowrap;
}

.case-phone .case-ui__tabs span {
  white-space: nowrap;
}

.case-ui--seo {
  display: grid;
  align-content: center;
  gap: 10px;
}

.case-ui--seo div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #315052;
  background: #0b1216;
}

.case-ui--seo span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-ui--seo b {
  color: #a6f20c;
}

.case-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.case-detail-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid #294047;
  border-top: 3px solid #a6f20c;
  background: #10191e;
}

.case-detail-card h3 {
  margin: 0 0 10px;
}

.case-detail-card p {
  color: #c7d7d9;
  line-height: 1.65;
}

.case-detail-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-detail-card span {
  padding: 7px 9px;
  border: 1px solid #315052;
  background: #0b1216;
  color: #dff7f5;
  font-size: .88rem;
}

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

.case-process article {
  padding: 22px;
  border: 1px solid #294047;
  background: #0d171b;
}

.case-process span {
  color: #a6f20c;
  font-weight: 900;
}

.case-process h3 {
  margin: 10px 0;
}

.case-process p {
  color: #c7d7d9;
  line-height: 1.65;
}

@media (max-width: 980px) {
  .case-overview,
  .case-work-grid {
    grid-template-columns: 1fr;
  }

  .case-work-card--wide {
    grid-column: auto;
  }

  .case-screen-grid {
    grid-template-columns: 1fr;
  }

  .case-screen--cover {
    grid-column: auto;
  }

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

  .case-process,
  .case-metrics {
    grid-template-columns: 1fr;
  }

  .case-ui--catalog,
  .case-ui--product,
  .case-ui--checkout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .case-overview__content,
  .case-work-card {
    padding: 18px;
  }

  .case-screen__frame {
    min-height: auto;
  }

  .case-screen__image {
    min-height: 0;
  }

  .case-lightbox {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
  }

  .case-lightbox__panel {
    max-height: calc(100vh - 18px);
  }

  .case-lightbox__header,
  .case-lightbox__caption {
    padding-right: 14px;
    padding-left: 14px;
  }

  .case-lightbox__media {
    padding: 10px;
  }

  .case-lightbox__media img {
    max-height: calc(100vh - 178px);
  }

  .case-product-grid,
  .case-admin-stats {
    grid-template-columns: 1fr;
  }

  .case-detail-grid {
    grid-template-columns: 1fr;
  }

  .case-admin-table div {
    grid-template-columns: 1fr;
  }

  .case-checkout-list div,
  .case-phone__item {
    grid-template-columns: 38px 1fr;
  }

  .case-checkout-list b,
  .case-phone__item b {
    grid-column: 2;
  }

  .case-screen__body {
    padding: 16px;
  }

  .case-phone {
    min-height: 430px;
  }
}
