/* Анимация диктанта в hero-visual */
#hero-animation-container.hero-visual-animation {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.icon-play {
  margin-left: 2px;
}

#dictation-box {
  width: 500px;
  min-height: 280px;
  background-color: #ffffff;
  border-radius: 12px;
  position: relative;
  padding: 30px;
  box-sizing: border-box;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 100%;
}

/* Область для текста */
.text-area {
  flex-grow: 1;
}

/* Стили текста и курсора */
#text-container {
  font-size: 20px;
  line-height: 1.4;
  color: #222;
}

.highlight {
  transition: background-color 0.3s ease;
  border-radius: 4px;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 24px;
  background-color: #222;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Стили тултипов */
.tooltip {
    position: absolute;
    width: 340px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 16px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(10px);
    pointer-events: none;
    box-sizing: border-box;
}

.tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tt-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 16px;
}

.tt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}

.dot-green { background-color: #a9df93; }
.dot-red { background-color: #ffc2c2; }

.tt-title {
  font-weight: 700;
  margin-right: auto;
}

.text-red { color: #e53935; }

.tt-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: #333;
}

.tt-body i { font-style: italic; }

.tt-example-box {
  background-color: var(--accent-bg);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-size: 13.5px;
  color: #222;
}

/* Стили плеера */
.player-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 40px;
  padding: 6px 10px 6px 12px;
  gap: 6px;
  margin-top: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  user-select: none;
}

.player-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: #111;
  transition: transform 0.1s ease, filter 0.1s ease;
}

.player-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.play-btn-wrapper {
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
}

.simulated-click {
  transform: scale(0.85);
  filter: brightness(0.8);
}

.speed-text, .time-text {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  font-variant-numeric: tabular-nums;
}

.progress-container {
  flex-grow: 1;
  height: 8px;
  background: #e6e8ea;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #ffbc26;
  border-radius: 4px;
  transition: width 0.08s linear;
}

.icon-small svg {
  width: 20px;
  height: 20px;
  color: #333;
}

.check-btn {
  background: #fffbde;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 14px;
  color: #111;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease;
}

.check-btn.simulated-click {
  transform: scale(0.92);
  filter: brightness(0.9);
}

/* Адаптивность */
@media (max-width: 1024px) {
  #dictation-box {
    width: 100%;
    height: auto;
    min-height: auto;
    aspect-ratio: auto;
  }

  #text-container {
    font-size: 24px;
  }

  .cursor {
    height: 26px;
  }

  .tooltip {
    width: 280px;
    font-size: 12px;
  }

  .tt-header {
    font-size: 14px;
  }

  .tt-body {
    font-size: 12px;
  }

  .tt-example-box {
    font-size: 12px;
  }

  .player-bar {
    padding: 5px 8px 5px 10px;
    gap: 4px;
  }

  .player-btn svg {
    width: 20px;
    height: 20px;
  }

  .play-btn-wrapper {
    width: 36px;
    height: 36px;
  }

  .speed-text, .time-text {
    font-size: 12px;
  }

  .check-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  #dictation-box {
    padding: 16px;
  }

  #text-container {
    font-size: 18px;
    line-height: 1.3;
  }

  .cursor {
    height: 20px;
  }

  .tooltip {
    width: 250px;
  }

  .player-bar {
    margin-top: 15px;
    flex-wrap: wrap;
    padding: 4px 6px;
  }
}

@media (max-width: 480px) {
  #dictation-box {
    padding: 12px;
  }

  #text-container {
    font-size: 16px;
    line-height: 1.25;
  }

  .tooltip {
    width: 220px;
    padding: 12px;
  }

  .tt-header {
    font-size: 13px;
  }

  .tt-body {
    font-size: 11px;
  }

  .tt-example-box {
    font-size: 11px;
    padding: 10px;
  }

  .player-bar {
    gap: 2px;
    padding: 4px 6px 4px 8px;
  }

  .player-btn svg {
    width: 18px;
    height: 18px;
  }

  .play-btn-wrapper {
    width: 32px;
    height: 32px;
  }

  .icon-small svg {
    width: 16px;
    height: 16px;
  }

  .speed-text, .time-text {
    font-size: 11px;
  }

  .check-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* Дополнительные классы для inline-стилей */
.section-header-features {
  margin-bottom: 40px;
}

.hero-visual-carousel {
  margin-top: 0;
  aspect-ratio: auto;
  background-image: none;
  background-color: var(--accent-bg);
  box-shadow: none;
}

.btn-scientific {
  margin-top: 12px;
  display: inline-block;
}

.feature-list-courses {
  margin-bottom: 20px;
}

.step-badge-check {
  background: var(--btn-bg);
  color: #000;
  font-size: 16px;
}

.card-teachers {
  max-width: 800px;
  margin: 0 auto;
}

.teachers-action {
  text-align: center;
  margin-top: 20px;
}

/* Стили для FAQ секции */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 6px;
  overflow: hidden;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 14px;
  font-weight: 600;
  font-size: 14px;
  color: #222;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: inherit;
}

.faq-question:hover {
  background-color: #f9f9f9;
}

.faq-question span:first-child {
  flex: 1;
  text-align: left;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #444;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 14px 14px 14px;
}

.faq-answer p {
  margin: 0;
}

/* Адаптивность для FAQ */
@media (max-width: 768px) {
  .faq-container {
    max-width: 100%;
  }
  
  .faq-question {
    padding: 12px;
    font-size: 13px;
  }
  
  .faq-answer {
    font-size: 12px;
  }
}