/* ═══════════════════════════════════════════════════════
   KIF — Last Cohort / YouTube Videos Section
   ═══════════════════════════════════════════════════════ */

.cohort-section {
    padding: 10rem 2rem;
    position: relative;
}

.cohort-header {
    max-width: 1280px;
    margin: 0 auto 5rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.cohort-h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.02em;
    color: var(--frost);
}

.cohort-em {
    font-style: italic;
    color: var(--gold);
}

/* ─── Grid ─────────────────────────────────────── */
.cohort-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Each row is a flex row of 3 cards */
.cohort-row {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    width: 100%;
}

/* ─── Video Card ────────────────────────────────── */
.cohort-card {
    flex: 1 1 0;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--edge);
    border-top: 2px solid transparent;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: border-color .35s, transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s;
}

.cohort-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(232, 97, 26, .15);
}

/* ─── Thumbnail wrapper ─────────────────────────── */
.cohort-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--ink);
}

.cohort-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s cubic-bezier(.16, 1, .3, 1), filter .45s;
    filter: brightness(.85);
}

.cohort-card:hover .cohort-thumb img {
    transform: scale(1.04);
    filter: brightness(1);
}

/* ─── Play Button Overlay ───────────────────────── */
.cohort-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .18);
    transition: background .3s;
}

.cohort-card:hover .cohort-play {
    background: rgba(0, 0, 0, .08);
}

.cohort-play-btn {
    width: 54px;
    height: 54px;
    background: #ff0000;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s;
}

.cohort-card:hover .cohort-play-btn {
    transform: scale(1.12);
    box-shadow: 0 8px 32px rgba(255, 0, 0, .45);
}

.cohort-play-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    margin-left: 3px;
    /* optical centering for triangle */
}

/* ─── Card Footer (startup name) ────────────────── */
.cohort-info {
    padding: .9rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.cohort-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold-dim, rgba(232, 97, 26, .15));
    border: 1px solid rgba(232, 97, 26, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cohort-logo svg {
    width: 14px;
    height: 14px;
    color: var(--gold);
}

.cohort-name {
    font-family: 'DM Sans', sans-serif;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--frost);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Modal Overlay ─────────────────────────────── */
.cohort-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.cohort-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cohort-modal-inner {
    width: min(860px, 92vw);
    aspect-ratio: 16 / 9;
    position: relative;
    transform: scale(.92);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}

.cohort-modal-overlay.active .cohort-modal-inner {
    transform: scale(1);
}

.cohort-modal-inner iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.cohort-modal-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: .8rem;
    letter-spacing: .1em;
    opacity: .7;
    transition: opacity .2s;
}

.cohort-modal-close:hover {
    opacity: 1;
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
    .cohort-row {
        flex-direction: column;
    }

    .cohort-card {
        flex: 1 1 100%;
    }
}