.yt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.yt-learn-block {
    margin-top: 28px;
}

.yt-learn-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.yt-learn-head h3 {
    margin: 0;
    color: var(--c-ink, #0f172a);
    font-family: var(--third-font, "DM Sans", sans-serif);
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 600;
    letter-spacing: -0.4px;
}

.yt-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--c-line, #e2e8f0);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.yt-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0;
    padding: 0;
    border: 0;
    background: #0f172a;
    cursor: pointer;
}

.yt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 52px;
    border-radius: 14px;
    background: #ff0000;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease;
}

.yt-play svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
    fill: #fff;
}

.yt-thumb:hover .yt-play,
.yt-thumb:focus-visible .yt-play {
    transform: translate(-50%, -50%) scale(1.06);
}

.yt-thumb:focus-visible {
    outline: 3px solid #005cc8;
    outline-offset: -3px;
}

.yt-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
}

.yt-label {
    color: #e30613;
    font-family: var(--third-font, "DM Sans", sans-serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.yt-title {
    margin: 0;
    color: var(--c-ink, #0f172a);
    font-family: var(--third-font, "DM Sans", sans-serif);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.yt-purpose {
    margin: 0;
    color: var(--c-muted, #64748b);
    font-family: var(--third-font, "DM Sans", sans-serif);
    font-size: 14px;
    line-height: 1.5;
}

.yt-external {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: #005cc8;
    font-family: var(--third-font, "DM Sans", sans-serif);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.yt-external:hover {
    text-decoration: underline;
}

body.yt-modal-open {
    overflow: hidden;
}

.yt-modal[hidden] {
    display: none;
}

.yt-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.yt-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.yt-modal-dialog {
    position: relative;
    width: min(960px, 100%);
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
}

.yt-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-family: var(--third-font, "DM Sans", sans-serif);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.yt-modal-frame {
    aspect-ratio: 16 / 9;
    background: #000;
}

.yt-modal-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.yt-modal-fallback {
    display: block;
    padding: 14px 18px 16px;
    color: #005cc8;
    font-family: var(--third-font, "DM Sans", sans-serif);
    font-size: 14px;
    font-weight: 650;
}

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

    .learn-resource-grid .yt-card,
    .learn-video-grid .yt-card {
        grid-column: 1 / -1;
    }

    .yt-learn-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yt-play,
    .yt-card {
        transition: none;
    }
}
