/* Блок презентации «Умный двор» (YMS) */
.yms-presentation {
  padding: 64px 0;
  background: linear-gradient(160deg, #eef6fd 0%, #f8fbfe 45%, #fff 100%);
  position: relative;
  overflow: hidden;
}

.yms-presentation::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(9, 131, 234, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 88% 80%, rgba(9, 131, 234, 0.06) 0%, transparent 38%);
  pointer-events: none;
}

.yms-presentation .container {
  position: relative;
  z-index: 1;
}

.yms-presentation__head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 40px;
}

.yms-presentation__download {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
  padding: 0 8px 8px;
}

.yms-presentation__download .btn {
  min-width: auto;
}

.yms-presentation__version {
  margin: 10px 0 0;
  font-size: 13px;
  color: #888;
  text-align: center;
}

.yms-presentation__grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(300px, 1fr);
  gap: 40px;
  align-items: center;
}

.yms-presentation__preview-card {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 16px 48px rgba(9, 131, 234, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(9, 131, 234, 0.08);
}

.yms-presentation__preview-link {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}

.yms-presentation__preview-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

.yms-presentation__preview-link:hover img {
  transform: scale(1.02);
}

.yms-presentation__preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(4, 40, 80, 0.55);
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.yms-presentation__preview-link:hover .yms-presentation__preview-overlay,
.yms-presentation__preview-link:focus .yms-presentation__preview-overlay {
  opacity: 1;
}

.yms-presentation__preview-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0983ea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 24px rgba(9, 131, 234, 0.45);
}

.yms-presentation__preview-overlay span:last-child {
  font-size: 15px;
  font-weight: 600;
}

.yms-presentation__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  padding: 14px 8px 4px;
  font-size: 13px;
  color: #777;
}

.yms-presentation__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.yms-presentation__meta-item strong {
  color: #333;
}

.yms-presentation__lead {
  font-size: 16px;
  color: #444;
  margin: 0 0 24px;
  line-height: 1.65;
}

.yms-presentation__benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.yms-presentation__benefit {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e8eef3;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.yms-presentation__benefit:hover {
  border-color: rgba(9, 131, 234, 0.35);
  box-shadow: 0 6px 20px rgba(9, 131, 234, 0.1);
}

.yms-presentation__benefit-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0983ea, #0465af);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yms-presentation__benefit-text {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  margin: 0;
}

.yms-presentation__inside {
  background: #fff;
  border-left: 4px solid #0983ea;
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.yms-presentation__inside-title {
  font-size: 14px;
  font-weight: 700;
  color: #0983ea;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}

.yms-presentation__inside ul {
  margin: 0;
  padding-left: 18px;
  color: #555;
  font-size: 14px;
  line-height: 1.7;
}

.yms-presentation__actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.yms-presentation__actions .btn {
  min-width: 220px;
}

/* Модальное окно PDF */
.yms-pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.yms-pdf-modal.is-open {
  display: flex;
}

.yms-pdf-modal__dialog {
  width: min(960px, 100%);
  max-height: 92vh;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.yms-pdf-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: #0983ea;
  color: #fff;
}

.yms-pdf-modal__header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.yms-pdf-modal__header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.yms-pdf-modal__header-actions a,
.yms-pdf-modal__close {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.yms-pdf-modal__header-actions a:hover,
.yms-pdf-modal__close:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  text-decoration: none;
}

.yms-pdf-modal__body {
  flex: 1;
  min-height: 0;
  background: #f0f4f8;
}

.yms-pdf-modal__body iframe {
  width: 100%;
  height: min(78vh, 720px);
  border: 0;
  display: block;
}

@media (max-width: 991px) {
  .yms-presentation {
    padding: 48px 0;
  }

  .yms-presentation__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .yms-presentation__benefits {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .yms-presentation__preview-overlay {
    opacity: 1;
    background: rgba(4, 40, 80, 0.35);
  }

  .yms-pdf-modal__header {
    flex-direction: column;
    align-items: flex-start;
  }
}
