.rn-documents,
.rn-product-documents {
  --rn-doc-brown: #452711;
  --rn-doc-yellow: #ffb400;
  max-width: 1180px;
  margin: 48px auto 72px;
  padding: 38px;
  border-radius: 24px;
  background: #fffaf0;
  color: var(--rn-doc-brown);
  box-shadow: 0 16px 42px rgba(69, 39, 17, .09);
}

.rn-documents__intro {
  max-width: 820px;
  margin-bottom: 28px;
}

.rn-documents__kicker {
  margin: 0 0 8px;
  color: #9b6800;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rn-documents h2,
.rn-product-documents h2 {
  margin: 0 0 12px;
  color: var(--rn-doc-brown);
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.12;
}

.rn-documents__intro > p:last-child,
.rn-product-documents > p {
  margin: 0;
  color: #6e5847;
  font-size: 17px;
  line-height: 1.55;
}

.rn-documents__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rn-documents__group + .rn-documents__group {
  margin-top: 34px;
}

.rn-documents__group h3,
.rn-passports h3 {
  margin: 0 0 16px;
  color: var(--rn-doc-brown);
  font-size: 22px;
}

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

.rn-passport-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 16px;
  border: 1px solid #eadccf;
  border-radius: 14px;
  background: #fff;
  color: var(--rn-doc-brown);
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.rn-passport-link:hover,
.rn-passport-link:focus-visible {
  border-color: var(--rn-doc-yellow);
  color: var(--rn-doc-brown);
  box-shadow: 0 8px 20px rgba(69, 39, 17, .1);
  outline: none;
  text-decoration: none;
  transform: translateY(-2px);
}

.rn-passport-link__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  background: var(--rn-doc-yellow);
  font-size: 12px;
  font-weight: 900;
}

.rn-passport-link__body {
  min-width: 0;
}

.rn-passport-link__body strong,
.rn-passport-link__body small {
  display: block;
}

.rn-passport-link__body small {
  margin-top: 4px;
  color: #816b5a;
}

.rn-passport-link__action {
  color: #8e6100;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.rn-passports--product {
  margin-top: 24px;
}

.rn-document-card,
.rn-product-document {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(150px, 42%) 1fr;
  overflow: hidden;
  border: 1px solid #eadccf;
  border-radius: 16px;
  background: #fff;
  color: var(--rn-doc-brown);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.rn-document-card:hover,
.rn-document-card:focus-visible,
.rn-product-document:hover,
.rn-product-document:focus-visible {
  border-color: var(--rn-doc-yellow);
  color: var(--rn-doc-brown);
  box-shadow: 0 10px 24px rgba(69, 39, 17, .12);
  outline: none;
  transform: translateY(-2px);
}

.rn-document-preview {
  position: relative;
  min-height: 250px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-right: 1px solid #eadccf;
  background: #eeeae5;
  cursor: zoom-in;
}

.rn-document-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .25s ease;
}

.rn-document-preview span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(69, 39, 17, .9);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.rn-document-card:hover .rn-document-preview img,
.rn-product-document:hover .rn-document-preview img {
  transform: scale(1.025);
}

.rn-document-preview:focus-visible {
  outline: 4px solid var(--rn-doc-yellow);
  outline-offset: -4px;
}

.rn-document-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 20px;
}

.rn-document-card__body strong,
.rn-document-card__body small {
  display: block;
}

.rn-document-card__body strong {
  font-size: 16px;
  line-height: 1.35;
}

.rn-document-card__body small {
  margin-top: 5px;
  color: #816b5a;
  line-height: 1.35;
}

.rn-document-card__body > a {
  width: fit-content;
  margin-top: auto;
  padding-top: 18px;
  color: #8e6100;
  font-weight: 800;
  text-decoration: none;
}

.rn-document-card__body > a:hover,
.rn-document-card__body > a:focus-visible {
  color: var(--rn-doc-brown);
  text-decoration: underline;
}

.rn-product-documents {
  max-width: 860px;
}

.rn-product-documents .rn-product-document {
  margin-top: 20px;
}

body.rn-document-modal-open {
  overflow: hidden;
}

.rn-document-modal[hidden] {
  display: none;
}

.rn-document-modal {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.rn-document-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(20, 12, 7, .9);
  cursor: zoom-out;
}

.rn-document-modal__panel {
  position: relative;
  z-index: 1;
  max-width: min(900px, 92vw);
  max-height: 92vh;
}

.rn-document-modal__pages {
  display: flex;
  max-height: 92vh;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  border-radius: 10px;
}

.rn-document-modal__image {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .5);
}

.rn-document-modal__close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0 0 4px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  color: var(--rn-doc-brown);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
  cursor: pointer;
  font: 700 34px/1 Arial, sans-serif;
}

.rn-document-modal__close:hover,
.rn-document-modal__close:focus-visible {
  background: var(--rn-doc-yellow);
  outline: 3px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .rn-documents,
  .rn-product-documents {
    margin: 30px 15px 48px;
    padding: 24px 18px;
    border-radius: 18px;
  }

  .rn-documents__grid {
    grid-template-columns: 1fr;
  }

  .rn-passports__grid {
    grid-template-columns: 1fr;
  }

  .rn-passport-link {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .rn-passport-link__action {
    grid-column: 2;
    white-space: normal;
  }

  .rn-document-card,
  .rn-product-document {
    grid-template-columns: 112px 1fr;
  }

  .rn-document-preview {
    min-height: 190px;
  }

  .rn-document-preview span {
    right: 6px;
    bottom: 6px;
    left: 6px;
    padding: 7px 5px;
    font-size: 11px;
  }

  .rn-document-card__body {
    padding: 14px;
  }

  .rn-document-card__body strong {
    font-size: 14px;
  }

  .rn-document-modal {
    padding: 10px;
  }

  .rn-document-modal__panel,
  .rn-document-modal__pages {
    max-height: 96vh;
  }

  .rn-document-modal__image {
    max-height: 92vh;
  }
}
