/* Video Demo Button in Hero Section */
.description-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 520px;
}

.btn-watch-demo {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 14px;
  background: rgba(14, 45, 88, 0.6);
  border: 1px solid rgba(114, 145, 249, 0.45);
  border-radius: 999px;
  color: var(--color-grey);
  cursor: pointer;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  position: relative;
  white-space: nowrap;
}

.btn-watch-demo:hover {
  background: rgba(18, 54, 105, 0.85);
  border-color: #8fa8ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(114, 145, 249, 0.35);
}

.btn-watch-demo:active {
  transform: translateY(0);
}

.watch-demo-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-red) 0%, #c82c42 100%);
  box-shadow: 0 2px 10px rgba(233, 66, 89, 0.45);
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-watch-demo:hover .watch-demo-icon-wrapper {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(233, 66, 89, 0.65);
}

/* Pure CSS play triangle - 100% immune to SVG style leaks */
.watch-demo-play-triangle {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 9px solid #ffffff;
  margin-left: 2px;
}

.watch-demo-text {
  font: var(--font-c2);
  color: var(--color-white);
  font-size: 15px;
  letter-spacing: 0.2px;
}

.watch-demo-badge {
  font-family: 'Sora Regular', sans-serif;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(82, 195, 251, 0.15);
  color: var(--color-light-glue);
  border: 1px solid rgba(82, 195, 251, 0.3);
  font-weight: 500;
}

/* Modal Window Backdrop */
#backdrop-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 12, 24, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  opacity: 1;
  visibility: visible;
}

#backdrop-video.modal-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Video Modal Window */
.modal-window-video {
  position: fixed;
  z-index: 101;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: min(92vw, 920px);
  max-width: 920px;
  height: auto;
  max-height: 94vh;
  box-sizing: border-box;
  padding: 24px;
  display: flex;
  flex-direction: column;
  color: var(--color-grey);
  background: linear-gradient(180deg, #0d284d 0%, #08172e 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(114, 145, 249, 0.35);
  border-radius: 20px;
  overflow-y: auto;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  opacity: 1;
  visibility: visible;
}

.modal-window-video.modal-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -46%) scale(0.96);
}

/* Modal Header */
.video-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.video-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.video-modal-badge {
  font-family: 'Sora SemiBold', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(233, 66, 89, 0.2);
  color: #ff6b81;
  border: 1px solid rgba(233, 66, 89, 0.4);
}

.video-modal-title {
  font: var(--font-h3);
  font-size: 20px;
  color: var(--color-white);
  margin: 0;
}

.btn-close-video {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.btn-close-video:hover {
  background: rgba(233, 66, 89, 0.25);
  border-color: var(--color-red);
  transform: rotate(90deg);
}

.btn-close-video img {
  width: 14px;
  height: 14px;
  opacity: 0.9;
  display: block;
}

/* Video Player 16:9 Container */
.video-player-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  background: #040d1a;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.video-player-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-player-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Chapters Navigation */
.video-modal-footer {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-chapters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chapters-label {
  font-family: 'Sora SemiBold', sans-serif;
  font-size: 13px;
  color: rgba(242, 242, 242, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}

.chapters-clock-icon {
  font-size: 14px;
  line-height: 1;
}

.chapter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-grey);
  cursor: pointer;
  font-family: 'Sora Regular', sans-serif;
  font-size: 13px;
  transition: all 0.2s ease;
}

.chapter-btn:hover {
  background: rgba(114, 145, 249, 0.2);
  border-color: var(--color-violet);
  color: var(--color-white);
  transform: translateY(-1px);
}

.chapter-btn.active {
  background: rgba(114, 145, 249, 0.28);
  border-color: var(--color-violet);
  color: var(--color-white);
  box-shadow: 0 0 12px rgba(114, 145, 249, 0.3);
}

.chapter-time {
  color: var(--color-yelow);
  font-weight: 600;
  font-size: 12px;
}

/* Video CTA Bar */
.video-modal-cta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.video-modal-hint {
  font-family: 'Sora Regular', sans-serif;
  font-size: 13px;
  color: rgba(242, 242, 242, 0.6);
}

.video-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #e94259 0%, #c82c42 100%);
  color: #ffffff;
  font: var(--font-btn);
  font-size: 15px;
  padding: 11px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(233, 66, 89, 0.4);
}

.video-cta-btn:hover {
  background: linear-gradient(135deg, #f05369 0%, #d8354c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(233, 66, 89, 0.55);
}

.video-cta-btn img {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.video-cta-btn:hover img {
  transform: translateX(4px);
}

/* Responsive Rules */
@media screen and (max-width: 1024px) {
  .description-wrapper {
    max-width: 100%;
    align-items: flex-start;
  }
  .btn-watch-demo {
    margin-top: 20px;
    margin-bottom: 24px;
  }
  .modal-window-video {
    width: calc(100vw - 32px);
    padding: 20px;
  }
}

@media screen and (max-width: 640px) {
  .description-wrapper {
    align-items: center;
    text-align: center;
  }
  .btn-watch-demo {
    margin-top: 16px;
    margin-bottom: 30px;
    padding: 8px 16px 8px 12px;
  }
  .watch-demo-text {
    font-size: 14px;
  }
  .modal-window-video {
    width: calc(100vw - 20px);
    padding: 16px;
    border-radius: 14px;
  }
  .video-modal-title {
    font-size: 16px;
  }
  .video-chapters {
    gap: 6px;
    padding: 8px 10px;
  }
  .chapter-btn {
    padding: 5px 8px;
    font-size: 12px;
  }
  .video-modal-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .video-cta-btn {
    justify-content: center;
    width: 100%;
  }
}
