/* CoE gallery title + description – match Fellowship Cohort 2026 sizing */
.coe-gallery-title {
    font-size: 1.5rem;
}

.coe-desc {
    font-size: 0.85rem;
    line-height: 1.6;
}

.is-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    background: var(--green-soft);
    border: 1px solid var(--green-mint);
    border-radius: 22px;
    padding: 30px 26px;
    margin-bottom: 44px;
}

.is-stat {
    text-align: center;
    position: relative;
}

.is-stat+.is-stat::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--green-mint);
}

.is-stat .is-num {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--green-dark);
    line-height: 1.1;
}

.is-stat .is-lbl {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.4px;
    margin-top: 6px;
}

/* ---------- Filter chips ---------- */
.is-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 14px;
}

.is-filter {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.87rem;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.is-filter i {
    font-size: 0.85rem;
    color: var(--green);
}

.is-filter:hover {
    border-color: var(--green);
    color: var(--green);
}

.is-filter.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.is-filter.active i {
    color: #fff;
}

.is-count {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 30px;
}

.is-count b {
    color: var(--green-dark);
}

/* ---------- Story grid ---------- */
.is-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.is-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 50px 20px;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 18px;
}

/* ---------- Story card ---------- */
.story-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 26px -16px rgba(0, 80, 140, 0.2);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.story-card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 24px 50px -20px rgba(0, 164, 239, 0.3);
}

/* tinted header band — neutralises the mixed photo backgrounds */
.story-top {
    position: relative;
    height: 96px;
    background: linear-gradient(135deg,
            var(--green-soft),
            var(--green-mint));
    /* overflow: hidden; */
}

.story-top::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.story-quote {
    position: absolute;
    left: 22px;
    top: 16px;
    z-index: 1;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--green);
    opacity: 0.35;
}

.story-avatar {
    position: absolute;
    left: 50%;
    bottom: -52px;
    transform: translateX(-50%);
    z-index: 2;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    background: var(--green-soft);
    box-shadow: 0 12px 26px -10px rgba(0, 80, 140, 0.45);
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: var(--pos, 50% 15%);
    transition: transform 0.5s ease;
}

.story-card:hover .story-avatar img {
    transform: scale(1.07);
}

.story-body {
    padding: 64px 24px 0;
    text-align: center;
    flex: 1;
}

.story-name {
    font-size: 1.08rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--ink);
}

.story-college {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0 0 2px;
    line-height: 1.5;
}

.story-place {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 14px;
}

.story-headline {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--green-dark);
    font-style: italic;
    line-height: 1.45;
    margin: 0 0 10px;
}

.story-excerpt {
    font-size: 0.86rem;
    line-height: 1.65;
    color: var(--muted);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-foot {
    padding: 0 24px 24px;
    text-align: center;
}

.story-btn {
    width: 100%;
    background: var(--green);
    color: #fff;
    border: 1px solid var(--green);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.25s;
}

.story-btn:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.story-btn i {
    transition: transform 0.25s ease;
}

.story-btn:hover i {
    transform: translateX(4px);
}

/* ---------- Story modal ---------- */
.is-modal .modal-dialog {
    max-width: 900px;
}

.is-modal .modal-content {
    border: none;
    border-radius: 22px;
    overflow: hidden;
}

.is-modal .modal-body {
    padding: 0;
}

.sm-head {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    padding: 26px 30px;
    position: relative;
}

.sm-head .btn-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 1;
    filter: invert(1) grayscale(100%) brightness(200%);
    padding: 9px;
}

.sm-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.65);
    background: #fff;
}

.sm-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--pos, 50% 15%);
}

.sm-head-text {
    min-width: 0;
    padding-right: 34px;
}

.sm-head h5 {
    color: #fff;
    font-size: 1.25rem;
    margin: 0 0 4px;
    font-weight: 800;
}

.sm-head .sm-sub {
    color: #dff1fc;
    font-size: 0.85rem;
    margin: 0 0 10px;
    line-height: 1.5;
}

.sm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sm-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
}

.sm-body {
    padding: 28px 34px 34px;
}

.sm-headline {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--green-dark);
    font-style: italic;
    margin: 0 0 18px;
    padding-left: 18px;
    border-left: 4px solid var(--green);
    line-height: 1.45;
}

.sm-body p {
    font-size: 0.94rem;
    line-height: 1.85;
    color: var(--ink);
    margin: 0 0 16px;
    text-align: justify;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199.98px) {
    .is-grid {
        gap: 22px;
    }
}

@media (max-width: 991.98px) {
    .is-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .is-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 18px;
        padding: 26px 20px;
    }

    .is-stat:nth-child(3)::before {
        display: none;
    }

    .is-modal .modal-dialog {
        max-width: 92vw;
    }

    .sm-body {
        padding: 24px 26px 28px;
    }
}

@media (max-width: 767.98px) {
    .sec-pad {
        padding: 36px 0 64px;
    }

    .is-filters {
        gap: 8px;
    }

    .is-filter {
        font-size: 0.82rem;
        padding: 7px 16px;
    }

    .sm-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 22px 22px;
    }

    .sm-head-text {
        padding-right: 0;
    }

    .sm-avatar {
        width: 74px;
        height: 74px;
    }

    .sm-head h5 {
        font-size: 1.1rem;
    }

    .sm-body {
        padding: 22px 20px 26px;
    }

    .sm-body p {
        text-align: left;
        font-size: 0.9rem;
        line-height: 1.8;
    }

    .sm-headline {
        font-size: 1.02rem;
    }

    .is-modal .modal-dialog {
        margin: 0.5rem auto;
        max-width: 96vw;
    }
}

@media (max-width: 575.98px) {
    .is-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .is-stats {
        border-radius: 18px;
    }

    .is-stat+.is-stat::before {
        display: none;
    }

    .story-body {
        padding: 60px 20px 0;
    }

    .story-foot {
        padding: 0 20px 22px;
    }

    .story-avatar {
        width: 100px;
        height: 100px;
        bottom: -48px;
    }

    .story-top {
        height: 88px;
    }

    /* let the filter row scroll sideways instead of stacking tall */
    .is-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 6px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .is-filters::-webkit-scrollbar {
        display: none;
    }

    .is-filter {
        flex: 0 0 auto;
    }
}
