/* =========================================================
   Искуства / приказни од ученици — Промена МК
   ========================================================= */

.ph-disclaimer {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-left: 3px solid rgba(139, 92, 246, 0.35);
  padding-left: 12px;
  max-width: 640px;
}

.stories-section {
  scroll-margin-top: 80px;
  padding-bottom: clamp(72px, 10vw, 120px);
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 48px);
  align-items: start;
  margin-bottom: clamp(56px, 9vw, 96px);
}

.story-layout:nth-child(even) .story-media {
  order: 2;
}

.story-layout:nth-child(even) .story-copy {
  order: 1;
}

.story-media {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, rgba(20,20,28,0.92), rgba(13,13,20,0.92));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.55),
    0 0 60px rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.story-media::before {
  content: "";
  display: block;
  height: 48px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 18px 50%, #ef4444 0 5px, transparent 6px),
    radial-gradient(circle at 34px 50%, #f59e0b 0 5px, transparent 6px),
    radial-gradient(circle at 50px 50%, #10b981 0 5px, transparent 6px),
    rgba(255,255,255,0.02);
}

.story-media::after {
  content: "Промена МК · Искуство";
  position: absolute;
  top: 15px;
  left: 74px;
  right: 18px;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.story-hv-player {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(139,92,246,0.35), transparent 60%),
    radial-gradient(circle at 75% 75%, rgba(6,182,212,0.3), transparent 65%),
    linear-gradient(135deg, #1a1530, #0a0a14);
  aspect-ratio: 16 / 10;
}

.story-hv-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0a0a14;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.story-hv-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 3;
}

.story-video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background:
    linear-gradient(180deg, rgba(7,7,11,0.18), rgba(7,7,11,0.58)),
    radial-gradient(circle at 50% 45%, rgba(139,92,246,0.28), transparent 45%);
}

.story-video-placeholder span {
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.story-hv-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: none;
  background:
    linear-gradient(180deg, rgba(7,7,11,0.15) 0%, rgba(7,7,11,0.4) 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s ease;
}

.story-hv-overlay:hover {
  background:
    linear-gradient(180deg, rgba(7,7,11,0.05) 0%, rgba(7,7,11,0.3) 100%);
}

.story-hv-player:has(.story-hv-overlay:hover) .story-hv-thumb {
  transform: scale(1.04);
}

.story-play-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border: 0;
  display: grid;
  place-items: center;
  box-shadow:
    0 14px 40px rgba(139, 92, 246, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s ease;
}

.story-hv-overlay:hover .story-play-btn {
  transform: scale(1.08);
  box-shadow:
    0 18px 50px rgba(139, 92, 246, 0.55),
    inset 0 1px 0 rgba(255,255,255,0.28);
}

.story-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.story-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
}

.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #ddd6fe;
  background: rgba(139, 92, 246, 0.1);
}

.story-copy h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  margin: 0 0 10px;
  color: var(--text);
}

.story-who {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.story-who strong {
  color: var(--text-dim);
  font-weight: 600;
}

.story-quote {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-left: 3px solid rgba(6, 182, 212, 0.7);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 14px 14px 0;
  font-size: 1.02rem;
  font-style: italic;
  color: #e4e4e7;
  line-height: 1.55;
}

.story-body {
  font-size: 0.96rem;
  line-height: 1.67;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.story-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.story-metric {
  flex: 1 1 200px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.story-metric-label {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.story-metric strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  color: var(--text);
}

.story-earn {
  font-size: 1.15rem !important;
  font-weight: 700;
  color: #34d399 !important;
}

.stories-disclaimer {
  max-width: 720px;
  margin: clamp(48px, 8vw, 72px) auto 0;
  padding: 18px 20px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.stories-disclaimer strong {
  color: var(--text-dim);
}

@media (max-width: 980px) {
  .story-layout {
    grid-template-columns: 1fr;
  }

  .story-media {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
  }

  .story-hv-player {
    aspect-ratio: 16 / 9;
    min-height: 220px;
  }

  .story-hv-player iframe,
  .story-hv-thumb,
  .story-video-placeholder {
    width: 100%;
    height: 100%;
  }

  .story-layout:nth-child(even) .story-media,
  .story-layout:nth-child(even) .story-copy {
    order: initial !important;
  }
}

/* ── Таблети и поголеми телефони ── */
@media (max-width: 768px) {
  .story-layout {
    gap: 20px;
    margin-bottom: clamp(36px, 8vw, 52px);
  }

  .story-media {
    max-width: 100%;
    border-radius: 14px;
  }

  .story-hv-player {
    aspect-ratio: 16 / 9;
    min-height: 200px;
  }

  .story-num {
    font-size: 1.85rem;
  }

  .story-top {
    gap: 8px;
    margin-bottom: 10px;
  }

  .story-copy h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
  }

  .story-who {
    font-size: 0.91rem;
    margin-bottom: 12px;
  }

  .story-quote {
    padding: 12px 14px;
    font-size: 0.94rem;
    margin-bottom: 12px;
  }

  .story-body {
    font-size: 0.92rem;
    line-height: 1.62;
    margin-bottom: 14px;
  }

  .story-metrics {
    gap: 10px;
  }

  .story-metric {
    flex: 1 1 100%;
    padding: 12px 14px;
  }

  .story-metric strong {
    font-size: 0.97rem;
  }

  .story-earn {
    font-size: 1.05rem !important;
  }

  .stories-disclaimer {
    padding: 14px 16px;
    font-size: 0.8rem;
    text-align: left;
  }
}

/* ── Мали телефони ── */
@media (max-width: 480px) {
  .story-layout {
    gap: 16px;
    margin-bottom: clamp(28px, 7vw, 40px);
  }

  .story-media {
    border-radius: 14px;
  }

  .story-media::before {
    height: 40px;
  }

  .story-media::after {
    top: 11px;
    left: 62px;
    right: 10px;
    font-size: 0.7rem;
  }

  .story-hv-player {
    min-height: 180px;
  }

  .story-num {
    font-size: 1.55rem;
  }

  .story-copy h2 {
    font-size: 1.15rem;
  }

  .story-who {
    font-size: 0.88rem;
  }

  .story-quote {
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .story-body {
    font-size: 0.9rem;
  }

  .story-play-btn {
    width: 56px;
    height: 56px;
  }

  .story-metric {
    padding: 10px 12px;
  }

  .story-metric strong {
    font-size: 0.93rem;
  }

  .story-earn {
    font-size: 1rem !important;
  }

  .story-metric-label {
    font-size: 0.7rem;
  }
}

/* ── Многу мали уреди (360px и помалку) ── */
@media (max-width: 360px) {
  .story-media::before {
    height: 36px;
  }

  .story-media::after {
    display: none;
  }

  .story-hv-player {
    min-height: 160px;
  }

  .story-num {
    font-size: 1.35rem;
  }

  .story-tag {
    font-size: 0.65rem;
    padding: 4px 8px;
  }

  .story-quote {
    font-size: 0.88rem;
    padding: 9px 10px;
  }

  .story-body {
    font-size: 0.88rem;
  }
}

/* CTA: dual cards (shared tools.css + methods.css) */
.stories-cta.tools-page-cta {
  padding-bottom: clamp(48px, 8vw, 88px);
}

.stories-cta .section-head {
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 40px);
}

.stories-cta .section-head h2 {
  margin-bottom: 12px;
}

.stories-cta .section-head p {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-dim);
  line-height: 1.65;
}
