/* ARBEN-18: isolated video surfaces. Existing site sections are not restyled. */
.av-block, .av-dialog, .av-blog-card { font-family: Manrope, sans-serif; }
.av-theme--beige { --av-bg: #ede2d2; --av-ink: #35452b; --av-button-bg: #35452b; --av-button-ink: #f7f0e6; }
.av-theme--elite { --av-bg: #35452b; --av-ink: #f7f0e6; --av-button-bg: #f7f0e6; --av-button-ink: #35452b; }
.av-theme--paper { --av-bg: #fefaf5; --av-ink: #35452b; --av-button-bg: #35452b; --av-button-ink: #f7f0e6; }
.av-block, .av-dialog, .av-blog-card,
.av-block *, .av-dialog *, .av-blog-card * { box-sizing: border-box; }
.av-block { position: relative; isolation: isolate; overflow: hidden; width: 100%; margin: 32px 0; padding: 32px; border: 0; border-radius: 48px; background: var(--av-bg); color: var(--av-ink); }
.av-block__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 262px minmax(0, 1fr); grid-template-areas: 'preview content'; gap: 24px 64px; align-items: center; max-width: 950px; margin-inline: auto; }
.av-block__inner:has(> .av-related) { grid-template-areas: 'preview content' 'preview related'; }
.av-block__inner:has(> .av-related) > .av-content { align-self: end; }
.av-block__inner:has(> .av-related) > .av-related { align-self: start; }
.av-folds { position: absolute; z-index: 0; left: calc(50% - 670px); top: -110px; width: 540px; height: 750px; overflow: visible; color: var(--av-ink); opacity: .05; pointer-events: none; }
.av-folds path { fill: none; stroke: currentColor; stroke-width: 1.5; }
.av-preview { grid-area: preview; position: relative; display: block; width: 262px; margin: 0; padding: 6px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.av-preview img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 999px; }
.av-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 56px; height: 56px; transform: translate(-50%, -50%); border: 1px solid #f7f0e6; border-radius: 50%; background: rgb(53 69 43 / 46%); color: #fff; pointer-events: none; }
.av-play svg { display: block; width: 18px; height: 18px; }
.av-content { grid-area: content; min-width: 0; }
.av-kicker { margin: 0 0 20px; font-size: 12px; line-height: 17px; font-weight: 400; }
.av-title { margin: 0 0 20px; font-family: Manrope, sans-serif; font-size: 32px; line-height: 1.25; font-weight: 700; color: inherit; }
.av-description { margin: 0; font-size: 16px; line-height: 24px; font-weight: 400; color: inherit; overflow-wrap: anywhere; }
.av-description p { margin: 0 0 12px; }
.av-description p:last-child { margin-bottom: 0; }
.av-meta { margin: 16px 0; font-size: 13px; line-height: 20px; }
.av-button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; max-width: 100%; padding: 12px 32px; border: 0; border-radius: 24px; background: var(--av-button-bg); color: var(--av-button-ink); font: 700 14px/20px Manrope, sans-serif; text-decoration: none; cursor: pointer; }
.av-button:hover, .av-button:visited { color: var(--av-button-ink); text-decoration: none; }
.av-button svg { flex: 0 0 20px; width: 20px; height: 20px; }
.av-content > .av-description + .av-button { margin-top: 24px; }
.av-related { grid-area: related; display: grid; gap: 24px; min-width: 0; }
.av-related__item { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 64px; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.av-related__item img { display: block; flex: 0 0 36px; width: 36px; height: 64px; object-fit: cover; border-radius: 18px; }
.av-related__title { display: block; font-size: 18px; line-height: 24px; font-weight: 700; }
.av-related__duration { display: block; margin-top: 4px; font-size: 12px; line-height: 18px; }
.av-preview:focus-visible, .av-button:focus-visible, .av-related__item:focus-visible, .av-close:focus-visible, .av-blog-card:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* The native dialog owns the backdrop; only its child panel is coloured. */
.av-dialog { width: min(960px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; background: transparent; color: var(--av-ink); overflow: visible; }
.av-dialog:not([open]) { display: none; }
.av-dialog::backdrop { background: rgb(25 32 22 / 55%); }
.av-dialog__panel { --av-media-height: min(640px, calc(100dvh - 32px)); position: relative; display: flex; flex-direction: column; width: 100%; max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: 40px; background: var(--av-bg); color: var(--av-ink); }
.av-dialog__body { display: grid; grid-template-columns: calc(var(--av-media-height) * 9 / 16) minmax(0, 1fr); gap: 0; align-items: center; height: var(--av-media-height); min-height: 0; overflow: hidden; overscroll-behavior: contain; }
.av-dialog__media { position: relative; align-self: stretch; width: 100%; max-width: 100%; min-height: 0; overflow: hidden; border-radius: 0; background: #192016; }
.av-dialog__media video { display: block; width: 100%; height: 100%; aspect-ratio: 9 / 16; object-fit: contain; }
/* Group navigation stays above the image, clear of native controls and close. */
.av-video-nav { position: absolute; z-index: 2; top: 16px; left: 16px; display: flex; align-items: center; height: 44px; border-radius: 22px; background: rgba(0, 0, 0, .5); color: #fff; }
.av-video-nav[hidden] { display: none; }
.av-video-prev, .av-video-next { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; margin: 0; padding: 12px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.av-video-prev svg, .av-video-next svg { display: block; width: 20px; height: 20px; pointer-events: none; }
.av-video-position { min-width: 52px; padding-inline: 4px; color: #fff; font: 700 12px/20px Manrope, sans-serif; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; pointer-events: none; }
.av-video-prev:focus-visible, .av-video-next:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
@media (hover: hover) { .av-video-prev:hover, .av-video-next:hover { background: rgba(255, 255, 255, .12); } }
.av-video-prev:active, .av-video-next:active { background: rgba(255, 255, 255, .2); }
.av-dialog__copy { min-width: 0; max-height: 100%; padding: 60px 64px 40px 32px; overflow-y: auto; overscroll-behavior: contain; }
.av-dialog__copy .av-title { font-size: 36px; line-height: 44px; }
.av-dialog__footer { margin-top: 20px; }
.av-dialog__footer .av-button { width: 100%; }
.av-close { position: absolute; z-index: 3; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 12px; border: 0; border-radius: 50%; background: var(--av-bg); color: var(--av-ink); cursor: pointer; }
.av-close svg { display: block; width: 20px; height: 20px; }

/* Only video entries get a portrait cover; native article cards and columns stay intact. */
.av-blog-duration { position: absolute; right: 12px; bottom: 12px; padding: 5px 8px; background: rgb(25 32 22 / 65%); color: #fff; font-size: 12px; }
.av-blog-date { display: block; margin-top: 12px; font-size: 12px; }
.av-article { display: flex; align-items: flex-start; justify-content: center; gap: 48px; }
.av-article > .av-preview { flex-shrink: 0; }
.av-article > .av-description { max-width: 560px; padding-top: 24px; }
.av-video-error { padding: 12px; font-size: 14px; color: white; }
@media (max-width: 767px) { .av-article { flex-direction: column; align-items: center; gap: 24px; } .av-article > .av-description { padding-top: 0; } }
.av-blog-card { position: relative; display: block; width: 100%; min-height: 100%; padding: 0; border: 0; background: #f7f0e6; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.av-blog-cover { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; }
.av-blog-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.av-blog-card__content { display: block; padding: 20px; }
.av-blog-card__title { display: block; margin: 0 0 10px; font: 700 18px/24px Manrope, sans-serif; }
.av-blog-card__description { display: block; font-size: 14px; line-height: 22px; }

@media (max-width: 1023px) {
  .av-folds { left: -70px; }
  .av-block__inner { grid-template-columns: 220px minmax(0, 1fr); column-gap: 32px; }
  .av-preview { width: 220px; }
  .av-dialog__copy { padding-right: 32px; }
  .av-dialog__copy .av-title { font-size: 28px; line-height: 36px; }
}
@media (max-width: 767px) {
  .av-close { background: rgba(0, 0, 0, .5); color: #fff; }
  .av-block { margin-block: 32px; padding: 24px 20px; border-radius: 32px; }
  .av-block__inner { position: static; grid-template-columns: minmax(0, 138px) minmax(0, 1fr); grid-template-areas: 'preview content'; gap: 24px 16px; padding-top: 41px; }
  .av-block__inner:has(> .av-related) { grid-template-areas: 'preview content' 'related related'; }
  .av-block__inner:has(> .av-related) > .av-content { align-self: center; }
  .av-preview { z-index: 1; width: 100%; }
  .av-content, .av-related { position: relative; z-index: 1; }
  .av-content { position: static; }
  .av-block .av-kicker { position: absolute; top: 24px; left: 20px; right: 20px; margin: 0; }
  .av-title { margin-bottom: 16px; font-size: 20px; line-height: 26px; }
  .av-description { font-size: 14px; line-height: 21px; }
  .av-block .av-meta, .av-block .av-content > .av-button { display: none; }
  .av-folds { left: -60px; top: -80px; width: 396px; height: 550px; }
  .av-related__title { font-size: 18px; line-height: 24px; }
  .av-dialog { width: 100vw; max-height: 100dvh; }
  .av-dialog__panel { height: min(812px, 100dvh); max-height: 100dvh; padding: 0; border-radius: 32px 32px 0 0; }
  .av-dialog__body { display: flex; flex-direction: column; align-items: stretch; gap: 0; flex: 1; height: auto; overflow-y: auto; }
  .av-dialog__media { flex-shrink: 0; align-self: stretch; width: 100%; }
  .av-dialog__media video { height: auto; }
  .av-dialog__copy { flex-shrink: 0; max-height: none; padding: 24px 20px; overflow: visible; }
  .av-dialog__copy .av-kicker { position: static; margin: 0 0 16px; }
  .av-dialog__copy .av-title { margin-bottom: 16px; font-size: 24px; line-height: 32px; }
  .av-dialog .av-description { font-size: 14px; line-height: 22px; }
  .av-dialog__footer { margin-top: 32px; }
}
@media (max-width: 359px) {
  .av-block__inner { grid-template-columns: minmax(0, 112px) minmax(0, 1fr); gap: 24px 12px; }
  .av-block .av-title { font-size: 18px; line-height: 24px; }
}
