/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #F4F4F4;
    color: #222;
    font-family: "Inter", "Segoe UI", sans-serif;
}


/* BRAND COLORS */
:root {
    --red: #D62828;
    --red-dark: #B71F1F;
    --blue: #003F88;
    --blue-dark: #002B5C;
    --black: #000000;
    --gray: #444444;
    --light-gray: #F4F4F4;
}

/* HEADER */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    background: var(--black);
    color: white;
    border-bottom: 4px solid var(--red);
}

.logo {
    display: flex;
    align-items: center;
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo img {
    height: 40px;
    margin-right: 12px;
}
.button-link {
    text-decoration: none; /* Removes underlines */
    color: inherit;         /* Prevents the text from turning blue */
    display: inline-block; /* Keeps the layout behaving like a button */
}


.nav-links a {
    margin-left: 24px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--red);
}

.hero {
    height: 65vh;
    /* Added #000 at the end to set a black background behind the contained SVG */
    background: url('assets/nc-crest.svg') center/contain no-repeat #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    position: relative;
}


.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    color: white;
}

.hero-content h1 {
    font-family: "Montserrat", sans-serif;
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 25px;
}

.hero-content button {
    padding: 14px 28px;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
}

.hero-content button:hover {
    background: var(--red-dark);
}

/* PAGE BANNER */
.page-banner {
    background: var(--black);
    color: var(--red);
    padding: 50px 20px;
    text-align: center;
    font-family: "Montserrat", sans-serif;
}

.page-banner h1 {
    font-size: 2.5rem;
}

/* CONTENT */
.content-section {
    padding: 50px 40px;
    max-width: 900px;
    margin: auto;
}

.content-section h2 {
    font-family: "Montserrat", sans-serif;
    color: var(--black);
    margin-top: 50px;
    margin-bottom: 15px;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.content-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 30px;
}

/* CONTENT EXTRA: QUOTE BLOCK */
.content-section .quote {
    font-style: italic;
    font-weight: 500;
    color: var(--gray);
    border-left: 4px solid var(--red);
    padding-left: 20px;
    margin-top: 50px;
    margin-bottom: 40px;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* CARDS */
.cards-section {
    padding: 60px 40px;
    text-align: center;
}

.cards-section h2 {
    font-family: "Montserrat", sans-serif;
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    background: white;
    padding: 30px;
    width: 320px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    text-align: left;
}

.card h3 {
    font-family: "Montserrat", sans-serif;
    margin-bottom: 12px;
    font-size: 1.4rem;
}

.card p {
    margin-bottom: 20px;
    color: var(--gray);
}
.big-card-btn{
    background: var(--blue-dark);
}

/* 2. Hover state trigger */
.big-card-btn:hover{
    background: var(--blue-dark);
    animation: hotGlowPulse 2s infinite ease-in-out;
}

/* 3. The 3D Glow Keyframes blueprint */
@keyframes hotGlowPulse {
    0% {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 0 0 0px var(--blue-dark);
    }
    50% {
        /* Radiates a soft neon outline outward */
        box-shadow: 0 14px 28px rgba(255, 0, 0, 0.25),0 0 0 8px rgba(0, 123, 255, 0); /* Fades out at 8px */
        background-color:black;
    }
    100% {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 0 0 0px rgba(0, 123, 255, 0);
        background-color: var(--red-dark);
    }
}


/* 1. Base button state (Crucial for smooth entry and exit transitions) */
.card-btn {
    display: inline-block;
    background: var(--blue);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* Smoothly animate back to normal when unhovering */
    transition: background 0.4s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
}

/* 2. Hover state trigger */
.card-btn:hover{
    background: var(--blue-dark);
    transform: translateY(-4px) scale(1.02); /* Slight lift and scale */

    /* Triggers the infinite glowing pulse animation */
    animation: glowPulse 2s infinite ease-in-out;
}

/* 3. The 3D Glow Keyframes blueprint */
@keyframes glowPulse {
    0% {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 0 0px var(--blue-dark);
    }
    50% {
        /* Radiates a soft neon outline outward */
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),0 0 0 8px rgba(0, 123, 255, 0); /* Fades out at 8px */
        background-color:black;
    }
    100% {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 0 0px rgba(0, 123, 255, 0);
        background-color: var(--blue);
    }
}

/* FORM */
.join-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.join-form input,
.join-form textarea {
    padding: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.join-form button {
    padding: 14px;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
}

.join-form button:hover {
    background: var(--red-dark);
}

/* FOOTER */
.site-footer {
    text-align: center;
    padding: 25px;
    background: var(--black);
    color: white;
    margin-top: 60px;
    border-top: 4px solid var(--red);
}

/* ==========================================
 *   MODERN VIDEO ENGINE STYLES (YouTube/FB Inspired)
 *   ========================================== */

:root {
    --bg-card: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #606060;
    --brand-accent: #d92626; /* Crimson Red tint for Canadian identity context */
    --brand-accent-hover: #b31c1c;
    --border-light: #e5e5e5;
    --bg-pill: #f2f2f2;
    --bg-pill-hover: #e6e6e6;
    --radius-lg: 12px;
    --radius-sm: 6px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease-in-out;
}

/* --- REUSABLE RECOMMENDED VIDEOS SIDEBAR WIDGET --- */
.recommended-videos-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    max-width: 360px;
    box-shadow: var(--shadow-sm);
    font-family: system-ui, -apple-system, sans-serif;
}

.recommended-videos-widget h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.featured-recommendation {
    margin-bottom: 20px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.video-wrapper video,
.video-thumbnail-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-recommendation h3 {
    font-size: 1rem;
    margin: 10px 0 0 0;
    line-height: 1.4;
}

/* Sidebar mini item list */
.video-queue-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.queue-item-link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.queue-item-link img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background-color: #000;
}

.queue-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.queue-info h4 {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-pill);
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
}

.view-all-media-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    background: var(--bg-pill);
    color: var(--text-main);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.view-all-media-btn:hover {
    background: var(--bg-pill-hover);
}


/* --- MAIN VIDEO HUB PAGE (videos.html) --- */
.video-hub-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.hub-title { font-size: 2rem; margin-bottom: 20px; color: var(--text-main); }

/* 16:9 frame used by every player type */
.player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.player-frame video,
.player-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}
.player-frame video { object-fit: contain; }
.player-loading { background: linear-gradient(100deg,#1b1b1b 40%,#2a2a2a 50%,#1b1b1b 60%) 0 0/200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.player-error {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    color: #fff; text-align: center; padding: 20px;
}
.player-error span { color: #bbb; font-size: 0.9rem; }

.theater-meta { margin-top: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--border-light); }
.theater-meta h2 { font-size: 1.5rem; line-height: 1.3; margin: 10px 0 4px; color: var(--text-main); }
.theater-meta .video-date { margin-bottom: 10px; }
.theater-desc {
    background: var(--bg-pill);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}

.video-tag, .video-category {
    background: rgba(217, 38, 38, 0.1);
    color: var(--brand-accent);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-block;
    width: fit-content;
}

/* Toolbar: pills + search */
.hub-toolbar { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin: 24px 0; flex-wrap: wrap; }
.video-category-filters { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; flex: 1 1 320px; scrollbar-width: none; }
.video-category-filters::-webkit-scrollbar { display: none; }
.filter-btn {
    background: var(--bg-pill);
    color: var(--text-main);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.filter-btn:hover { background: var(--bg-pill-hover); }
.filter-btn.active { background: var(--text-main); color: #fff; }
.video-search {
    flex: 0 1 260px;
    padding: 9px 16px;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font: inherit;
    font-size: 0.9rem;
    background: #fff;
}
.video-search:focus, .filter-btn:focus-visible, .grid-video-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Grid */
.video-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 20px; }
.grid-video-card[hidden] { display: none; }
.grid-video-card { cursor: pointer; border-radius: var(--radius-lg); }
.video-thumbnail-container {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #2b2b2b, #111);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.video-thumbnail-container img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.grid-video-card:hover .video-thumbnail-container img { transform: scale(1.04); }
.play-badge {
    position: absolute; left: 50%; top: 50%;
    width: 54px; height: 54px; margin: -27px 0 0 -27px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    opacity: 0; transition: opacity 0.2s ease;
}
.play-badge::after {
    content: ""; position: absolute; left: 21px; top: 16px;
    border-style: solid; border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
}
.grid-video-card:hover .play-badge, .grid-video-card:focus-visible .play-badge { opacity: 1; }
.now-playing {
    display: none; position: absolute; left: 8px; bottom: 8px;
    background: var(--brand-accent); color: #fff;
    font-size: 0.75rem; font-weight: 600; padding: 3px 8px; border-radius: 4px;
}
.grid-video-card.is-playing .now-playing { display: block; }
.grid-video-card.is-playing .video-thumbnail-container { outline: 3px solid var(--brand-accent); outline-offset: -3px; }

.video-card-body { padding: 12px 4px 0; }
.video-card-body h3 {
    font-size: 1rem; line-height: 1.4; color: var(--text-main); margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); }
.video-date { font-size: 0.85rem; color: var(--text-muted); }
.hub-message { color: var(--text-muted); padding: 24px 0; }
.hub-message code { background: var(--bg-pill); padding: 2px 6px; border-radius: 4px; }

@media (max-width: 768px) {
    .video-hub-container { margin: 20px auto; }
    .hub-title { font-size: 1.5rem; }
    .theater-meta h2 { font-size: 1.25rem; }
    .video-search { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .player-loading { animation: none; }
    .video-thumbnail-container img, .grid-video-card { transition: none; }
}

/* --- PAGE WITH SIDE PANEL (issues.html) --- */
.page-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 40px;
    align-items: start;
}
.page-with-sidebar .content-section { max-width: none; margin: 0; padding: 50px 0; }
.page-with-sidebar.no-panel { grid-template-columns: minmax(0, 900px); justify-content: center; }

.media-panel {
    position: sticky;
    top: 24px;
    margin-top: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-top: 4px solid var(--red);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.media-panel-head h2 { font-size: 1.1rem; color: var(--text-main); margin-bottom: 14px; }
.media-panel .player-frame { border-radius: var(--radius-sm); box-shadow: none; }

.media-lead-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #2b2b2b, #111);
}
.media-lead-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-play {
    position: absolute; left: 50%; top: 50%;
    width: 52px; height: 52px; margin: -26px 0 0 -26px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    transition: background 0.2s ease, transform 0.2s ease;
}
.media-play::after {
    content: ""; position: absolute; left: 20px; top: 15px;
    border-style: solid; border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
}
.media-lead-thumb:hover .media-play { background: var(--brand-accent); transform: scale(1.08); }

.media-lead-info { margin-top: 12px; }
.media-lead-info h3 { font-size: 1rem; line-height: 1.35; color: var(--text-main); margin: 8px 0 4px; }

.media-queue {
    list-style: none;
    display: flex; flex-direction: column; gap: 14px;
    margin-top: 18px; padding-top: 18px;
    border-top: 1px solid var(--border-light);
}
.media-item { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; border-radius: var(--radius-sm); }
.media-item-thumb {
    position: relative; flex: 0 0 112px; aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm); overflow: hidden;
    background: linear-gradient(135deg, #2b2b2b, #111);
}
.media-item-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-item-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.media-item-info strong {
    font-size: 0.9rem; line-height: 1.3; color: var(--text-main);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.media-item-info span { font-size: 0.8rem; color: var(--text-muted); }
.media-item:hover strong { color: var(--brand-accent); }
.media-panel .view-all-media-btn { margin-top: 18px; }
.media-lead-thumb:focus-visible, .media-item:focus-visible, .view-all-media-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 960px) {
    .page-with-sidebar, .page-with-sidebar.no-panel { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 20px; }
    .page-with-sidebar .content-section { padding: 30px 0; }
    .media-panel { position: static; margin: 0 0 20px; }
}

/* Panel items are buttons now */
.media-item {
    width: 100%; padding: 0; border: 0; background: none;
    font: inherit; text-align: left; cursor: pointer;
}

/* --- VIDEO MODAL --- */
.video-modal {
    display: none;
    position: fixed; inset: 0; z-index: 1000;
    padding: 24px;
    background: rgba(0, 0, 0, 0.75);
    align-items: center; justify-content: center;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.video-modal.is-open { display: flex; animation: modalIn 0.18s ease-out; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.video-modal-box {
    position: relative;
    display: flex; flex-direction: column;
    width: min(900px, 100%);
    max-height: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.video-modal-player { flex: none; }
.video-modal-player .player-frame { border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: none; }
.video-modal-meta { padding: 16px 20px 20px; overflow-y: auto; min-height: 0; }
.video-modal-meta h2 { font-size: 1.3rem; line-height: 1.3; color: var(--text-main); margin: 10px 0 4px; }
.video-modal-meta .video-date { margin-bottom: 10px; }
.video-modal-link { display: inline-block; margin-top: 14px; color: var(--blue); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.video-modal-link:hover { text-decoration: underline; }
.video-modal-close {
    position: absolute; top: -14px; right: -14px; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%;
    border: 2px solid #fff; background: #111; color: #fff;
    font-size: 22px; line-height: 1; cursor: pointer;
    transition: background 0.2s ease;
}
.video-modal-close:hover { background: var(--brand-accent); }
.video-modal-close:focus-visible, .video-modal-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 600px) {
    .video-modal { padding: 16px; }
    .video-modal-close { top: -10px; right: -6px; }
}
@media (prefers-reduced-motion: reduce) { .video-modal.is-open { animation: none; } }
