/* الرياض 24 video section (inc/video.php), 2026-11-09. Loaded only on pages that print video blocks.
   Reuses the theme's own pieces (archive hero + cards, section headers, article paper card + rail) and
   adds: thumbnails with the play mark, the facade player, the home band, grids, Shorts, rail rows. */

/* ---------- thumbnail, play mark, length ---------- */
.arn-vid-thumb, .arn-vid-play { display: grid; place-items: center; }
.arn-vid-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #1B2D0F; }
.arn-vid-thumb img, .arn-vid-play img { position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0 !important; transition: transform .5s ease; }
a:hover > .arn-vid-thumb img { transform: scale(1.04); }
.arn-vid-mark { position: relative; z-index: 1; width: clamp(30px, 16%, 68px); aspect-ratio: 1; border-radius: 50%; background: rgba(21, 36, 9, .74);
    box-shadow: inset 0 0 0 2px #A8C96E, 0 8px 22px -8px rgba(0, 0, 0, .65); transition: background-color .2s, transform .2s; }
.arn-vid-mark::before { content: ""; position: absolute; inset: 0; margin: auto; width: 34%; height: 40%; transform: translateX(12%); background: #A8C96E; clip-path: polygon(0 0, 100% 50%, 0 100%); }
a:hover .arn-vid-mark, .arn-vid-card:hover .arn-vid-mark, .arn-vid-play:hover .arn-vid-mark, .arn-vid-play:focus-visible .arn-vid-mark { background: #A8C96E; transform: scale(1.08); }
a:hover .arn-vid-mark::before, .arn-vid-card:hover .arn-vid-mark::before, .arn-vid-play:hover .arn-vid-mark::before, .arn-vid-play:focus-visible .arn-vid-mark::before { background: #1B2D0F; }
.arn-vid-len { position: absolute; bottom: 8px; inset-inline-end: 8px; z-index: 1; padding: 1px 7px; border-radius: 6px; background: rgba(13, 20, 9, .86); color: #FFFFFF;
    font: 700 .75rem/1.6 var(--arn-font); direction: ltr; font-variant-numeric: tabular-nums; }

/* ---------- facade player (a button until clicked, then the iframe in the same box) ---------- */
.arn-vid-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: #0E170C; isolation: isolate; }
.arn-vid-frame--short { aspect-ratio: 9 / 16; border-radius: 16px; }
.arn-vid-frame > button, .arn-vid-frame > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.arn-vid-play { margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: #0E170C !important; box-shadow: none !important; color: #FFFFFF; cursor: pointer; }
.arn-vid-play:focus-visible { outline: 3px solid #A8C96E !important; outline-offset: -3px; }
.arn-vid-play .arn-vid-mark { width: clamp(46px, 12%, 78px); }

/* ---------- home band: the olive skyline plate ---------- */
.arn-vid-band { position: relative; overflow: hidden; padding: 48px 0 72px; color: #EEF0E6; background: linear-gradient(160deg, #2E4B1A 0%, #223A13 60%, #1A2D0E 100%); }
.arn-vid-band::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px 260px at 82% -10%, rgba(168, 201, 110, .2), transparent 70%); }
.arn-vid-band .arn-container { position: relative; z-index: 1; }
.arn-vid-band__sky { position: absolute; inset-inline: 0; bottom: 0; height: 70px; color: #A8C96E; opacity: .1; pointer-events: none; }
.arn-vid-band__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.arn-vid-band a { color: inherit; text-decoration: none; }
.arn-vid-band a:focus-visible { outline: 2px solid #A8C96E; outline-offset: 4px; border-radius: 14px; }
.arn-vid-band__lead { display: flex; flex-direction: column; gap: 14px; }
.arn-vid-band__lead .arn-vid-thumb { border-radius: 18px; box-shadow: 0 26px 50px -26px rgba(0, 0, 0, .75); }
.arn-vid-band__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.arn-vid-band__desk { padding: 3px 12px; border-radius: 999px; background: rgba(168, 201, 110, .16); border: 1px solid rgba(168, 201, 110, .35); color: #C9E59A; font-size: .75rem; font-weight: 700; }
.arn-vid-band__t { margin: 0; font-size: 1.375rem; line-height: 1.6; font-weight: 700; color: #FFFFFF; }
.arn-vid-band__m { font-size: .75rem; color: #B3BCA9; }
.arn-vid-band__list { list-style: none; margin: -12px 0 0; padding: 0; }
.arn-vid-band__list li + li { border-top: 1px dashed rgba(168, 201, 110, .28); }
.arn-vid-band__list a { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; }
.arn-vid-band__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.arn-vid-band__txt h3 { margin: 0; font-size: .9375rem; line-height: 1.7; font-weight: 700; color: #FFFFFF; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arn-vid-band a:hover h3 { color: #C9E59A; }

/* ---------- hub ---------- */
.arn-vid-sec { margin-top: 44px; }
.arn-vid-n { padding: 3px 12px; border-radius: 999px; background: #EEF3E6; color: #294417; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.arn-vid-lead.arn-acard--feature { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.arn-vid-lead:hover { transform: none; }
/* the column's width, the row's height (never narrower than 16:9 tall): a ratio-sized width would spill over the text */
.arn-vid-lead .arn-vid-frame { width: 100%; aspect-ratio: 16 / 9; align-self: stretch; border-radius: 0; background: #0E170C; }
.arn-vid-lead .arn-acard__body { padding: 24px 28px; }
.arn-vid-lead .arn-acard__title { font-size: clamp(1.2rem, 1.8vw, 1.5rem) !important; -webkit-line-clamp: 3; }
.arn-vid-lead .arn-acard__excerpt { -webkit-line-clamp: 3; }
.arn-vid-grid, .arn-vid-shorts { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.arn-vid-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.arn-vid-shorts { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.arn-vid-card > .arn-vid-thumb { border-radius: 0; }
.arn-vid-card:hover .arn-vid-thumb img { transform: scale(1.04); }
.arn-vid-card .arn-acard__body { padding: 14px 16px 16px; gap: 6px; }
.arn-vid-card .arn-acard__title { font-size: .96875rem !important; -webkit-line-clamp: 2; }
.arn-vid-short { min-width: 0; }
.arn-vid-short__t { margin: 10px 0 2px; font-size: .875rem; line-height: 1.65; font-weight: 700; color: var(--arn-text-heading);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arn-vid-short__m { margin: 0; font-size: .71875rem; color: var(--arn-text-muted); }

/* ---------- rows: article rail + watch rail ---------- */
.arn-vid-rl { list-style: none; margin: 0; padding: 0; }
.arn-vid-rl > li + li { border-top: 1px dashed #E3E6D8; }
.arn-vid-rl a { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; text-decoration: none !important; }
.arn-vid-rl .arn-vid-thumb { border-radius: 10px; }
.arn-vid-rl .arn-vid-mark { width: 26px; }
.arn-vid-rl h3 { min-height: 3.5em; margin: 0 0 2px; font-size: .84375rem; line-height: 1.75; font-weight: 700; color: var(--arn-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arn-vid-rl small { display: block; font-size: .71875rem; line-height: 1.7; color: #7A8570; }
.arn-vid-rl a:hover h3 { color: var(--arn-olive-2); }
/* rows are 89px (two title lines kept even for one-line titles): the deferred list keeps their room */
.arn-vid-rl:has(> template.hbg-defer) { min-height: calc(var(--arn-vid-n, 4) * 89px); }

/* ---------- article: the video in the text ---------- */
.arn-vid-match { margin: 2em 0; }
.arn-art .arn-art__body .arn-vid-match__cap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 12px; padding-inline-start: 14px;
    border-inline-start: 3px solid var(--arn-leaf); font-size: 1rem; text-align: start; }
.arn-vid-match__k { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; background: var(--arn-olive); color: #FFFFFF;
    font: 700 .75rem/1 var(--arn-font); }
.arn-art .arn-art__body .arn-vid-match__t { font-family: var(--arn-font); font-size: 1.0625rem; line-height: 1.7; font-weight: 700; color: var(--arn-olive-deep); text-decoration: none; }
.arn-art .arn-art__body .arn-vid-match__t:hover { color: var(--arn-olive-2); text-decoration: underline; }
.arn-vid-match__m { font-size: .8125rem; line-height: 1.6; color: var(--arn-ink-2); }

/* ---------- watch page: the article's paper card ---------- */
body.arn-vid-page--watch { background: var(--arn-stone) !important; }
body.arn-vid-page--watch .site, body.arn-vid-page--watch .content-bg, body.arn-vid-page--watch #inner-wrap { background: transparent !important; }
.arn-vid-wframe { margin: 0 0 26px; box-shadow: 0 30px 60px -42px rgba(27, 45, 15, .7); }
.arn-vid-wrail { position: static; }
.arn-vid-wrail .arn-rail__title { margin: 0; line-height: 1.5; }
.arn-vid-cov .arn-art__rel-grid:has(> :nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- night mode ---------- */
[data-theme="dark"] .arn-vid-band { background: linear-gradient(160deg, #101A0C 0%, #0A1108 100%); }
[data-theme="dark"] .arn-vid-n { background: #1B2B12; color: #A8C96E; }
[data-theme="dark"] .arn-vid-rl h3 { color: #E3E8DC; }
[data-theme="dark"] .arn-vid-rl > li + li { border-color: #22331C; }
[data-theme="dark"] .arn-vid-rl small, [data-theme="dark"] .arn-vid-match__m { color: #8E9A86; }
[data-theme="dark"] .arn-vid-rl:has(> template.hbg-defer) { background: repeating-linear-gradient(180deg, #16230F 0 52px, transparent 52px 66px); }
[data-theme="dark"] .arn-art .arn-art__body .arn-vid-match__t { color: #F1F4EA; }
[data-theme="dark"] body.arn-vid-page--watch { background: #0B1309 !important; }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
    .arn-vid-shorts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .arn-vid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .arn-vid-shorts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .arn-vid-band__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .arn-vid-band__list { margin: 0; }
    .arn-vid-lead.arn-acard--feature { display: flex; flex-direction: column; }
    .arn-vid-lead .arn-acard__body { padding: 20px 22px; }
}
@media (max-width: 767px) {
    .arn-vid-band { padding: 36px 0 56px; }
    .arn-vid-band__t { font-size: 1.125rem; }
    .arn-vid-band__list a { grid-template-columns: 124px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
    .arn-vid-sec { margin-top: 34px; }
    .arn-vid-grid, .arn-vid-shorts { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 24px; scrollbar-width: none; margin-inline: -24px; padding: 2px 24px 8px; }
    .arn-vid-grid::-webkit-scrollbar, .arn-vid-shorts::-webkit-scrollbar { display: none; }
    .arn-vid-grid > li { flex: 0 0 76%; scroll-snap-align: start; }
    .arn-vid-shorts > li { flex: 0 0 44%; scroll-snap-align: start; }
    .arn-vid-wframe { margin-inline: -16px; border-radius: 0; }
}
@media (max-width: 575px) {
    .arn-vid-grid, .arn-vid-shorts { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .arn-vid-thumb img, .arn-vid-play img, .arn-vid-mark { transition: none; }
    a:hover > .arn-vid-thumb img, a:hover .arn-vid-mark, .arn-vid-play:hover .arn-vid-mark { transform: none; }
}
