.rp-case-page,
.rp-case-page *,
.rp-gallery-page,
.rp-gallery-page * {
  box-sizing: border-box;
}

.rp-case-page,
.rp-gallery-page {
  color: #151515;
  background: #fff;
  font-family: Montserrat, Manrope, Arial, sans-serif;
}

.rp-case-wrap,
.rp-gallery-wrap {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

.rp-case-page a,
.rp-gallery-page a {
  text-underline-offset: 3px;
}

.rp-case-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 0;
  color: #5f6470;
  font-size: 14px;
  line-height: 1.5;
}

.rp-case-breadcrumbs a {
  color: #5f6470;
}

.rp-case-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  gap: 54px;
  align-items: center;
  padding: 44px 0 38px;
}

.rp-case-kicker,
.rp-gallery-kicker {
  margin: 0 0 12px;
  color: #b4149d;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 800;
  text-transform: uppercase;
}

.rp-case-hero h1,
.rp-gallery-hero h1 {
  margin: 0;
  color: #111;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.rp-case-lead,
.rp-gallery-hero p {
  margin: 20px 0 0;
  color: #4f5562;
  font-size: 18px;
  line-height: 1.7;
}

.rp-case-figure {
  margin: 0;
}

.rp-case-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  border-radius: 8px;
}

.rp-case-figure figcaption {
  padding-top: 9px;
  color: #6a6f79;
  font-size: 13px;
  line-height: 1.5;
}

.rp-case-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #dedfe3;
  border-bottom: 1px solid #dedfe3;
}

.rp-case-fact {
  min-width: 0;
  padding: 22px 20px;
  border-right: 1px solid #dedfe3;
}

.rp-case-fact:first-child {
  padding-left: 0;
}

.rp-case-fact:last-child {
  padding-right: 0;
  border-right: 0;
}

.rp-case-fact span {
  display: block;
  margin-bottom: 7px;
  color: #707580;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
}

.rp-case-fact strong {
  display: block;
  color: #171717;
  font-size: 15px;
  line-height: 1.5;
}

.rp-case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 64px;
  align-items: start;
  padding: 54px 0 70px;
}

.rp-case-content section {
  padding: 0 0 34px;
  margin: 0 0 36px;
  border-bottom: 1px solid #e5e6e9;
}

.rp-case-content section:last-child {
  margin-bottom: 0;
}

.rp-case-content h2,
.rp-gallery-cta h2 {
  margin: 0 0 16px;
  color: #111;
  font-size: 30px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: 0;
}

.rp-case-content p {
  margin: 0 0 16px;
  color: #30343b;
  font-size: 17px;
  line-height: 1.75;
}

.rp-case-content p:last-child {
  margin-bottom: 0;
}

.rp-case-result {
  margin: 28px 0 38px;
}

.rp-case-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0 38px;
}

.rp-case-crop {
  margin: 0;
}

.rp-case-crop-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  border-radius: 8px;
  background: #f2f3f5;
}

.rp-case-crop-media img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

.rp-case-crop--after .rp-case-crop-media img {
  transform: translateY(-50%);
}

.rp-case-crop figcaption {
  padding-top: 8px;
  color: #5d626c;
  font-size: 13px;
  line-height: 1.45;
}

.rp-case-aside {
  position: sticky;
  top: 18px;
}

.rp-case-price {
  padding: 24px;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  background: #fff;
}

.rp-case-price h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

.rp-case-price p {
  margin: 0 0 18px;
  color: #5d626c;
  font-size: 14px;
  line-height: 1.6;
}

.rp-case-price strong {
  display: block;
  margin-bottom: 8px;
  color: #b4149d;
  font-size: 27px;
  line-height: 1.2;
}

.rp-case-price small {
  display: block;
  color: #696e77;
  font-size: 12px;
  line-height: 1.55;
}

.rp-case-button,
.rp-gallery-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #b4149d;
  border-radius: 8px;
  background: #b4149d;
  color: #fff !important;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
}

.rp-case-button:hover,
.rp-gallery-button:hover {
  background: #921181;
  border-color: #921181;
}

.rp-case-price .rp-case-button {
  width: 100%;
  margin-top: 18px;
}

.rp-case-links {
  display: grid;
  gap: 2px;
  margin-top: 18px;
}

.rp-case-links a {
  padding: 11px 0;
  border-bottom: 1px solid #e5e6e9;
  color: #24272d;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  text-decoration: none;
}

.rp-case-links a:hover {
  color: #b4149d;
}

.rp-case-recommendation {
  padding: 24px;
  border-left: 4px solid #b4149d;
  background: #f7f7f8;
}

.rp-case-recommendation h2 {
  font-size: 25px;
}

.rp-case-faq details {
  border-top: 1px solid #dedfe3;
}

.rp-case-faq details:last-child {
  border-bottom: 1px solid #dedfe3;
}

.rp-case-faq summary {
  padding: 18px 34px 18px 0;
  cursor: pointer;
  color: #171717;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
}

.rp-case-faq details p {
  padding-bottom: 18px;
  color: #4f5562;
  font-size: 15px;
}

.rp-case-cta {
  padding: 42px 0;
  background: #171717;
  color: #fff;
}

.rp-case-cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
}

.rp-case-cta h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 30px;
  line-height: 1.2;
}

.rp-case-cta p {
  margin: 0;
  color: #d7d7da;
  font-size: 16px;
  line-height: 1.6;
}

.rp-gallery-page {
  padding: 50px 0 70px;
}

.rp-gallery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  padding-bottom: 34px;
  border-bottom: 1px solid #dedfe3;
}

.rp-gallery-hero h1 {
  max-width: 820px;
}

.rp-gallery-hero p {
  max-width: 800px;
}

.rp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 34px;
}

.rp-work-card {
  overflow: hidden;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  background: #fff;
}

.rp-work-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 260px;
  background: #f2f3f5;
}

.rp-work-photos--single {
  grid-template-columns: 1fr;
}

.rp-work-photo {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 260px;
  background: #f2f3f5;
}

.rp-work-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.rp-work-photo span {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(17, 17, 17, 0.88);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

.rp-work-photo-after span {
  background: #b4149d;
}

.rp-work-body {
  padding: 20px;
}

.rp-work-body h2 {
  margin: 0 0 9px;
  color: #111;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 800;
}

.rp-work-body p {
  margin: 0 0 16px;
  color: #555b66;
  font-size: 15px;
  line-height: 1.6;
}

.rp-work-case-link {
  color: #a81393;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 800;
}

.rp-work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.rp-work-tags span {
  padding: 6px 9px;
  border: 1px solid #dedfe3;
  border-radius: 6px;
  color: #5f6470;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.rp-gallery-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  margin-top: 38px;
  padding-top: 34px;
  border-top: 1px solid #dedfe3;
}

.rp-gallery-cta p {
  margin: 0;
  color: #555b66;
  font-size: 16px;
  line-height: 1.65;
}

@media (max-width: 960px) {
  .rp-case-hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

  .rp-case-fact:nth-child(2) {
    border-right: 0;
  }

  .rp-case-fact:nth-child(-n + 2) {
    border-bottom: 1px solid #dedfe3;
  }

  .rp-case-fact:nth-child(3) {
    padding-left: 0;
  }

  .rp-case-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .rp-case-aside {
    position: static;
  }

  .rp-gallery-hero,
  .rp-gallery-cta {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .rp-case-wrap,
  .rp-gallery-wrap {
    width: min(100% - 28px, 1140px);
  }

  .rp-case-breadcrumbs {
    padding-top: 18px;
    font-size: 13px;
  }

  .rp-case-hero {
    padding: 30px 0;
  }

  .rp-case-hero h1,
  .rp-gallery-hero h1 {
    font-size: 31px;
    line-height: 1.14;
  }

  .rp-case-lead,
  .rp-gallery-hero p {
    margin-top: 15px;
    font-size: 16px;
    line-height: 1.65;
  }

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

  .rp-case-fact,
  .rp-case-fact:first-child,
  .rp-case-fact:nth-child(3) {
    padding: 17px 0;
    border-right: 0;
    border-bottom: 1px solid #dedfe3;
  }

  .rp-case-fact:last-child {
    border-bottom: 0;
  }

  .rp-case-layout {
    padding: 38px 0 50px;
  }

  .rp-case-content h2,
  .rp-gallery-cta h2 {
    font-size: 25px;
  }

  .rp-case-content p {
    font-size: 16px;
    line-height: 1.7;
  }

  .rp-case-split,
  .rp-gallery-grid {
    grid-template-columns: 1fr;
  }

  .rp-case-cta {
    padding: 34px 0;
  }

  .rp-case-cta-inner {
    grid-template-columns: 1fr;
  }

  .rp-case-cta .rp-case-button,
  .rp-gallery-button {
    width: 100%;
  }

  .rp-gallery-page {
    padding: 34px 0 52px;
  }

  .rp-work-photos {
    min-height: 190px;
  }

  .rp-work-photo,
  .rp-work-photo img {
    min-height: 190px;
  }
}

@media (max-width: 420px) {
  .rp-work-photos {
    grid-template-columns: 1fr;
  }

  .rp-work-photos--single {
    grid-template-columns: 1fr;
  }

  .rp-case-price,
  .rp-case-recommendation,
  .rp-work-body {
    padding: 18px;
  }
}
