/* ─────────────────────────────────────────────────────────────────────────
   Gov-AIdeaS videos: /videos/ and the homepage band (templates/videos/*.html).
   Ported from LGU Portal Pro (static/css/explainer-videos.css). Classes are
   prefixed ev-. Gov-AIdeaS additions (buttons, the data-saver switch, dark
   mode) are at the end, since this site has Tailwind, not Bootstrap.
   ───────────────────────────────────────────────────────────────────────── */

.ev-page {
    --ev-accent: #2563eb;
    --ev-accent-soft: #e8f0fe;
    --ev-ink: #0f172a;
    --ev-body: #475569;
    --ev-line: var(--border-color, #e4e7ed);
    --ev-card: var(--card-bg-color, #fff);
    --ev-radius: 1rem;
}

.ev-muted { color: var(--ev-body, #475569); font-weight: 400; }

/* Focus that shows on every surface; white on the dark band. */
.ev-page a:focus-visible,
.ev-page button:focus-visible,
.ev-page summary:focus-visible,
.ev-page input:focus-visible,
.ev-home a:focus-visible,
.ev-page video:focus-visible {
    outline: 3px solid var(--ev-accent, #2563eb);
    outline-offset: 2px;
    border-radius: .375rem;
}
.ev-cta a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ev-page .ev-title:focus { outline: none; }
.ev-page .ev-title:focus-visible { outline: 3px solid var(--ev-accent); outline-offset: 4px; }

/* ── Intro and the demonstration notice ───────────────────────────────── */
.ev-intro {
    /* Full width, in line with the notice and player below it (no 72ch cap on this site). */
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--ev-body);
    margin-bottom: 1.25rem;
}
.ev-demo {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    background: #f1f5f9;
    border: 1px solid #dbe3ee;
    border-left: 4px solid var(--ev-accent);
    border-radius: .75rem;
    padding: .875rem 1rem;
    color: #334155;
    margin-bottom: 2rem;
}
.ev-demo .fa, .ev-demo .fas { color: var(--ev-accent); margin-top: .2rem; }
.ev-demo p { margin: 0; }
.ev-demo .ev-credit { margin-top: .375rem; font-size: .8125rem; color: var(--ev-body); }
.ev-demo .ev-credit a { color: var(--ev-accent); text-decoration: underline; text-underline-offset: 2px; }

/* ── Player ───────────────────────────────────────────────────────────── */
.ev-player {
    background: var(--ev-card);
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
    padding: 1.25rem;
    margin-bottom: 3rem;
    scroll-margin-top: 5rem;
}
@media (min-width: 992px) { .ev-player { padding: 1.75rem; } }

.ev-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0b1220;
    border-radius: .875rem;
    overflow: hidden;
}
.ev-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0b1220;
}
.ev-video::cue {
    font-size: 1.05em;
    line-height: 1.35;
    background: rgba(0, 21, 46, .82);
    color: #fff;
}

.ev-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-top: .875rem;
}
.ev-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.ev-toolbar .btn { min-height: 44px; display: inline-flex; align-items: center; }
/* inline-flex drops the space between "Download MP4" and its size */
#ev-download-size { margin-left: .3em; }
.ev-saver { display: flex; align-items: center; gap: .5rem; min-height: 44px; }
.ev-saver .form-check-input { width: 2.5em; height: 1.35em; cursor: pointer; }
.ev-saver .form-check-label { cursor: pointer; color: var(--ev-ink); }
.ev-note, .ev-error { margin: .75rem 0 0; color: var(--ev-body); font-size: .9375rem; }
.ev-error { color: #9f1239; }

/* The panel beside the video */
.ev-kicker {
    margin: 0 0 .35rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ev-accent);
}
.ev-title {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 800;
    margin: 0 0 .75rem;
    color: var(--heading-color, var(--ev-ink));
    overflow-wrap: anywhere;
}
.ev-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .875rem; }
.ev-chip {
    display: inline-flex;
    align-items: center;
    background: var(--ev-accent-soft);
    color: #0b3d91;
    border-radius: 999px;
    padding: .3rem .75rem;
    font-size: .8125rem;
    font-weight: 600;
}
.ev-length { color: var(--ev-body); font-size: .875rem; font-weight: 600; }
.ev-desc { color: var(--ev-body); line-height: 1.6; margin-bottom: 1.25rem; }
.ev-h3 {
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ev-ink);
    margin: 0 0 .5rem;
}
.ev-chapters {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    max-height: 19rem;
    overflow-y: auto;
    border: 1px solid var(--ev-line);
    border-radius: .75rem;
}
.ev-chapters li + li { border-top: 1px solid var(--ev-line); }
.ev-chapters a {
    display: flex;
    gap: .75rem;
    align-items: baseline;
    min-height: 44px;
    padding: .625rem .875rem;
    color: var(--ev-ink);
    text-decoration: none;
}
.ev-chapters a:hover { background: #f8fafc; }
.ev-chapters a[aria-current="true"] { background: var(--ev-accent-soft); font-weight: 700; }
.ev-time {
    flex: none;
    min-width: 3.25rem;
    font-variant-numeric: tabular-nums;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--ev-accent);
}
.ev-chapter-title { overflow-wrap: anywhere; }

.ev-transcript {
    border: 1px solid var(--ev-line);
    border-radius: .75rem;
}
.ev-transcript summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: .625rem .875rem;
    font-weight: 600;
    color: var(--ev-ink);
}
.ev-transcript-body {
    max-height: 22rem;
    overflow-y: auto;
    padding: 0 .875rem .75rem;
    color: var(--ev-body);
    line-height: 1.6;
}
.ev-h4 { font-size: .9375rem; font-weight: 700; color: var(--ev-ink); margin: .875rem 0 .375rem; }

/* ── All videos ───────────────────────────────────────────────────────── */
.ev-all { scroll-margin-top: 5rem; }
.ev-section-head { margin-bottom: 1.25rem; }
.ev-section-head h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: .25rem; }
.ev-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
    gap: 1.5rem;
}
.ev-card {
    display: flex;
    flex-direction: column;
    background: var(--ev-card);
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-radius);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.ev-card:hover { box-shadow: 0 12px 28px rgba(15, 23, 42, .1); transform: translateY(-2px); }
.ev-card.is-current { border-color: var(--ev-accent); box-shadow: 0 0 0 2px rgba(37, 99, 235, .25); }

.ev-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #0b1220; }
.ev-thumb img, .ev-home-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Bottom-left, opposite the duration: the posters carry their own title text in the middle. */
.ev-play-icon {
    position: absolute;
    left: .75rem;
    bottom: .75rem;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .92);
    color: #0b3d91;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.ev-play-icon .fa-play { margin-left: .2rem; }
/* Large only where the poster is wide enough: on a phone it covers the poster's subtitle. */
@media (min-width: 768px) { .ev-play-icon-lg { width: 4.5rem; height: 4.5rem; font-size: 1.5rem; } }
.ev-duration {
    position: absolute;
    right: .5rem;
    bottom: .5rem;
    background: rgba(0, 0, 0, .8);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding: .15rem .45rem;
    border-radius: .375rem;
}
.ev-card-body { display: flex; flex-direction: column; flex: 1; padding: 1rem 1.125rem 1.25rem; }
.ev-card-kicker {
    margin: 0 0 .25rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ev-accent);
}
.ev-card-title { font-size: 1.125rem; font-weight: 800; line-height: 1.3; margin: 0 0 .375rem; overflow-wrap: anywhere; }
.ev-card-audience { font-size: .8125rem; font-weight: 600; color: #0b3d91; margin: 0 0 .5rem; }
.ev-card-summary { color: var(--ev-body); font-size: .9375rem; line-height: 1.55; flex: 1; margin-bottom: 1rem; }
.ev-card-play { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; padding-inline: 1rem; }
.ev-card-play[aria-current="true"] { background: #0b3d91; border-color: #0b3d91; }

/* ── Book a demo day ──────────────────────────────────────────────────── */
.ev-cta {
    background: linear-gradient(135deg, #0b1f3a 0%, #0f2f5c 55%, #12407a 100%);
    color: #fff;
    padding: 3rem 0;
}
.ev-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.ev-cta-copy { max-width: 40rem; }
.ev-cta-kicker {
    margin: 0 0 .35rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fcd34d;
}
.ev-cta h2 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.ev-cta p { color: rgba(255, 255, 255, .85); }
.ev-contact-name { font-weight: 700; font-size: 1.125rem; color: #fff !important; margin-bottom: .75rem; }
.ev-contact-org { font-weight: 400; color: rgba(255, 255, 255, .8); }
.ev-contact-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.ev-contact-links .btn { min-height: 44px; display: inline-flex; align-items: center; }

/* ── Coming soon ──────────────────────────────────────────────────────── */
.ev-soon {
    max-width: 36rem;
    margin: 1rem auto 2rem;
    text-align: center;
    background: var(--ev-card);
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-radius);
    padding: 2.5rem 1.5rem;
}
.ev-soon .fa-film { font-size: 2.5rem; color: var(--ev-accent); margin-bottom: 1rem; }
.ev-soon h2 { font-size: 1.5rem; font-weight: 800; }
.ev-soon p { color: var(--ev-body); }

/* ── Homepage band ────────────────────────────────────────────────────── */
.ev-home { margin-top: 3rem; margin-bottom: 1rem; }
.ev-home-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    background: var(--card-bg-color, #fff);
    border: 1px solid var(--border-color, #e4e7ed);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .08);
}
@media (min-width: 768px) { .ev-home-card { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.ev-home-poster { position: relative; display: block; aspect-ratio: 16 / 9; background: #0b1220; }
@media (min-width: 768px) { .ev-home-poster { aspect-ratio: auto; min-height: 100%; } }
.ev-home-body { padding: 1.75rem 1.5rem; display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 992px) { .ev-home-body { padding: 2.25rem 2.5rem; } }
.ev-home .ev-kicker { color: #2563eb; }
.ev-home-title { font-size: 1.75rem; font-weight: 800; line-height: 1.2; margin-bottom: .75rem; }
.ev-home-pitch { color: #475569; line-height: 1.65; margin-bottom: .75rem; }
.ev-home-demo { color: #475569; font-size: .875rem; margin-bottom: 1.25rem; }
.ev-home-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.ev-home-actions .btn { min-height: 44px; display: inline-flex; align-items: center; }
.ev-btn-meta { margin-left: .35rem; opacity: .85; font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
    .ev-card, .ev-card:hover { transition: none; transform: none; }
}

@media (max-width: 575.98px) {
    .ev-player { padding: .875rem; border-radius: .875rem; }
    .ev-title { font-size: 1.3rem; }
    .ev-actions { margin-left: 0; }
    .ev-cta h2 { font-size: 1.6rem; }
}

/* ── Gov-AIdeaS additions ───────────────────────────────────────────────── */

.ev-home { --ev-accent: #2563eb; --ev-accent-soft: #e8f0fe; --ev-ink: #0f172a; --ev-body: #475569; --ev-line: #e4e7ed; --ev-card: #fff; --ev-radius: 1rem; margin-top: 1.5rem; margin-bottom: 1.5rem; }
.ev-page p, .ev-home p { margin-bottom: .75rem; }
.ev-page h2, .ev-page h3, .ev-page h4 { color: var(--ev-ink); }

/* Buttons (Bootstrap's .btn on LGU Portal Pro). */
.ev-btn {
    display: inline-flex; align-items: center; gap: .25rem; min-height: 44px;
    padding: .5rem 1rem; border-radius: .5rem; font-weight: 600; font-size: .9375rem;
    text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, color .15s;
}
.ev-btn-primary { background: var(--ev-accent, #2563eb); color: #fff; }
.ev-btn-primary:hover { background: #1d4ed8; color: #fff; }
.ev-btn-alt { background: var(--ev-accent-soft, #e8f0fe); color: var(--ev-accent, #2563eb); border-color: #c7d7fb; }
.ev-btn-alt:hover { background: #dbe7fd; }
.ev-btn-meta { font-weight: 400; opacity: .85; }

/* The data-saver switch (Bootstrap's .form-switch on LGU Portal Pro). */
.ev-saver { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; color: var(--ev-ink); }
.ev-saver[hidden] { display: none; }
.ev-saver input {
    appearance: none; -webkit-appearance: none; width: 2.5em; height: 1.35em; border-radius: 1em;
    background: #cbd5e1; position: relative; cursor: pointer; transition: background-color .15s; flex: none; margin: 0;
}
.ev-saver input::after {
    content: ""; position: absolute; top: .15em; left: .15em; width: 1.05em; height: 1.05em;
    border-radius: 50%; background: #fff; transition: transform .15s;
}
.ev-saver input:checked { background: var(--ev-accent, #2563eb); }
.ev-saver input:checked::after { transform: translateX(1.15em); }
.ev-toolbar [hidden] { display: none !important; }

/* No dark-mode overrides: static/js/ui-enhancements.js adds .dark to <html> for a dark OS
   theme, but the site's pages stay light, so these videos stay light with them. */
