/* ===== PROBLEMS SECTION — BTrade AI Branding ===== */

.problems-section {
  position: relative;
  height: 300vh;
  font-family: "Inter", "IBM Plex Sans Arabic", sans-serif;
}

.problems-sticky {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--btrade-bg-dark, #0a0a0f);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.problems-sticky.is-fixed {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
}

.problems-sticky.is-bottom {
  position: absolute !important;
  bottom: 0;
  top: auto;
  left: 0;
  right: 0;
}

/* ── Top Label ── */
.problems-top-label {
  flex: none;
  text-align: center;
  padding: 32px 0 16px;
  font-size: 30px;
  font-family: "Poppins", "Cairo", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(33, 150, 243, 0.4);
}

/* ── Main Area ── */
.problems-main {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 0;
}

/* ===== TIMELINE ===== */
.problems-timeline {
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0;
  z-index: 20;
}

.problems-timeline-track {
  position: relative;
  flex: 1;
  width: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
}

.problems-timeline-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0%;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--btrade-danger, #ff4757), var(--btrade-warning, #ffa502), var(--btrade-primary, #2196F3));
  transition: height 0.1s linear;
}

.problems-timeline-dots {
  position: absolute;
  top: 32px;
  bottom: 32px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.problems-dot-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.problems-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, background 0.3s;
}

.problems-dot.active {
  transform: scale(1.3);
  border-color: var(--dot-color);
  background: color-mix(in srgb, var(--dot-color) 25%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--dot-color) 40%, transparent);
}

.problems-dot.passed {
  border-color: var(--dot-color);
  background: color-mix(in srgb, var(--dot-color) 25%, transparent);
}

.problems-dot-label {
  display: none;
  font-size: 11px;
  font-family: "Inter", monospace;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--btrade-text-muted, #5a5a6e);
  transition: color 0.3s;
}

.problems-dot.active + .problems-dot-label {
  color: var(--btrade-text-secondary, #8b8b9e);
}

@media (min-width: 768px) {
  .problems-dot-label {
    display: block;
  }

  .problems-timeline {
    left: 40px;
  }
}

/* ===== CARDS CONTAINER ===== */
.problems-cards {
  position: relative;
  width: 100%;
  height: 100%;
  margin-left: 40px;
}

@media (min-width: 768px) {
  .problems-cards {
    margin-left: 96px;
  }
}

.problems-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 16px 8px;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.problems-slide.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

/* ===== FLIP CARD ===== */
.problems-flip {
  width: 100%;
  max-width: 640px;
  min-height: 420px;
  perspective: 1200px;
  position: relative;
}

.problems-flip-inner {
  position: relative;
  width: 100%;
  min-height: 420px;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.problems-flip-inner.flipped {
  transform: rotateY(180deg);
}

.problems-front,
.problems-back {
  position: absolute;
  inset: 0;
  min-height: 420px;
  border-radius: 24px;
  padding: 40px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* ── Front Face ── */
.problems-front {
  background: var(--btrade-bg-card, #111118);
  border: 1px solid var(--btrade-glass-border, rgba(33, 150, 243, 0.15));
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.problems-grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(33, 150, 243, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 150, 243, 0.5) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.problems-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.problems-card-num {
  font-size: 11px;
  font-family: "Inter", monospace;
  text-transform: uppercase;
  letter-spacing: 0.25em;
}

.problems-card-icon {
  font-size: 28px;
}

.problems-card-body h3 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  font-family: "Poppins", "Cairo", sans-serif;
  color: var(--btrade-text-primary, #ffffff);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.problems-card-sub {
  color: var(--btrade-text-secondary, #8b8b9e);
  font-size: 16px;
  margin-top: 8px;
  line-height: 1.7;
}

.problems-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 32px;
}

.problems-stat {
  font-size: 48px;
  font-weight: 900;
  font-family: "Inter", monospace;
  letter-spacing: -0.03em;
  line-height: 1;
}

.problems-stat-label {
  color: var(--btrade-text-muted, #5a5a6e);
  font-size: 13px;
  margin-top: 6px;
}

.problems-scroll-hint {
  font-size: 11px;
  font-family: "Inter", monospace;
  color: var(--btrade-text-muted, #5a5a6e);
  display: flex;
  align-items: center;
  gap: 6px;
}

.problems-arrow {
  display: inline-block;
  animation: problemsNudge 1.2s ease-in-out infinite;
}

@keyframes problemsNudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.problems-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 0 0 24px 24px;
}

/* ── Back Face ── */
.problems-back {
  background: var(--back-bg);
  border: 1px solid color-mix(in srgb, var(--card-color) 30%, transparent);
  transform: rotateY(180deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.problems-back-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.problems-back-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.problems-back-dot div {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.problems-back-header span {
  font-size: 12px;
  font-family: "Inter", monospace;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--btrade-text-secondary, #8b8b9e);
}

.problems-back p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.problems-back ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.problems-back ul li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--btrade-text-secondary, #8b8b9e);
  font-size: 14px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.problems-back ul li.visible {
  opacity: 1;
  transform: translateX(0);
}

.problems-back ul li::before {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--li-color) 30%, transparent);
  background: color-mix(in srgb, var(--li-color) 10%, transparent);
  flex-shrink: 0;
}

.problems-back-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid;
  font-size: 12px;
  font-family: "Inter", monospace;
}

/* ===== BOTTOM INDICATORS ===== */
.problems-bottom-dots {
  flex: none;
  padding-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.problems-bdot {
  height: 6px;
  width: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transition: width 0.3s ease, background 0.3s ease;
}

.problems-bdot.active {
  width: 24px;
  background: var(--dot-color);
}

.problems-scroll-label {
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-family: "Inter", monospace;
  color: var(--btrade-text-muted, #5a5a6e);
  margin-top: 4px;
}

/* ===== MOBILE ===== */
@media (max-width: 480px) {
  .problems-front,
  .problems-back {
    padding: 24px;
    min-height: 380px;
  }

  .problems-flip-inner {
    min-height: 380px;
  }

  .problems-stat {
    font-size: 36px;
  }

  .problems-card-body h3 {
    font-size: 26px;
  }

  .problems-card-sub {
    font-size: 14px;
  }
}