
/* Production hardening: the HTML hidden state must override modal layout rules. */
.tag-video-modal[hidden] { display: none !important; }
/*
 * Thoughts About God — Main Video Resource Library v6.0
 * Scope: canonical /videos/ landing page only.
 * Shared full-width, focus, reduced-motion and MFM navigation rules live in
 * tag-resource-library.css.
 */
.tag-video-library,
.tag-video-modal {
    --tag-video-navy: #182b3c;
    --tag-video-navy-2: #223b51;
    --tag-video-burgundy: #7a2632;
    --tag-video-gold: #b78b32;
    --tag-video-cream: #f8f5ef;
    --tag-video-paper: #ffffff;
    --tag-video-text: #24292e;
    --tag-video-muted: #66717a;
    --tag-video-border: #e2dcd2;
    --tag-video-radius: 14px;
    --tag-video-shadow: 0 12px 34px rgba(20, 33, 44, .10);
}

.tag-video-library {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(28px, 4vw, 58px) 0 clamp(54px, 7vw, 86px);
    color: var(--tag-video-text);
    background: var(--tag-video-cream);
}

.tag-video-library button,
.tag-video-library input { font: inherit; }

.tag-video-library a { text-decoration: none; }

.tag-video-library__inner {
    width: min(1320px, calc(100% - 40px));
    max-width: none;
    margin-inline: auto;
}

.tag-video-library__header {
    position: relative;
    overflow: hidden;
    margin: 0 0 24px;
    padding: clamp(30px, 5vw, 58px);
    border: 1px solid rgba(24, 43, 60, .10);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--tag-video-navy), var(--tag-video-navy-2));
    box-shadow: var(--tag-video-shadow);
    color: #fff;
}

.tag-video-library__header::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 14% 18%, rgba(183, 139, 50, .18), transparent 33%),
        radial-gradient(circle at 88% 72%, rgba(255,255,255,.07), transparent 31%);
}

.tag-video-library__header > * { position: relative; z-index: 1; }

.tag-video-library__eyebrow,
.tag-video-library__section-kicker,
.tag-video-modal__eyebrow {
    margin: 0 0 8px;
    color: var(--tag-video-gold);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.tag-video-library__title {
    max-width: 900px;
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(2rem, 4.5vw, 3.65rem);
    line-height: 1.06;
    letter-spacing: -.025em;
}

.tag-video-library__lead {
    max-width: 790px;
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: clamp(1rem, 1.55vw, 1.12rem);
    line-height: 1.7;
}

.tag-video-library__intro {
    max-width: 920px;
    margin-top: 18px;
    color: rgba(255,255,255,.88);
}

.tag-video-library__intro a { color: #f1cf85; text-decoration: underline; text-underline-offset: 3px; }
.tag-video-library__intro > :first-child { margin-top: 0; }
.tag-video-library__intro > :last-child { margin-bottom: 0; }

.tag-video-library__quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
    padding: 12px;
    border: 1px solid var(--tag-video-border);
    border-radius: var(--tag-video-radius);
    background: rgba(255,255,255,.92);
    box-shadow: 0 5px 18px rgba(20,33,44,.05);
}

.tag-video-library__quick-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--tag-video-border);
    border-radius: 999px;
    background: #fff;
    color: var(--tag-video-navy);
    font-size: .9rem;
    font-weight: 750;
}

.tag-video-library__quick-nav a:hover,
.tag-video-library__quick-nav a:focus-visible {
    border-color: var(--tag-video-navy);
    background: var(--tag-video-navy);
    color: #fff;
}

.tag-video-library__mfm-nav { margin: 28px 0 36px; }

.tag-video-library__section {
    margin: 34px 0 0;
    scroll-margin-top: 110px;
}

.tag-video-library__section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
    padding-left: 14px;
    border-left: 4px solid var(--tag-video-burgundy);
}

.tag-video-library__section-heading h2,
.tag-video-library__more h2 {
    margin: 0;
    color: var(--tag-video-navy);
    font-size: clamp(1.35rem, 2.1vw, 1.8rem);
    line-height: 1.2;
}

.tag-video-library__section-description {
    max-width: 760px;
    margin: 6px 0 0;
    color: var(--tag-video-muted);
    font-size: .94rem;
    line-height: 1.65;
}

.tag-video-library__count {
    flex: 0 0 auto;
    min-width: 38px;
    padding: 6px 11px;
    border: 1px solid var(--tag-video-border);
    border-radius: 999px;
    background: #fff;
    color: var(--tag-video-navy);
    text-align: center;
    font-size: .84rem;
    font-weight: 800;
}

.tag-video-library__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.tag-video-library__card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--tag-video-border);
    border-radius: var(--tag-video-radius);
    background: var(--tag-video-paper);
    box-shadow: 0 4px 18px rgba(20,33,44,.05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tag-video-library__card:hover {
    transform: translateY(-2px);
    border-color: rgba(122,38,50,.32);
    box-shadow: var(--tag-video-shadow);
}

.tag-video-library__primary-link {
    appearance: none;
    display: flex;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.tag-video-library__card--video .tag-video-library__primary-link { padding: 0; }

.tag-video-library__video-poster {
    position: relative;
    display: grid;
    width: 100%;
    aspect-ratio: 16 / 9;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 28% 24%, rgba(183,139,50,.18), transparent 35%),
        linear-gradient(145deg, #142330, #0d141a 70%);
}

.tag-video-library__video-poster::after {
    content: "Watch";
    position: absolute;
    right: 12px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,.68);
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.tag-video-library__play-mark {
    width: 62px;
    height: 62px;
    border: 2px solid rgba(255,255,255,.92);
    border-radius: 50%;
    background: rgba(122,38,50,.92);
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
}

.tag-video-library__play-mark::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin: 19px 0 0 24px;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 17px solid #fff;
}

.tag-video-library__card-type {
    align-self: flex-start;
    margin: 0 0 9px;
    color: var(--tag-video-burgundy);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.tag-video-library__card--video .tag-video-library__card-type { margin: 15px 16px 7px; }

.tag-video-library__card-title {
    min-width: 0;
    color: var(--tag-video-navy);
    font-size: 1.04rem;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tag-video-library__card--video .tag-video-library__card-title { margin: 0 16px; }

.tag-video-library__card-meta {
    margin-top: 8px;
    color: var(--tag-video-muted);
    font-size: .8rem;
    line-height: 1.45;
}

.tag-video-library__card--video .tag-video-library__card-meta { margin: 8px 16px 0; }

.tag-video-library__card-action {
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    color: var(--tag-video-burgundy);
    font-size: .9rem;
    font-weight: 800;
}

.tag-video-library__card--video .tag-video-library__card-action { margin: 0 16px 16px; }

.tag-video-library__primary-link:hover,
.tag-video-library__primary-link:focus-visible { text-decoration: none; }

.tag-video-library__primary-link:hover .tag-video-library__card-action,
.tag-video-library__primary-link:focus-visible .tag-video-library__card-action { text-decoration: underline; text-underline-offset: 3px; }

.tag-video-library__card-footer {
    margin-top: auto;
    padding: 11px 16px 14px;
    border-top: 1px solid var(--tag-video-border);
    background: #fbfaf7;
}

.tag-video-library__external {
    color: var(--tag-video-navy);
    font-size: .82rem;
    font-weight: 750;
}

.tag-video-library__external:hover,
.tag-video-library__external:focus-visible { color: var(--tag-video-burgundy); text-decoration: underline; text-underline-offset: 3px; }

.tag-video-library__notice,
.tag-video-library__empty {
    padding: 18px;
    border: 1px solid var(--tag-video-border);
    border-left: 4px solid var(--tag-video-burgundy);
    border-radius: var(--tag-video-radius);
    background: #fff;
}

.tag-video-library__more {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    margin-top: 40px;
    padding: 24px;
    border: 1px solid var(--tag-video-border);
    border-radius: var(--tag-video-radius);
    background: #fff;
    box-shadow: 0 5px 20px rgba(20,33,44,.05);
}

.tag-video-library__more p:not(.tag-video-library__section-kicker) {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--tag-video-muted);
}

.tag-video-library__more-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }

.tag-video-library__button,
.tag-video-modal__actions a,
.tag-video-modal__actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 15px;
    border: 1px solid var(--tag-video-navy);
    border-radius: 9px;
    background: var(--tag-video-navy);
    color: #fff;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
}

.tag-video-library__button--secondary,
.tag-video-modal__close-action { background: #fff !important; color: var(--tag-video-navy) !important; }

.tag-video-library__button:hover,
.tag-video-library__button:focus-visible,
.tag-video-modal__actions a:hover,
.tag-video-modal__actions a:focus-visible { background: var(--tag-video-burgundy); border-color: var(--tag-video-burgundy); color: #fff; }

/* Accessible main-library modal. */
.tag-video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.tag-video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 14, .78);
    backdrop-filter: blur(4px);
}

.tag-video-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(1100px, 100%);
    max-height: min(92dvh, 900px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    background: #0e161d;
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
    color: #fff;
}

.tag-video-modal__header {
    padding: 18px 62px 14px 20px;
    background: #111d27;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.tag-video-modal__title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.3;
}

.tag-video-modal__close {
    position: absolute;
    z-index: 3;
    top: 12px;
    right: 12px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.tag-video-modal__close:hover,
.tag-video-modal__close:focus-visible { background: var(--tag-video-burgundy); border-color: var(--tag-video-burgundy); }

.tag-video-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
    padding: 12px 16px 14px;
    border-top: 1px solid rgba(255,255,255,.10);
    background: #111d27;
}

@media (max-width: 1050px) {
    .tag-video-library__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tag-video-library__more { grid-template-columns: 1fr; }
    .tag-video-library__more-actions { justify-content: flex-start; }
}

@media (max-width: 720px) {
    .tag-video-library__inner { width: min(100% - 24px, 1320px); }
    .tag-video-library { padding-top: 18px; }
    .tag-video-library__header { padding: 30px 22px; border-radius: 14px; }
    .tag-video-library__quick-nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
    .tag-video-library__quick-nav a { flex: 0 0 auto; }
    .tag-video-library__section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .tag-video-library__grid { grid-template-columns: 1fr; }
    .tag-video-library__more { padding: 19px; }
    .tag-video-library__more-actions { display: grid; grid-template-columns: 1fr; }
    .tag-video-library__button { width: 100%; }

    .tag-video-modal { padding: 0; }
    .tag-video-modal__dialog {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
    }
    .tag-video-modal__header { padding: 15px 56px 12px 15px; }
    .tag-video-modal__player-wrap { min-height: 0; }
    .tag-video-modal__player { max-height: calc(100dvh - 145px); }
    .tag-video-modal__actions { display: grid; grid-template-columns: 1fr 1fr; }
    .tag-video-modal__actions a,
    .tag-video-modal__actions button { width: 100%; }
}

@media (max-width: 430px) {
    .tag-video-modal__actions { grid-template-columns: 1fr; }
}

/* Semantic modifiers retained explicitly for complete template coverage. */
.tag-video-library__grid--stories,
.tag-video-library__grid--videos { align-items: stretch; }
.tag-video-library__card--story { border-top: 3px solid var(--tag-video-gold); }
.tag-video-library__video-trigger { min-height: 100%; }
.tag-video-modal__external { text-decoration: none; }

/* ========================================================================== 
   v5.0 production isolation + modal hardening
   ========================================================================== */
body.tag-video-library-route .tag-video-library {
    min-height: 65vh;
    isolation: isolate;
}

.tag-video-modal__player-wrap {
    position: relative;
    display: grid;
    flex: 1 1 auto;
    min-height: 260px;
    place-items: center;
    background: #050708;
}

.tag-video-modal__player {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(72vh, 760px);
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
}

.tag-video-modal__status {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 2;
    max-width: calc(100% - 32px);
    margin: 0;
    padding: 7px 10px;
    transform: translateX(-50%);
    border-radius: 8px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: .78rem;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
}

.tag-video-modal__status:empty {
    display: none;
}

.tag-video-modal__status[data-state="error"] {
    background: rgba(122, 38, 50, .95);
}

.tag-video-modal__status[data-state="success"] {
    background: rgba(32, 90, 62, .95);
}

.tag-video-modal__copy,
.tag-video-modal__close-action {
    appearance: none;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid #cbc5ba;
    border-radius: 9px;
    background: #fff;
    color: var(--tag-video-navy);
    font: inherit;
    font-size: .84rem;
    font-weight: 800;
    cursor: pointer;
}

.tag-video-modal__copy:hover,
.tag-video-modal__copy:focus-visible,
.tag-video-modal__close-action:hover,
.tag-video-modal__close-action:focus-visible {
    border-color: var(--tag-video-gold);
    background: #fffaf0;
}

@media (max-width: 920px) {
    .tag-video-library__inner {
        width: min(100% - 28px, 1320px);
    }

    .tag-video-library__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tag-video-library {
        padding-top: 18px;
        padding-bottom: 44px;
    }

    .tag-video-library__inner {
        width: min(100% - 20px, 1320px);
    }

    .tag-video-library__header {
        padding: 28px 20px;
        border-radius: 14px;
    }

    .tag-video-library__quick-nav {
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: thin;
    }

    .tag-video-library__quick-nav a {
        flex: 0 0 auto;
        min-height: 44px;
    }

    .tag-video-library__grid {
        grid-template-columns: 1fr;
    }

    .tag-video-library__section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .tag-video-modal {
        padding: 0;
    }

    .tag-video-modal__dialog {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .tag-video-modal__player-wrap {
        flex: 1 1 auto;
        min-height: 0;
    }

    .tag-video-modal__player {
        max-height: none;
        width: 100%;
    }

    .tag-video-modal__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .tag-video-modal__actions > * {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .tag-video-modal__actions {
        grid-template-columns: 1fr;
    }
}


/* v7 unified video modal presentation. */
.tag-video-modal[hidden],
.tag-video-modal[aria-hidden="true"] { display: none !important; }
body .tag-video-modal .tag-video-modal__dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(1040px, calc(100vw - 40px));
    max-height: calc(100dvh - 40px);
}
body .tag-video-modal .tag-video-modal__title,
body .tag-video-modal .tag-video-modal__header h2 {
    color: #fff !important;
    font-size: clamp(1.15rem, 2.1vw, 1.7rem) !important;
    line-height: 1.22 !important;
}
body .tag-video-modal .tag-video-modal__player-wrap { min-height: 0; aspect-ratio: 16 / 9; overflow: hidden; }
body .tag-video-modal .tag-video-modal__player { width: 100%; height: 100%; max-height: min(68dvh, 680px); object-fit: contain; }
body .tag-video-modal .tag-video-modal__actions { min-height: 64px; align-items: center; }
