/* BNE video guide section — self-contained module.
 * Colors come from the site's own design tokens (--color-*), so the section
 * follows the active theme automatically. All classes are bne-v- prefixed to
 * guarantee no collision with the compiled Tailwind utilities. */

.bne-v {
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
}

.bne-v-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 22% 18%, rgba(47, 125, 255, 0.16), transparent 62%),
    radial-gradient(48% 50% at 82% 78%, rgba(255, 138, 31, 0.12), transparent 60%);
  will-change: transform;
}

.bne-v-wrap {
  position: relative;
  margin: 0 auto;
  max-width: 72rem;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .bne-v-wrap {
    padding: 0 1.5rem;
  }
}

.bne-v-eyebrow {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-amber);
}

/* Arabic must not render in the monospace stack above: those fonts carry no
   Arabic glyphs, so the text falls back unshaped and the letters visually
   disconnect. Latin keeps the mono look. */
html[lang="ar"] .bne-v-eyebrow {
  letter-spacing: 0;
  text-transform: none;
  font-family: inherit;
  font-weight: 700;
}

.bne-v-title {
  margin: 0.75rem 0 0;
  max-width: 40ch;
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-snow);
}

.bne-v-sub {
  margin: 1rem 0 0;
  max-width: 55ch;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--color-dim);
}

.bne-v-grid {
  margin-top: 3rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .bne-v-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bne-v-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--color-line);
  background: var(--color-panel);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.bne-v-card:hover {
  border-color: var(--color-blue);
  box-shadow: 0 18px 48px rgba(4, 10, 24, 0.35);
}

.bne-v-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  margin: 0;
  border: 0;
  background: var(--color-navy);
  cursor: pointer;
  overflow: hidden;
}

.bne-v-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.bne-v-card:hover .bne-v-frame img {
  transform: scale(1.05);
}

.bne-v-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6, 10, 19, 0.72) 0%,
    rgba(6, 10, 19, 0.12) 45%,
    rgba(6, 10, 19, 0.05) 100%
  );
}

.bne-v-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  background: var(--color-amber);
  box-shadow: 0 0 28px rgba(255, 138, 31, 0.4);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease;
}

.bne-v-play svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: #0b1220;
  margin-inline-start: 0.25rem;
}

.bne-v-card:hover .bne-v-play {
  transform: translate(-50%, -50%) scale(1.09);
  box-shadow: 0 0 42px rgba(255, 138, 31, 0.62);
}

.bne-v-frame:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: -3px;
}

/* Pulsing ring around the play button. */
.bne-v-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 138, 31, 0.55);
  transform: translate(-50%, -50%);
  animation: bne-v-pulse 2.8s ease-out infinite;
  pointer-events: none;
}

@keyframes bne-v-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.75;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.7);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.bne-v-meta {
  padding: 1.25rem 1.5rem 1.5rem;
}

.bne-v-tag {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  color: var(--color-amber);
}

/* Same Arabic/monospace problem as the eyebrow: the tag had no override at
   all, so «الفيديو الأول» always rendered unshaped. Latin keeps the mono look. */
html[lang="ar"] .bne-v-tag {
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
}

.bne-v-name {
  margin: 0.5rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--color-snow);
}

.bne-v-note {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--color-dim);
}

.bne-v-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.bne-v-foot {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.bne-v-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 999px;
  background: var(--color-amber);
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0b1220;
  text-decoration: none;
  box-shadow: 0 0 26px rgba(255, 138, 31, 0.3);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.bne-v-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(255, 138, 31, 0.5);
}

.bne-v-cta:active {
  transform: translateY(0) scale(0.98);
}

/* Language: both scripts ship in the DOM, the site's own toggle (which sets
 * <html lang>) decides which one is visible. */
[data-bne-lang="en"] {
  display: none;
}

html[lang="en"] [data-bne-lang="en"] {
  display: revert;
}

html[lang="en"] [data-bne-lang="ar"] {
  display: none;
}

/* Scroll reveal: the "from" state is applied by JS only, so with no JS (or if
 * the observer never fires) the content is always visible. */
.bne-v-reveal {
  transform: translateY(28px);
  opacity: 0;
  transition:
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.7s ease-out;
}

.bne-v-reveal.is-in {
  transform: none;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .bne-v-reveal,
  .bne-v-reveal.is-in {
    transform: none;
    opacity: 1;
    transition: none;
  }

  .bne-v-ring {
    animation: none;
  }

  .bne-v-glow {
    transform: none !important;
  }

  .bne-v-frame img,
  .bne-v-play {
    transition: none;
  }
}
