/* Videos page — YouTube embeds & channel CTAs */

.videos-hero .hero-description {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.video-channel-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
    margin-top: 1.25rem;
}

.video-channel-meta a {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.video-channel-meta a:hover,
.video-channel-meta a:focus-visible {
    color: #fff;
}

.video-embed-section {
    padding: 2.5rem 0 3rem;
}

.video-embed-card {
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(74, 144, 226, 0.18);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 32px rgba(26, 26, 46, 0.08);
}

.video-embed-card h2 {
    font-size: 1.25rem;
    margin: 0 0 1rem;
    color: var(--text-primary, #1a1a2e);
}

.video-embed-intro {
    margin: 0 0 1rem;
    color: var(--text-secondary, #555);
    line-height: 1.6;
}

.video-embed-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.video-embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
    justify-content: center;
}

.video-actions .cta-button {
    text-decoration: none;
}

.subscribe-embed-wrap {
    max-width: 320px;
    margin: 1.5rem auto 0;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subscribe-embed-wrap iframe {
    border: 0;
    width: 100%;
    max-width: 320px;
    height: 120px;
}

.video-tips {
    max-width: 720px;
    margin: 2rem auto 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(138, 43, 226, 0.06));
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.video-tips h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.video-tips ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary, #444);
    line-height: 1.6;
}

/* Video catalog grid (data-driven) */
.video-catalog-section {
    padding: 2rem 0 2.5rem;
}

.video-catalog-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.video-catalog-title {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    color: var(--brand-blue-dark, #1a4a7a);
    margin: 0 0 0.5rem;
}

.video-catalog-lead {
    margin: 0 auto;
    max-width: 46rem;
    color: var(--text-secondary, #555);
    line-height: 1.65;
    font-size: 0.98rem;
}

.video-catalog-lead code {
    font-size: 0.88em;
    background: rgba(74, 144, 226, 0.1);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

.video-catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.video-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.video-search-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(74, 144, 226, 0.35);
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
}

.video-search-input:focus {
    outline: 2px solid rgba(74, 144, 226, 0.45);
    outline-offset: 1px;
}

.video-count {
    flex: 1 1 100%;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

.video-card {
    margin: 0;
}

.video-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(74, 144, 226, 0.18);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 26, 46, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.video-card-link:hover,
.video-card-link:focus-visible {
    box-shadow: 0 8px 28px rgba(26, 26, 46, 0.12);
    transform: translateY(-2px);
}

.video-card-thumb-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
}

.video-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card-link:hover .video-card-play,
.video-card-link:focus-visible .video-card-play {
    opacity: 1;
}

.video-card-play-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #c00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding-left: 0.2em;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.video-card-body {
    padding: 0.9rem 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.video-card-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-primary, #1a1a2e);
    font-weight: 600;
}

.video-card-cat {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand-blue-dark, #1a4a7a);
    background: rgba(74, 144, 226, 0.12);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    width: fit-content;
}

.video-card-date {
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
}

.video-load-more-wrap {
    text-align: center;
    margin-top: 1.5rem;
}

.video-load-more-wrap.hidden {
    display: none;
}

.video-empty {
    text-align: center;
    padding: 2rem 1rem;
    max-width: 36rem;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px dashed rgba(74, 144, 226, 0.35);
}

.video-empty.hidden {
    display: none;
}

.video-empty code {
    font-size: 0.9em;
    background: rgba(74, 144, 226, 0.1);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

.video-status {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    margin: 0.75rem 0 0;
    min-height: 1.25em;
}

.video-tips code {
    font-size: 0.88em;
    background: rgba(74, 144, 226, 0.12);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .video-embed-card {
        padding: 0.75rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }
}
