:root {
  --nm-managed-ink: #123f5a;
  --nm-managed-muted: #5d7480;
  --nm-managed-accent: #2daae1;
  --nm-managed-surface: #ffffff;
  --nm-managed-soft: #eef8fc;
  --nm-managed-border: rgba(13, 64, 88, 0.12);
  --nm-managed-shadow: 0 22px 54px rgba(8, 55, 78, 0.1);
}

.nm-managed-section {
  padding: clamp(56px, 7vw, 88px) 0;
  background: linear-gradient(145deg, #f8fcfe, #edf7fb);
  color: var(--nm-managed-muted);
}

.nm-managed-section:nth-of-type(even) {
  background: #fff;
}

.nm-managed-section__title {
  margin: 0 0 34px;
  color: var(--nm-managed-ink);
  font-size: clamp(28px, 3.3vw, 42px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-align: center;
}

.nm-managed-section__title::after {
  display: block;
  width: 58px;
  height: 4px;
  margin: 16px auto 0;
  border-radius: 999px;
  background: var(--nm-managed-accent);
  content: "";
}

.nm-managed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.nm-review-card,
.nm-branch-card,
.nm-faq-item {
  border: 1px solid var(--nm-managed-border);
  border-radius: 20px;
  background: var(--nm-managed-surface);
  box-shadow: var(--nm-managed-shadow);
}

.nm-review-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 26px;
}

.nm-review-card__rating {
  margin-bottom: 18px;
  color: #e1a832;
  font-size: 17px;
  letter-spacing: 0.14em;
}

.nm-review-card__text {
  flex: 1;
  color: #405b68;
  font-size: 15px;
  line-height: 1.7;
}

.nm-review-card__text > :last-child,
.nm-branch-card__content > :last-child,
.nm-faq-item__answer > :last-child {
  margin-bottom: 0;
}

.nm-review-card footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--nm-managed-border);
}

.nm-review-card footer strong {
  color: var(--nm-managed-ink);
}

.nm-review-card footer span {
  color: var(--nm-managed-muted);
  font-size: 13px;
}

.nm-review-card footer a {
  margin-left: auto;
  font-size: 12px;
}

.nm-faq-list {
  display: grid;
  max-width: 920px;
  gap: 14px;
  margin: 0 auto;
}

.nm-faq-item {
  overflow: hidden;
}

.nm-faq-item summary {
  position: relative;
  padding: 20px 58px 20px 22px;
  color: var(--nm-managed-ink);
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
}

.nm-faq-item summary::-webkit-details-marker {
  display: none;
}

.nm-faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 22px;
  color: var(--nm-managed-accent);
  font-size: 24px;
  font-weight: 400;
  transform: translateY(-50%);
  content: "+";
}

.nm-faq-item[open] summary::after {
  content: "−";
}

.nm-faq-item__answer {
  padding: 0 22px 22px;
  color: #405b68;
  line-height: 1.7;
}

.nm-branch-card {
  overflow: hidden;
  padding: 24px;
}

.nm-branch-card__image {
  margin: -24px -24px 22px;
}

.nm-branch-card__image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.nm-branch-card h3 {
  margin: 0 0 14px;
  color: var(--nm-managed-ink);
  font-size: 23px;
  font-weight: 730;
  line-height: 1.25;
}

.nm-branch-card__links {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.nm-branch-card__links a {
  color: #167ba7;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.nm-branch-card__content {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--nm-managed-border);
}

.nm-managed-gallery figure {
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: #dcebf2;
}

.nm-managed-gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup .contact__form {
  position: relative;
}

.nm-popup-close {
  display: grid;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(13, 64, 88, 0.14);
  border-radius: 50%;
  background: #eef8fc;
  color: var(--nm-managed-ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.nm-popup-close:hover,
.nm-popup-close:focus-visible {
  border-color: var(--nm-managed-accent);
  background: var(--nm-managed-accent);
  color: #fff;
}

.nm-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 38px auto 0;
}

.nm-pagination .page-numbers {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--nm-managed-border);
  border-radius: 10px;
  background: #fff;
  color: var(--nm-managed-ink);
  font-weight: 700;
}

.nm-pagination .current,
.nm-pagination a:hover,
.nm-pagination a:focus-visible {
  border-color: var(--nm-managed-accent);
  background: var(--nm-managed-accent);
  color: #fff;
}

@media (max-width: 900px) {
  .nm-managed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .nm-managed-section {
    padding: 48px 0;
  }

  .nm-managed-grid {
    grid-template-columns: 1fr;
  }

  .nm-review-card,
  .nm-branch-card {
    border-radius: 16px;
  }
}
