/* Adviser Express — User Guide (visitor-facing) */

.ae-guide-page {
  background: #f4f7fb;
}

.ae-guide-intro {
  max-width: 820px;
  margin: 0 auto 28px;
  text-align: center;
}

.ae-guide-intro__kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a227;
}

.ae-guide-intro__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  color: #0f2a4a;
  line-height: 1.2;
}

.ae-guide-intro__lead {
  margin: 0 0 8px;
  color: #5a6b7d;
  font-size: 16px;
  line-height: 1.6;
}

.ae-guide-lang {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(15, 42, 74, 0.08);
  border: 1px solid rgba(15, 42, 74, 0.08);
}

.ae-guide-lang__label {
  font-size: 12px;
  font-weight: 600;
  color: #5a6b7d;
  padding: 0 6px;
}

.ae-guide-lang__btn {
  border: 0;
  background: transparent;
  color: #0f2a4a;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ae-guide-lang__btn:hover {
  background: rgba(15, 42, 74, 0.06);
}

.ae-guide-lang__btn.is-active {
  background: #0f2a4a;
  color: #fff;
}

html[dir="rtl"] .ae-guide-lang__label {
  font-family: Cairo, sans-serif;
}

.ae-guide-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) 1fr;
  gap: 32px;
  align-items: start;
}

.ae-guide-toc__sticky {
  position: sticky;
  top: 110px;
  background: #fff;
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 8px 32px rgba(15, 42, 74, 0.08);
  border: 1px solid rgba(15, 42, 74, 0.06);
}

.ae-guide-toc__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f2a4a;
  margin: 0 0 14px;
}

.ae-guide-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.ae-guide-toc__link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 10px;
  color: #3d5166;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.ae-guide-toc__link:hover {
  background: rgba(15, 42, 74, 0.06);
  color: #0f2a4a;
}

.ae-guide-toc__num {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #c9a227;
  min-width: 22px;
}

.ae-guide-toc__app {
  display: block;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0f2a4a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.ae-guide-toc__app:hover {
  background: #17365c;
  color: #fff;
}

.ae-guide-section {
  background: #fff;
  border-radius: 18px;
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow: 0 6px 28px rgba(15, 42, 74, 0.07);
  border: 1px solid rgba(15, 42, 74, 0.05);
  scroll-margin-top: 100px;
}

.ae-guide-section__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.ae-guide-section__num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f2a4a, #17365c);
  color: #f2d58a;
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
}

.ae-guide-section__title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #0f2a4a;
  line-height: 1.25;
}

.ae-guide-section__screen {
  margin: 0;
  font-size: 13px;
  color: #7a8a9a;
}

.ae-guide-section__screen span {
  font-weight: 600;
  color: #5a6b7d;
}

.ae-guide-section__dur {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #0f2a4a;
  background: rgba(201, 162, 39, 0.15);
  padding: 6px 10px;
  border-radius: 999px;
}

.ae-guide-section__desc {
  margin: 0 0 18px;
  color: #3d5166;
  font-size: 15px;
  line-height: 1.55;
}

.ae-guide-video {
  margin: 0 0 18px;
}

.ae-guide-video__wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0a1628;
  border: 1px solid rgba(15, 42, 74, 0.1);
  aspect-ratio: 16 / 9;
}

.ae-guide-video__el {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #0a1628;
}

.ae-guide-video__overlay {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(15, 42, 74, 0.55);
  color: #fff;
  pointer-events: none;
}

.ae-guide-screenshot.is-hidden {
  display: none;
}

.ae-guide-video:not(.is-missing) .ae-guide-video__overlay {
  display: none;
}

.ae-guide-video__overlay-icon {
  font-size: 2rem;
  opacity: 0.85;
}

.ae-guide-video__overlay-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.ae-guide-video__cap {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #5a6b7d;
}

.ae-guide-video__status {
  margin: 4px 0 0;
  font-size: 12px;
  color: #7a8a9a;
}

.ae-guide-video__status:empty {
  display: none;
}

.ae-guide-video__status.is-ready {
  color: #1a7f4e;
}

.ae-guide-video__status.is-missing {
  color: #9a6b00;
}

.ae-guide-video:not(.is-missing) .ae-guide-video__status.is-missing {
  display: none;
}

/* Section screenshots — img/guide/{id}.jpg */
.ae-guide-screenshot {
  margin: 0 0 18px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef2f7;
  border: 1px solid rgba(15, 42, 74, 0.08);
  box-shadow: 0 10px 32px rgba(15, 42, 74, 0.1);
}

.ae-guide-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.ae-guide-screenshot:not(.is-placeholder) img {
  opacity: 1;
}

.ae-guide-screenshot.is-placeholder {
  position: relative;
  min-height: 180px;
  background: linear-gradient(135deg, #e8edf4 0%, #f4f7fb 100%);
}

.ae-guide-screenshot.is-placeholder img {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ae-guide-screenshot.is-placeholder::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.ae-guide-screenshot__cap {
  display: none;
  margin: 0;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #5a6b7d;
  background: #f8fafc;
  border-top: 1px solid rgba(15, 42, 74, 0.06);
}

.ae-guide-screenshot.is-placeholder .ae-guide-screenshot__cap {
  display: block;
}

.ae-guide-screenshot__hint {
  display: block;
  margin-top: 4px;
  font-weight: 500;
  color: #9a6b00;
  font-size: 11px;
}

[dir="rtl"] .ae-guide-section__dur {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .ae-guide-toc__link {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .ae-guide-section__head {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .ae-guide-section__head > div {
  text-align: right;
}

@media (max-width: 991px) {
  [dir="rtl"] .ae-guide-section__dur {
    margin-right: 60px;
    margin-left: 0;
  }
}

.ae-guide-audio {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.ae-guide-audio__el {
  width: 100%;
  margin-bottom: 12px;
}

.ae-guide-audio__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ae-guide-audio__play,
.ae-guide-audio__tts {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.ae-guide-audio__play {
  background: #0f2a4a;
  color: #fff;
}

.ae-guide-audio__play:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ae-guide-audio__tts {
  background: #fff;
  color: #0f2a4a;
  border: 1px solid rgba(15, 42, 74, 0.15);
}

.ae-guide-audio__tts.is-speaking {
  background: #c9a227;
  color: #fff;
  border-color: transparent;
}

.ae-guide-audio__play:not(:disabled):hover,
.ae-guide-audio__tts:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.ae-guide-audio__status {
  margin: 10px 0 0;
  font-size: 13px;
  color: #7a8a9a;
}

.ae-guide-audio__status.is-ready {
  color: #1a7f4e;
}

.ae-guide-audio__status.is-missing {
  color: #9a6b00;
}

.ae-guide-script {
  border-top: 1px solid rgba(15, 42, 74, 0.08);
  padding-top: 12px;
}

.ae-guide-script summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #0f2a4a;
  list-style: none;
}

.ae-guide-script summary::-webkit-details-marker {
  display: none;
}

.ae-guide-script__text {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: #5a6b7d;
  white-space: pre-wrap;
}

@media (max-width: 991px) {
  .ae-guide-layout {
    grid-template-columns: 1fr;
  }

  .ae-guide-toc__sticky {
    position: static;
    max-height: none;
  }

  .ae-guide-toc__list {
    max-height: 240px;
  }

  .ae-guide-section__head {
    flex-wrap: wrap;
  }

  .ae-guide-section__dur {
    margin-left: 60px;
  }
}
