/*
 * منصة التطوع — the visual identity from docs/volunteering-prototype/SPEC-ar.md.
 *
 * Its own stylesheet rather than an extension of theme.css. The volunteering platform has a
 * different palette (clay orange on warm beige, against HR's), a public face HR does not have, and a
 * printed certificate nothing else in this application needs. Sharing a file would have meant every
 * HR page downloading certificate rules and every VO page carrying the candidate board's.
 *
 * **The font is Foda, the same face نظام الموارد البشرية uses.** Faris's decision, 2026-09-03. It
 * replaces the system stack the spec fell back to, and it is not a Google Fonts link — `font-src
 * 'self'` forbids those, so the file is served from this application beside theme.css's own
 * `@font-face` for the same family. One face across the portals is the point: a volunteer arriving
 * from the association's site should not meet a different typeface on the way.
 *
 * The vo.* pages carry no inline styles except one: the width of a progress bar, which is per-row
 * data and cannot come from a stylesheet. Everything else lives here, unlike landing.blade.php —
 * which is built almost entirely from inline `style="…"` and is the reason `style-src` still has to
 * allow 'unsafe-inline'.
 */

/*
 * Declared here as well as in theme.css, not shared from it. A VO page loads vo.css alone — the two
 * stylesheets are never on the same document — so a page that inherited the rule would download no
 * font at all. The browser resolves the duplicate to one cached file.
 */
@font-face {
    font-family: "Foda";
    src: url("../fonts/foda.ttf") format("opentype");
    font-display: swap;
    font-style: normal;
    font-weight: 400;
}

:root {
    --vo-primary: #C0451A;
    --vo-primary-hover: #9A360F;
    --vo-accent: #D08A3C;
    --vo-bg: #FAF6F2;
    --vo-card: #FFFFFF;
    --vo-border: #EADFD7;
    --vo-text: #2B2320;
    --vo-muted: #6E5F57;
    --vo-radius: 14px;
    --vo-radius-lg: 22px;
    --vo-radius-sm: 10px;
    --vo-font: "Foda", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body.vo {
    margin: 0;
    background: var(--vo-bg);
    color: var(--vo-text);
    font-family: var(--vo-font);
    line-height: 1.7;
}

/*
 * `:not(.vo-btn)` matters more than it looks. `.vo a` scores (0,1,1) and `.vo-btn` scores (0,1,0), so
 * this rule was beating the button's own `color: #fff` no matter how far below it that sat — every
 * `<a class="vo-btn">` on منصة التطوع drew clay text on a clay background and read as a blank slab.
 * A `<button class="vo-btn">` was never affected, which is why the coordinator's screens looked fine
 * and only the public page's links were unreadable.
 */
.vo a:not(.vo-btn) { color: var(--vo-primary); }

/*
 * Hidden above the viewport, not 9999px to the side.
 *
 * `inset-inline-start: -9999px` is the old trick and it is wrong in an RTL document: the inline start
 * is the **right** edge, so the link landed 9999px past it and gave `<html>` a scrollWidth of 11,224
 * against a 1,225px viewport. Every page on this host could be dragged sideways into ten thousand
 * pixels of empty beige, which is most obvious on a phone — and it is why a full-page screenshot of
 * this site came back blank: the capture spanned the whole scroll width and the real page was an
 * eleven-percent sliver of it.
 *
 * Moving it up instead costs nothing: overflow above the top of the document never becomes a
 * scrollbar, in either direction.
 */
.vo-skip {
    position: absolute;
    inset-inline-start: 1rem;
    top: 1rem;
    transform: translateY(-400%);
}
.vo-skip:focus {
    transform: none;
    z-index: 10;
    background: var(--vo-card);
    padding: .6rem 1rem;
    border-radius: var(--vo-radius-sm);
}

.vo-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---- header ---- */

.vo-header {
    background: var(--vo-card);
    border-bottom: 1px solid var(--vo-border);
    position: sticky;
    top: 0;
    z-index: 5;
}
.vo-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 0;
    flex-wrap: wrap;
}
.vo-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: inherit;
}
.vo-brand img { height: 44px; width: auto; }
.vo-brand strong { display: block; font-size: 1.05rem; }
.vo-brand small { color: var(--vo-muted); font-size: .8rem; }

/* ---- buttons ---- */

.vo-btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: var(--vo-radius-sm);
    padding: .6rem 1.2rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    background: var(--vo-primary);
    color: #fff;
}
.vo-btn:hover { background: var(--vo-primary-hover); }
.vo-btn--ghost {
    background: transparent;
    color: var(--vo-primary);
    border-color: var(--vo-border);
}
.vo-btn--ghost:hover { background: #fff; color: var(--vo-primary-hover); }
.vo-btn--sm { padding: .35rem .7rem; font-size: .85rem; }
.vo-btn--danger { background: #8d2b2b; }
.vo-btn--danger:hover { background: #6f2020; }

/* ---- hero ---- */

/*
 * Full-bleed since 2026-09-03. `main` no longer carries `vo-wrap`, so this section spans the
 * viewport and `vo-hero__inner` does the centring.
 *
 * The photograph is an `<img>` and not a `background-image`, deliberately: `srcset` hands a phone the
 * 960px file, and a background image cannot be given one — every visitor would pull 210KB over mobile
 * data to see it scaled down.
 */
.vo-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 32rem;
    background: var(--vo-text);
    overflow: hidden;
}
.vo-hero__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* The briefing group sits left of centre; this keeps them clear of the reading column. */
    object-position: 22% 42%;
}
/*
 * Two scrims. The lower one carries the figures across the full width; the side one darkens the
 * reading column. `left`/`right` in CSS are physical and do not flip with `dir`, so the second
 * gradient is written to darken the right — which is where the RTL text sits.
 */
.vo-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(43, 35, 32, .78) 0%, rgba(43, 35, 32, 0) 46%),
        linear-gradient(to left, rgba(43, 35, 32, .93) 0%, rgba(43, 35, 32, .84) 34%,
                        rgba(43, 35, 32, .42) 64%, rgba(43, 35, 32, .08) 100%);
}
.vo-hero__inner {
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 3.5rem 1.25rem 2.75rem;
}
.vo-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 999px;
    padding: .4rem .95rem;
    font-size: .88rem;
}
.vo-hero__pulse {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: #7BD88F;
    box-shadow: 0 0 0 .25rem rgba(123, 216, 143, .25);
}
.vo-hero h1 {
    font-size: clamp(1.9rem, 4.4vw, 3rem);
    margin: 1rem 0 .6rem;
    line-height: 1.3;
    max-width: 20ch;
}
.vo-hero p { color: #EADFD7; font-size: 1.05rem; max-width: 50ch; margin: 0; }
.vo-hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.vo-hero .vo-btn--ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .38); }
.vo-hero .vo-btn--ghost:hover { background: rgba(255, 255, 255, .2); }

.vo-hero__figures {
    display: flex;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .2);
}
.vo-hero__figure { padding-left: 2.5rem; margin-left: 2.5rem; border-left: 1px solid rgba(255, 255, 255, .2); }
.vo-hero__figure:last-child { padding-left: 0; margin-left: 0; border-left: 0; }
.vo-hero__figure b { display: block; font-size: 1.9rem; line-height: 1.2; }
.vo-hero__figure span { font-size: .9rem; color: #D8C8BE; }
/* Says whose numbers these are. Without it the hero implies the platform counted them. */
.vo-hero__source { margin: .8rem 0 0; font-size: .82rem; color: #BFACA1; }

.vo-badge {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--vo-border);
    color: var(--vo-primary);
    border-radius: 999px;
    padding: .3rem .9rem;
    font-size: .85rem;
    font-weight: 600;
}
.vo-stat {
    background: var(--vo-card);
    border: 1px solid var(--vo-border);
    border-radius: var(--vo-radius);
    padding: 1rem 1.2rem;
}
.vo-stat strong { display: block; font-size: 1.8rem; color: var(--vo-primary); line-height: 1.2; }
.vo-stat span { color: var(--vo-muted); font-size: .9rem; }

/* ---- أرقام التطوع في الجمعية ---- */

/*
 * Replaced «الشريط التحفيزي», whose heading repeated the hero's `<h1>` verbatim.
 *
 * Full-bleed like the hero, and on the clay ground rather than a card: these are the association's
 * published figures and the band is the page saying so out loud, not a widget among widgets.
 */
.vo-figures { background: var(--vo-primary); color: #fff; }
.vo-figures__grid {
    display: grid;
    grid-template-columns: 46% 1fr;
    gap: 2.75rem;
    align-items: center;
    padding-top: 3rem;
    padding-bottom: 3rem;
}
.vo-figures__photo { align-self: stretch; min-height: 17rem; position: relative; }
.vo-figures__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--vo-radius);
}
.vo-figures h2 { margin: 0 0 .5rem; font-size: 1.6rem; }
.vo-figures__note { margin: 0 0 1.75rem; color: #F8DED2; max-width: 48ch; }

.vo-year + .vo-year { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .25); }
.vo-year__label {
    display: inline-block;
    font-size: .9rem;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 4px;
    padding: .15rem .7rem;
    margin-bottom: 1rem;
}
/*
 * A `<dl>`, not a table: four labelled figures are a description list, and a screen reader then
 * reads «الساعات التطوعية: 22,248» instead of walking a grid that has no header row.
 */
.vo-year__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 1.5rem; margin: 0; }
.vo-year__list dt { font-size: .88rem; color: #F8DED2; }
.vo-year__list dd { margin: .15rem 0 0; font-size: 1.75rem; line-height: 1.15; }
.vo-year__rate { margin: 1.25rem 0 0; font-size: .92rem; color: #F8DED2; }
.vo-year__rate b { font-weight: 400; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .45); }

/* ---- من الميدان ---- */

/* Two photographs, edge to edge, with no copy competing with them. */
.vo-gallery { display: grid; grid-template-columns: 1fr 1fr; }
.vo-gallery figure { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.vo-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vo-gallery figcaption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.5rem 1.25rem .9rem;
    color: #fff;
    font-size: .9rem;
    background: linear-gradient(to top, rgba(43, 35, 32, .85), rgba(43, 35, 32, 0));
}

/* ---- sections ---- */

.vo-section { margin: 0 0 2.75rem; }
/* Login and the registration receipt: one card, not a full-width column of text. */
.vo-section--narrow { max-width: 540px; margin-inline: auto; padding-top: 2.5rem; }
.vo-section--spaced { margin-top: 2rem; }
/* Action buttons in a table cell: each is its own POST form, so they must not stack. */
.vo-inline { display: inline-block; }
.vo-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.vo-section h2 { font-size: 1.4rem; margin: 0; }
.vo-section__note { color: var(--vo-muted); font-size: .9rem; }

.vo-grid { display: grid; gap: 1rem; }
.vo-grid--3 { grid-template-columns: repeat(3, 1fr); }
.vo-grid--2 { grid-template-columns: repeat(2, 1fr); }
.vo-grid--4 { grid-template-columns: repeat(4, 1fr); }

.vo-card {
    background: var(--vo-card);
    border: 1px solid var(--vo-border);
    border-radius: var(--vo-radius);
    padding: 1.15rem 1.25rem;
}
.vo-card h3 { margin: .2rem 0 .5rem; font-size: 1.1rem; }

/* top volunteers */
.vo-rank { position: relative; }
.vo-rank--first { background: linear-gradient(160deg, #fff 55%, #FBEFE3); border-color: var(--vo-accent); }
.vo-rank__no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--vo-bg);
    border: 1px solid var(--vo-border);
    font-weight: 700;
    color: var(--vo-muted);
}
.vo-rank--first .vo-rank__no { background: var(--vo-accent); color: #fff; border-color: var(--vo-accent); }
.vo-rank__hours { font-size: 1.5rem; font-weight: 700; color: var(--vo-primary); }

/* opportunity card */
.vo-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.vo-tag {
    background: var(--vo-bg);
    border: 1px solid var(--vo-border);
    border-radius: 999px;
    padding: .15rem .7rem;
    font-size: .78rem;
    color: var(--vo-muted);
}
.vo-tag--accent { background: #FBEFE3; border-color: var(--vo-accent); color: #8a5518; }
.vo-meta { display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--vo-muted); font-size: .88rem; }
.vo-bar {
    height: 8px;
    background: var(--vo-bg);
    border-radius: 999px;
    overflow: hidden;
    margin-top: .7rem;
    border: 1px solid var(--vo-border);
}
.vo-bar__fill { height: 100%; background: var(--vo-accent); }

/* ---- forms ---- */

.vo-form { display: grid; gap: 1.1rem; }
.vo-fieldset {
    border: 1px solid var(--vo-border);
    border-radius: var(--vo-radius);
    padding: 1.1rem 1.25rem;
    background: var(--vo-card);
}
.vo-fieldset legend { font-weight: 700; padding: 0 .4rem; }
.vo-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
/* A field that needs the full row -- a textarea, a group of checkboxes. */
.vo-field--wide { grid-column: 1 / -1; }
.vo-field { display: grid; gap: .35rem; }
.vo-field label { font-weight: 600; font-size: .92rem; }
.vo-field input,
.vo-field select,
.vo-field textarea {
    font: inherit;
    padding: .55rem .7rem;
    border: 1px solid var(--vo-border);
    border-radius: var(--vo-radius-sm);
    background: #fff;
    color: inherit;
    width: 100%;
}
.vo-field input:focus,
.vo-field select:focus,
.vo-field textarea:focus {
    outline: 2px solid var(--vo-accent);
    outline-offset: 1px;
}
.vo-field small { color: var(--vo-muted); font-size: .8rem; }
.vo-checks { display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.vo-check { display: flex; align-items: center; gap: .35rem; font-size: .9rem; }
.vo-check input { width: auto; }

/*
 * the honeypot: present in the DOM, never seen, never announced
 *
 * Clipped in place rather than pushed to `left: -9999px`. This document is RTL, and in RTL the
 * *left* is the overflowing side that scrolls: that one declaration gave every page carrying the
 * registration form a scrollWidth of 11,224 against a 1,225px viewport, so the whole site could be
 * dragged sideways into ten thousand pixels of empty beige — worst on a phone, where it reads as the
 * page falling apart under the thumb.
 *
 * `clip-path: inset(50%)` hides it without moving it. The field stays in the DOM, keeps its name and
 * its size, and a script filling every input still walks into it — which is the entire point of a
 * honeypot and the reason this is not `display: none`.
 */
.vo-hp {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.vo-error { color: #9d2727; font-size: .85rem; }
.vo-errors {
    background: #fdf0f0;
    border: 1px solid #e7c3c3;
    color: #7d2020;
    border-radius: var(--vo-radius-sm);
    padding: .8rem 1rem;
    margin-bottom: 1rem;
}
.vo-errors ul { margin: .3rem 0 0; padding-inline-start: 1.2rem; }

.vo-message {
    border-radius: var(--vo-radius-sm);
    padding: .8rem 1rem;
    margin-bottom: 1.2rem;
    border: 1px solid var(--vo-border);
    background: #fff;
}
.vo-message[data-type="success"] { background: #eef7ef; border-color: #bcd9c0; color: #23532c; }
.vo-message[data-type="warning"] { background: #fdf5e8; border-color: #e6d2ab; color: #7a5713; }

/* ---- tables ---- */

.vo-table-wrap { overflow-x: auto; }
.vo-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--vo-card);
    border: 1px solid var(--vo-border);
    border-radius: var(--vo-radius);
    overflow: hidden;
}
.vo-table th,
.vo-table td {
    padding: .65rem .8rem;
    text-align: start;
    border-bottom: 1px solid var(--vo-border);
    font-size: .92rem;
}
.vo-table th { background: var(--vo-bg); font-size: .85rem; color: var(--vo-muted); }
.vo-table tr:last-child td { border-bottom: 0; }
.vo-table td small { color: var(--vo-muted); display: block; }

.vo-empty {
    text-align: center;
    color: var(--vo-muted);
    padding: 2.5rem 1rem;
    background: var(--vo-card);
    border: 1px dashed var(--vo-border);
    border-radius: var(--vo-radius);
}

/* ---- coordinator shell ---- */

.vo-topbar {
    background: var(--vo-card);
    border-bottom: 1px solid var(--vo-border);
}
.vo-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 0;
    flex-wrap: wrap;
}
.vo-user { text-align: start; }
.vo-user strong { display: block; font-size: .95rem; }
.vo-user small { color: var(--vo-muted); font-size: .8rem; }
.vo-topbar__actions { display: flex; align-items: center; gap: .8rem; }

.vo-nav {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
    padding: .6rem 0;
    border-bottom: 1px solid var(--vo-border);
    background: var(--vo-bg);
}
.vo-nav a {
    padding: .4rem .9rem;
    border-radius: var(--vo-radius-sm);
    text-decoration: none;
    color: var(--vo-muted);
    font-size: .92rem;
    font-weight: 600;
}
.vo-nav a:hover { background: #fff; }
.vo-nav a.is-active { background: var(--vo-primary); color: #fff; }

.vo-main { padding: 1.75rem 0 3rem; }
.vo-main h1 { font-size: 1.5rem; margin: 0 0 1.2rem; }

/* ---- bars ---- */

.vo-progress { display: grid; gap: .6rem; }
.vo-progress__row { display: grid; grid-template-columns: 12rem 1fr auto; gap: .8rem; align-items: center; }
.vo-progress__track { height: 10px; background: var(--vo-bg); border: 1px solid var(--vo-border); border-radius: 999px; overflow: hidden; }
.vo-progress__fill { height: 100%; background: var(--vo-primary); }
.vo-progress__label { font-size: .9rem; }
.vo-progress__value { font-size: .9rem; color: var(--vo-muted); }

/* ---- footer ---- */

.vo-footer {
    border-top: 1px solid var(--vo-border);
    background: var(--vo-card);
    padding: 1.5rem 0;
    color: var(--vo-muted);
    font-size: .88rem;
}
.vo-footer__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* ---- certificate ----
 *
 * Drawn at a fixed 1000x707 and scaled for the screen with a transform, so printing is always the
 * full size no matter how narrow the window was. `transform` and not `zoom`: zoom is not in any
 * standard and prints inconsistently.
 */

/*
 * The stage sets its own height to match the scaled certificate. A `transform: scale()` does not
 * change the space the element reserves, so without this every narrow screen would show the
 * certificate followed by a few hundred pixels of nothing.
 *
 * Stepped media queries rather than a script that measures the container: `script-src 'self'`
 * allows a file, but a certificate that only renders at the right size once JavaScript has run is a
 * certificate that prints wrong when it has not. The steps below never crop — they only shrink.
 */
.vo-cert-stage {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    height: 707px;
}

@media (max-width: 1080px) {
    .vo-cert { transform: scale(.86); }
    .vo-cert-stage { height: 608px; }
}
@media (max-width: 900px) {
    .vo-cert { transform: scale(.72); }
    .vo-cert-stage { height: 509px; }
}
@media (max-width: 720px) {
    .vo-cert { transform: scale(.56); }
    .vo-cert-stage { height: 396px; }
}
@media (max-width: 560px) {
    .vo-cert { transform: scale(.42); }
    .vo-cert-stage { height: 297px; }
}
@media (max-width: 420px) {
    .vo-cert { transform: scale(.32); }
    .vo-cert-stage { height: 226px; }
}
.vo-cert {
    width: 1000px;
    height: 707px;
    flex: none;
    position: relative;
    background: #fff;
    transform-origin: top center;
    font-family: var(--vo-font);
    color: var(--vo-text);
}
.vo-cert__inner { position: absolute; inset: 0; padding: 56px 64px; display: flex; flex-direction: column; }

/* national */
.vo-cert--national { background: linear-gradient(135deg, #0f5a52 0%, #12726a 45%, #1d8b7d 100%); color: #fff; }
.vo-cert--national .vo-cert__panel {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    background: rgba(255, 255, 255, .07);
    border-inline-end: 1px solid rgba(255, 255, 255, .18);
}
.vo-cert--national .vo-cert__body { margin-inline-start: 240px; }
.vo-cert--national .vo-cert__en { opacity: .75; font-size: 15px; letter-spacing: .04em; }

/* classic */
.vo-cert--classic { border: 14px double var(--vo-primary); }
.vo-cert--classic .vo-cert__body { text-align: center; }

.vo-cert h1 { font-size: 40px; margin: 0 0 6px; }
.vo-cert h2 { font-size: 22px; margin: 0 0 28px; font-weight: 500; }
.vo-cert__name { font-size: 44px; font-weight: 700; margin: 18px 0; color: var(--vo-accent); }
.vo-cert--classic .vo-cert__name { color: var(--vo-primary); }
.vo-cert__text { font-size: 19px; line-height: 2; }
.vo-cert__foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 14px;
    gap: 1rem;
}
.vo-cert__code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; }
.vo-cert__logo { height: 64px; width: auto; }
.vo-cert__qr {
    width: 92px;
    height: 92px;
    border: 1px dashed currentColor;
    opacity: .55;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    text-align: center;
    border-radius: 6px;
}

.vo-cert-bar {
    display: flex;
    gap: .8rem;
    align-items: center;
    flex-wrap: wrap;
    background: var(--vo-card);
    border: 1px solid var(--vo-border);
    border-radius: var(--vo-radius);
    padding: .8rem 1rem;
    margin-bottom: 1.2rem;
}
.vo-cert-picker { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .4rem; margin-top: 1.2rem; }
.vo-cert-picker a {
    flex: none;
    min-width: 190px;
    background: var(--vo-card);
    border: 1px solid var(--vo-border);
    border-radius: var(--vo-radius-sm);
    padding: .6rem .8rem;
    text-decoration: none;
    color: inherit;
    font-size: .85rem;
}
.vo-cert-picker a.is-active { border-color: var(--vo-primary); box-shadow: inset 0 0 0 1px var(--vo-primary); }
.vo-cert-picker strong { display: block; }
.vo-cert-picker small { color: var(--vo-muted); }

/* ---- responsive ---- */

@media (max-width: 900px) {
    .vo-grid--3, .vo-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .vo-fields { grid-template-columns: 1fr; }
    .vo-progress__row { grid-template-columns: 8rem 1fr auto; }

    /* The photograph goes above the figures rather than beside them, and keeps a real height. */
    .vo-figures__grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .vo-figures__photo { min-height: 13rem; }
}

@media (max-width: 760px) {
    .vo-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .vo-grid--2, .vo-grid--3, .vo-grid--4 { grid-template-columns: 1fr; }

    /*
     * The hero's side scrim is dropped: at this width the text spans the photograph, so a gradient
     * that clears the left edge leaves half the words on bare highlights. A flat wash replaces it.
     */
    .vo-hero { min-height: 28rem; }
    .vo-hero::after { background: linear-gradient(to top, rgba(43, 35, 32, .92) 12%, rgba(43, 35, 32, .55) 100%); }
    .vo-hero__inner { padding-top: 2.5rem; }
    .vo-hero__figure { padding-left: 1.25rem; margin-left: 1.25rem; }
    .vo-hero__figure b { font-size: 1.5rem; }
    .vo-hero__figure span { font-size: .8rem; }
    .vo-year__list { grid-template-columns: 1fr; gap: .9rem; }
}

/* ---- print ----
 *
 * «الشهادة تُطبع وحدها بمقاسها الكامل (الصفحة تُخفى ما عداها)».
 */

@media print {
    body.vo { background: #fff; }
    .vo-header, .vo-topbar, .vo-nav, .vo-footer, .vo-cert-bar, .vo-cert-picker, .vo-no-print {
        display: none !important;
    }
    /* Full size on paper, whatever the window was when it was opened. */
    .vo-cert-stage { overflow: visible; height: auto; }
    .vo-cert { transform: none !important; box-shadow: none; }
    .vo-main, .vo-wrap { padding: 0; max-width: none; }
    .vo-table { border-color: #ccc; }
    @page { size: A4 landscape; margin: 10mm; }
}
