/* ===== Academy / Blog index (Figma academic-1) ============================ */

.academy-page {
    padding-block: var(--space-5);
    --bv2-play-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='24' fill='none' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M28 22v20l16-10z' fill='%23fff'/%3E%3C/svg%3E");
}

/* ---- Page hero (row 1) ------------------------------------------------- */
.academy-hero {
    margin-bottom: var(--space-4);
}

.academy-hero__title {
    color: var(--zino-text);
    font-size: clamp(1rem, 0.75vw + 0.824rem, 1.25rem);
    font-weight: 700;
}

.academy-hero__icon {
    color: var(--zino-text-sub);
    font-size: clamp(1.125rem, 0.75vw + 0.949rem, 1.5rem);
}

/* ---- Category nav (row 2) ---------------------------------------------- */
.academy-nav {
    margin-bottom: var(--space-6);
}

.academy-nav__fresh,
.academy-nav__link {
    color: var(--zino-text);
    font-size: clamp(0.75rem, 0.47vw + 0.652rem, 1rem);
    font-weight: 400;
    white-space: nowrap;
}

.academy-nav__fresh i,
.academy-nav__link i {
    font-size: 1.125em;
    color: var(--zino-text-sub);
}

.academy-nav__subs {
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.academy-nav__subs::-webkit-scrollbar {
    display: none;
}

.academy-nav__item {
    position: relative;
}

/* vertical divider between subcategory items only */
.academy-nav__item + .academy-nav__item::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 1.25rem;
    background: var(--zino-border-strong);
    transform: translateY(-50%);
}

.academy-nav__link {
    padding: var(--space-2) var(--space-4);
}

/* ---- Section headers --------------------------------------------------- */
.academy-section {
    margin-bottom: var(--space-6);
}

.academy-section__head {
    border-bottom: 1px solid var(--zino-border);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-5);
}

.academy-section__icon {
    color: var(--zino-text-sub);
    font-size: clamp(0.875rem, 0.47vw + 0.777rem, 1.125rem);
}

.academy-section__title {
    color: var(--zino-text);
    font-size: clamp(0.875rem, 0.47vw + 0.777rem, 1.125rem);
    font-weight: 700;
}

/* ---- Sidebar ----------------------------------------------------------- */
.academy-side__banner {
    width: 24.375rem; /* 390px */
    max-width: 100%;
    height: 28.9375rem; /* 463px — fixed so پربازدیدترین panel stays aligned */
    overflow: hidden;
}

.academy-side__banner-img {
    display: block;
    width: 100%;
    height: 100%;
}

.academy-side__panel {
    background: var(--zino-surface);
    padding: var(--space-4);
}

.academy-side__panel .academy-section__head {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: var(--space-4);
}

.academy-side__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---- Blog cards (vertical) --------------------------------------------- */
.bv2-card {
    position: relative;
    border: 1px solid var(--zino-border-strong);
    background: #fff;
    transition: transform .2s ease;
}

.bv2-card:hover {
    transform: translateY(-6px);
}

.bv2-card::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -0.375rem;
    margin-inline: auto;
    width: min(85%, 13rem);
    height: 0.375rem;
    background: var(--zino-green);
    transform: scaleX(0);
    transform-origin: center;
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
}

.bv2-card:hover::after {
    transform: scaleX(1);
    opacity: 1;
}

.bv2-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.bv2-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Play icon — همان SVG صفحهٔ جزئیات (ring + triangle) */
.bv2-card__play {
    --bv2-play-size: 2.125rem; /* 34px — تازه‌ها، ویدیوهای افقی */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--bv2-play-size);
    height: var(--bv2-play-size);
    background: var(--bv2-play-icon) center / contain no-repeat;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45));
    pointer-events: none;
}

.bv2-card__body {
    padding: var(--space-4);
    gap: var(--space-2);
}

.bv2-card__meta {
    gap: var(--space-2);
}

.bv2-card__cat,
.bv2-card__date {
    color: var(--zino-text-sub);
    font-size: clamp(0.5625rem, 0.32vw + 0.4875rem, 0.75rem);
}

.bv2-card__cat i {
    font-size: 1em;
}

.bv2-card__title {
    color: var(--zino-text);
    font-size: clamp(0.625rem, 0.32vw + 0.55rem, 0.8125rem);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.bv2-card__excerpt {
    color: var(--zino-text-sub);
    font-size: clamp(0.5625rem, 0.24vw + 0.51rem, 0.6875rem);
    font-weight: 300;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ---- Horizontal card variant (ویدیوها grid) ---------------------------- */
.bv2-card--horiz {
    border: none;
    background: transparent;
}

.bv2-card--horiz::after {
    display: none;
}

.bv2-card--horiz:hover {
    transform: none;
}

.bv2-card--horiz .bv2-card__link--horiz {
    flex-direction: row-reverse;
}

.bv2-card--horiz .bv2-card__media--horiz {
    width: 14.3125rem; /* 229px — Figma */
    height: 8.910625rem; /* ~142.57px */
    flex-shrink: 0;
    align-self: stretch;
}

.bv2-card--horiz .bv2-card__media--horiz .bv2-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bv2-card--horiz .bv2-card__body {
    padding: var(--space-3) var(--space-4);
    min-width: 0;
    gap: var(--space-2);
    align-items: flex-start;
}

.bv2-card--horiz .bv2-card__meta {
    align-self: flex-start;
}

.bv2-card--horiz .bv2-card__text {
    width: 100%;
    text-align: start;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.bv2-card__meta-sep {
    color: var(--zino-text-sub);
    font-size: clamp(0.5625rem, 0.24vw + 0.51rem, 0.6875rem);
    line-height: 1;
}

.bv2-card--horiz .bv2-card__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.bv2-card--horiz .bv2-card__excerpt {
    -webkit-line-clamp: 1;
    white-space: nowrap;
    display: block;
}

/* ---- Sidebar items ----------------------------------------------------- */
.bv2-side-item {
    min-width: 0;
}

.bv2-side-item:not(:last-child) {
    border-bottom: 1px solid var(--zino-border);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
}

.bv2-side-item__link {
    min-width: 0;
    overflow: hidden;
    width: 100%;
    transition: opacity .2s ease;
}

.bv2-side-item__link:hover {
    opacity: 1;
}

.bv2-side-item__media {
    width: 5.625rem;
    aspect-ratio: 16 / 10;
    overflow: visible;
    margin-bottom: var(--space-2);
}

.bv2-side-item__media::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -0.375rem;
    margin-inline: auto;
    width: 85%;
    height: 0.375rem;
    background: var(--zino-green);
    transform: scaleX(0);
    transform-origin: center;
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
}

.bv2-side-item:hover .bv2-side-item__media::after {
    transform: scaleX(1);
    opacity: 1;
}

.bv2-side-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 24px — پربازدیدترین + محبوب‌ترین */
.bv2-side-item__play {
    --bv2-play-size: 1.5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--bv2-play-size);
    height: var(--bv2-play-size);
    background: var(--bv2-play-icon) center / contain no-repeat;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45));
    pointer-events: none;
}

.bv2-side-item__body {
    min-width: 0;
    overflow: hidden;
    justify-content: flex-start;
    gap: var(--space-2);
}

.bv2-side-item__cat {
    color: var(--zino-text-sub);
    font-size: clamp(0.5625rem, 0.24vw + 0.51rem, 0.6875rem);
    min-width: 0;
    max-width: 100%;
    flex-shrink: 0;
}

.bv2-side-item__title {
    color: var(--zino-text);
    font-size: clamp(0.625rem, 0.32vw + 0.55rem, 0.8125rem);
    font-weight: 700;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.bv2-side-item__date {
    color: var(--zino-text-sub);
    font-size: clamp(0.5625rem, 0.24vw + 0.51rem, 0.6875rem);
    flex-shrink: 0;
}

/* ---- Short-video carousel ---------------------------------------------- */
.academy-short {
    background: var(--zino-surface);
    padding: var(--space-6) var(--space-5);
    margin-inline: -1rem;
    padding-inline: 1rem;
}

.academy-short__head {
    border-bottom: none;
    padding-bottom: 0;
}

.academy-short__track {
    gap: var(--space-3);
}

.academy-short__nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    color: var(--zino-text-sub);
    align-self: center;
    line-height: 1;
    cursor: pointer;
}

.academy-short__nav i {
    font-size: clamp(0.875rem, 0.47vw + 0.777rem, 1.125rem);
}

.academy-short .swiper {
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    overflow: hidden;
}

.academy-short .swiper-slide {
    width: 9.375rem; /* 150px — Figma max card width */
    max-width: 9.375rem;
    overflow: visible;
    padding-bottom: var(--space-2);
}

.bv2-short {
    position: relative;
    width: 100%;
    max-width: 9.375rem;
    border: 1px solid var(--zino-border-strong);
    background: #fff;
    transition: transform .2s ease;
}

.bv2-short:hover {
    transform: translateY(-6px);
}

.bv2-short::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -0.375rem;
    margin-inline: auto;
    width: min(85%, 8rem);
    height: 0.375rem;
    background: var(--zino-green);
    transform: scaleX(0);
    transform-origin: center;
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
}

.bv2-short:hover::after {
    transform: scaleX(1);
    opacity: 1;
}

.bv2-short__media {
    width: 100%;
    max-width: 9.375rem;
    aspect-ratio: 150 / 265; /* Figma 149×265 */
    overflow: hidden;
    border-radius: 0;
}

.bv2-short__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 28px — ویدیو کوتاه */
.bv2-short__play {
    --bv2-play-size: 1.75rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--bv2-play-size);
    height: var(--bv2-play-size);
    background: var(--bv2-play-icon) center / contain no-repeat;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45));
    pointer-events: none;
}

.bv2-short__link {
    min-width: 0;
    overflow: hidden;
}

.bv2-short__body {
    padding: var(--space-3);
    min-width: 0;
    overflow: hidden;
}

.bv2-short__cat {
    color: var(--zino-text-sub);
    font-size: clamp(0.5625rem, 0.24vw + 0.51rem, 0.6875rem);
    margin-bottom: var(--space-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bv2-short__title {
    color: var(--zino-text);
    font-size: clamp(0.5625rem, 0.24vw + 0.51rem, 0.6875rem);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- ویدیوها section --------------------------------------------------- */
.academy-videos__top-main {
    width: 100%;
}

.academy-videos__top-side {
    justify-content: flex-start; /* RTL: right edge of sidebar column */
    width: 100%;
}

.academy-videos__layout .academy-filters {
    padding-bottom: 0;
    justify-content: flex-end; /* RTL: filters toward left of videos column */
}

.academy-videos__popular {
    margin: 0;
    padding: 0;
    list-style: none;
}

.academy-videos__more {
    color: var(--zino-text);
    font-size: clamp(0.75rem, 0.47vw + 0.652rem, 1rem);
    font-weight: 400;
    border: 1px solid var(--zino-border-strong);
    background: transparent;
    padding: var(--space-3) var(--space-6);
    transition: color .2s ease, border-color .2s ease;
}

.academy-videos__more:hover {
    color: var(--zino-green);
    border-color: var(--zino-green);
}

@media (min-width: 992px) {
    .academy-videos__main {
        border-inline-end: 1px solid var(--zino-border-strong);
        padding-inline-end: var(--space-5);
    }

    .academy-videos__side {
        padding-inline-start: var(--space-5);
    }
}

/* ---- Video filters ----------------------------------------------------- */
.academy-filters {
    gap: var(--space-4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: var(--space-2);
}

.academy-filters::-webkit-scrollbar {
    display: none;
}

.academy-filter {
    cursor: pointer;
    color: var(--zino-text);
    font-size: clamp(0.625rem, 0.32vw + 0.55rem, 0.8125rem);
    white-space: nowrap;
    user-select: none;
}

.academy-filter input {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin: 0;
    border: 1px solid var(--zino-border-strong);
    border-radius: 0;
    background-color: #fff;
    cursor: pointer;
    position: relative;
}

.academy-filter input:checked {
    background-color: #fff;
    border-color: var(--zino-border-strong);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 4.2 3.6 6.8 9 1.2' stroke='%235b5b5b' stroke-width='1.75' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.5625rem 0.4375rem;
}

.academy-filter i {
    color: var(--zino-text-sub);
    font-size: 1em;
}

/* ---- Bottom category bar ----------------------------------------------- */
.academy-cats {
    margin-bottom: 0;
}

.academy-cats__head {
    margin-bottom: var(--space-3);
}

.academy-cats__bar {
    background: var(--zino-academy-cats-bg);
    padding-block: var(--space-5);
}

.academy-cats__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.academy-cat-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-2);
    color: var(--zino-text-heading);
    text-align: center;
    transition: color .2s ease;
    min-width: 0;
}

.academy-cats__grid .academy-cat-tile:not(:nth-child(2n+1)) {
    border-inline-start: 1px solid var(--zino-border-strong);
}

.academy-cat-tile:hover {
    color: var(--zino-green);
}

.academy-cat-tile__icon {
    font-size: clamp(1.25rem, 1vw + 0.875rem, 1.75rem);
    color: var(--zino-text-heading);
    line-height: 1;
}

.academy-cat-tile:hover .academy-cat-tile__icon {
    color: var(--zino-green);
}

.academy-cat-tile__label {
    font-size: clamp(0.625rem, 0.3vw + 0.5rem, 0.8125rem);
    font-weight: 400;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* hidden by JS filter */
.bv2-card.is-filtered-out {
    display: none !important;
}

/* ---- Responsive -------------------------------------------------------- */
@media (min-width: 992px) {
    .academy-short {
        margin-inline: -1.5rem;
        padding-inline: 1.5rem;
    }
}

@media (min-width: 576px) {
    .academy-cats__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }

    .academy-cats__grid .academy-cat-tile:not(:nth-child(2n+1)) {
        border-inline-start: none;
    }

    .academy-cats__grid .academy-cat-tile:not(:nth-child(3n+1)) {
        border-inline-start: 1px solid var(--zino-border-strong);
    }
}

@media (min-width: 992px) {
    .academy-side {
        position: sticky;
        top: var(--space-4);
        align-self: flex-start;
    }

    .academy-cats__grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 0;
    }

    .academy-cat-tile {
        flex: 1 1 0;
        padding: var(--space-3) var(--space-1);
    }

    .academy-cats__grid .academy-cat-tile:not(:nth-child(3n+1)) {
        border-inline-start: none;
    }

    .academy-cats__grid .academy-cat-tile:not(:first-child) {
        border-inline-start: 1px solid var(--zino-border-strong);
    }
}

@media (max-width: 991.98px) {
    .academy-nav {
        flex-wrap: wrap;
        row-gap: var(--space-3);
    }

    .academy-nav__subs {
        flex: 1 1 100%;
    }

    .academy-side {
        padding-top: var(--space-5);
        margin-top: var(--space-5);
        border-top: 1px solid var(--zino-border);
    }

    .academy-videos__top-main {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .academy-videos__layout .academy-filters {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: var(--space-3) var(--space-4);
    }

    .academy-videos__layout .academy-filter {
        font-size: 0.875rem;
        gap: var(--space-2);
    }

    .academy-videos__layout .academy-filter input {
        width: 1.25rem;
        height: 1.25rem;
        background-size: 0.6875rem 0.5625rem;
    }

    .academy-videos__layout .academy-filter i {
        font-size: 1.125rem;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    /* تازه‌ها: سایدبار زیر گرید — بنر پهن‌تر و هم‌قد لیست */
    #academy-latest .academy-side {
        display: grid;
        grid-template-columns: minmax(15rem, 45%) minmax(0, 1fr);
        gap: var(--space-4);
        align-items: stretch;
    }

    #academy-latest .academy-side__banner {
        width: 100%;
        height: 100%;
        min-height: 15rem;
        margin-bottom: 0; /* override markup mb-4 */
        aspect-ratio: auto;
    }

    #academy-latest .academy-side__banner-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    #academy-latest .academy-side__panel {
        padding: var(--space-3);
    }

    /* ویدیوها: همان قالب عمودی تازه‌ها (تصویر 16/10 + بدنه) */
    #academy-videos .bv2-card--horiz {
        border: 1px solid var(--zino-border-strong);
        background: #fff;
    }

    #academy-videos .bv2-card--horiz::after {
        display: block;
    }

    #academy-videos .bv2-card--horiz:hover {
        transform: translateY(-6px);
    }

    #academy-videos .bv2-card--horiz .bv2-card__link--horiz {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    #academy-videos .bv2-card--horiz .bv2-card__media--horiz {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        align-self: auto;
    }

    #academy-videos .bv2-card--horiz .bv2-card__body {
        padding: var(--space-4);
        gap: var(--space-2);
    }

    #academy-videos .bv2-card--horiz .bv2-card__meta {
        width: 100%;
        justify-content: space-between;
    }

    #academy-videos .bv2-card--horiz .bv2-card__title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }

    #academy-videos .bv2-card--horiz .bv2-card__excerpt {
        -webkit-line-clamp: 2;
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }

    /* ویدیوها: محبوب‌ترین در دو ستون */
    .academy-videos__side .academy-side__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-4);
    }

    .academy-videos__side .bv2-side-item:not(:last-child) {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    /* جزئیات مطلب: پربازدیدترین در دو ستون */
    .academy-detail__side .academy-side__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-4);
    }

    .academy-detail__side .bv2-side-item:not(:last-child) {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .academy-cats__grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .academy-cats__grid::-webkit-scrollbar {
        display: none;
    }

    .academy-cat-tile {
        flex: 0 0 auto;
        min-width: 5.5rem;
        padding: var(--space-3) var(--space-4);
    }

    .academy-cats__grid .academy-cat-tile:not(:nth-child(2n+1)),
    .academy-cats__grid .academy-cat-tile:not(:nth-child(3n+1)) {
        border-inline-start: none;
    }

    .academy-cats__grid .academy-cat-tile:not(:first-child) {
        border-inline-start: 1px solid var(--zino-border-strong);
    }
}

@media (max-width: 575.98px) {
    .academy-page {
        padding-block: var(--space-4);
    }

    .academy-nav {
        flex-wrap: wrap;
        row-gap: var(--space-3);
    }

    .academy-nav__fresh {
        flex-shrink: 0;
    }

    .academy-nav__subs {
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .academy-nav__link {
        padding: var(--space-2) var(--space-3);
    }

    .academy-short {
        padding-block: var(--space-4);
    }

    .academy-short__track {
        gap: var(--space-2);
    }

    .academy-short__nav i {
        font-size: 1rem;
    }

    .academy-videos__more {
        width: 100%;
        max-width: 16rem;
    }

    .bv2-card--horiz .bv2-card__link--horiz {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .bv2-card--horiz .bv2-card__media--horiz {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .bv2-card--horiz .bv2-card__body {
        padding: var(--space-3);
    }

    .academy-cat-tile {
        padding: var(--space-2) var(--space-1);
    }

    .academy-cat-tile__icon {
        font-size: 1.25rem;
    }
}

/* ===== Academy detail (Figma academic-3) ================================= */
.academy-detail.academy-page {
    padding-top: var(--space-6);
    padding-bottom: var(--space-5);
}

.academy-detail {
    padding-bottom: var(--space-6);
}

.academy-detail__crumb-row {
    margin-bottom: var(--space-2);
}

.academy-detail__crumb {
    margin-bottom: 0;
    font-size: clamp(0.75rem, 0.47vw + 0.652rem, 1.125rem);
    font-weight: 400;
    gap: var(--space-2);
    width: 100%;
    min-width: 0;
}

.academy-detail__crumb a.academy-detail__crumb-home {
    font-size: clamp(0.875rem, 0.47vw + 0.777rem, 1.375rem);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.academy-detail__crumb-home i {
    font-size: 1.125em;
    color: var(--zino-text-sub);
}

.academy-detail__crumb .pd-breadcrumb__sep {
    font-weight: 400;
}

.academy-detail__crumb-sub {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 400;
    flex-shrink: 0;
}

.academy-detail__crumb .pd-breadcrumb__current {
    font-weight: 600;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.academy-detail__crumb-sub i {
    color: var(--zino-text-sub);
    font-size: 1em;
}

.academy-detail__crumb-sep {
    flex-shrink: 0;
    width: 1px;
    height: 1.25rem;
    background: var(--zino-border-strong);
}

.academy-detail__media {
    margin-bottom: var(--space-5);
}

/* قاب هم‌عرض ویدیو — متادیتا و اکشن‌ها از لبهٔ ویدیو بیرون نزنند */
.academy-detail__hero-frame {
    width: min(100%, calc(39.75rem * 1023 / 636));
    max-width: 100%;
}

.academy-detail__hero-frame--portrait {
    width: min(100%, var(--academy-hero-frame-width, 22.35rem));
    margin-inline: auto;
}

.academy-detail__hero-meta {
    direction: rtl;
    justify-content: flex-end;
    gap: var(--space-4);
    margin-bottom: var(--space-2);
    color: var(--zino-text-sub);
    font-size: clamp(0.5625rem, 0.24vw + 0.51rem, 0.75rem);
    line-height: 1.875rem;
    width: 100%;
}

.academy-detail__hero-meta-item i,
.academy-detail__hero-meta-date {
    color: var(--zino-text-sub);
}

.academy-detail__hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.academy-detail__hero-meta-item i {
    font-size: 1.125em;
}

.academy-detail__hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1023 / 636;
    max-height: 39.75rem;
    overflow: hidden;
    border: 1px solid var(--zino-border-strong);
    background: #000;
    margin-bottom: 0;
}

/* ویدیوی آپلودی — نسبت از پوستر/متادیتا (JS) */
.academy-detail__hero--native {
    aspect-ratio: var(--academy-hero-ratio, 1023 / 636);
    height: auto;
    max-height: min(39.75rem, 85vh);
}

.academy-detail__hero--native.academy-detail__hero--portrait {
    margin-inline: 0;
}

.academy-detail__hero--portrait-embed {
    aspect-ratio: 9 / 16;
    max-height: min(39.75rem, 85vh);
}

.academy-detail__hero-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.academy-detail__hero--native video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: top;
}

.academy-detail__hero-embed {
    width: 100%;
    height: 100%;
}

.academy-detail__hero-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.academy-detail__hero-play {
    --bv2-play-size: 4rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--bv2-play-size);
    height: var(--bv2-play-size);
    padding: 0;
    border: none;
    background: var(--bv2-play-icon) center / contain no-repeat;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45));
    cursor: pointer;
    z-index: 2;
}

.academy-detail__hero.is-playing .academy-detail__hero-play {
    display: none;
}

.academy-detail__actions {
    direction: ltr;
    justify-content: flex-start;
    margin-top: var(--space-3);
    width: 100%;
}

.academy-detail__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--zino-text-sub);
    cursor: pointer;
    transition: color .2s ease;
}

.academy-detail__action:hover {
    color: var(--zino-green);
}

.academy-detail__action i {
    font-size: 1.75rem;
    line-height: 1;
}

.academy-detail__body {
    width: min(100%, calc(39.75rem * 1023 / 636));
    max-width: 100%;
    margin-bottom: var(--space-5);
    text-align: right;
}

/* عنوان توضیحات ویدئو */
.academy-detail__abstract p > strong,
.academy-detail__abstract h2,
.academy-detail__abstract h3,
.academy-detail__abstract h4 {
    display: block;
    overflow: hidden;
    margin-bottom: var(--space-3);
    color: var(--zino-text-heading);
    text-align: right;
    font-feature-settings: 'ss07' on;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: normal;
}

.academy-detail__abstract p > strong + br {
    display: none;
}

/* متن توضیحات ویدئو */
.academy-detail__abstract p {
    overflow: hidden;
    margin-bottom: 0;
    color: var(--zino-text);
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75rem;
}

/* بدنهٔ مقاله — چندخطی، جدا از خلاصهٔ ویدئو */
.academy-detail__article {
    margin-top: var(--space-4);
    color: var(--zino-text);
    font-size: 0.75rem;
    line-height: 1.25rem;
    overflow-wrap: break-word;
}

.academy-detail__article h2,
.academy-detail__article h3,
.academy-detail__article h4 {
    color: var(--zino-text-heading);
    font-size: 1.25rem;
    font-weight: 600;
    font-feature-settings: 'ss07' on;
    margin-top: var(--space-5);
    margin-bottom: var(--space-4);
}

.academy-detail__article p {
    margin-bottom: var(--space-3);
    color: var(--zino-text);
}

.academy-detail__article ul {
    list-style: none;
    margin: 0 0 var(--space-4);
    padding: 0;
}

.academy-detail__article ul li {
    position: relative;
    padding-right: var(--space-4);
    margin-bottom: var(--space-2);
    color: var(--zino-text);
}

.academy-detail__article ul li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0.45em;
    width: 0.375rem;
    height: 0.375rem;
    background: var(--zino-text-sub);
}

.academy-detail__article img {
    max-width: 100%;
    height: auto;
}

.academy-detail__side {
    border: 1px solid var(--zino-border-strong);
    padding: var(--space-4);
    position: sticky;
    top: var(--space-4);
    overflow: hidden;
}

.academy-detail__side .academy-section__head {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: var(--space-4);
}

.academy-detail__side .academy-section__title {
    font-size: clamp(0.875rem, 0.47vw + 0.777rem, 1.125rem);
    font-weight: 600;
    line-height: 2.125rem;
}

.academy-detail__side .academy-section__icon {
    font-size: 1.25rem;
}

.academy-detail__side .academy-side__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.academy-detail__side .bv2-side-item__media {
    width: 8.625rem;
    aspect-ratio: 138 / 86;
}

.academy-detail__side .bv2-side-item__body {
    gap: var(--space-3);
    padding-block: var(--space-1);
}

.academy-detail__side .bv2-side-item__title {
    margin-top: var(--space-1);
}

.academy-detail__side .bv2-side-item__media::after {
    height: 0.625rem;
    bottom: -0.625rem;
}

.academy-detail__related.product-slider .parent .container-fluid {
    position: relative;
}

.academy-detail__related-swiper {
    padding-bottom: 0;
}

.academy-detail__related.product-slider .swiper-button-next,
.academy-detail__related.product-slider .swiper-button-prev {
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    color: var(--zino-text-muted);
}

/* RTL: بعدی چپ، قبلی راست */
.academy-detail__related.product-slider .swiper-button-next {
    left: -6px;
    right: auto !important;
}

.academy-detail__related.product-slider .swiper-button-prev {
    right: -6px !important;
    left: auto;
}

.academy-detail__related.product-slider .swiper-button-next::after,
.academy-detail__related.product-slider .swiper-button-prev::after {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--zino-text-muted);
    display: inline-block;
    transform: scaleX(-1);
}

@media only screen and (min-width: 1470px) {
    .academy-detail__related.product-slider .swiper-button-next {
        left: -34px;
    }

    .academy-detail__related.product-slider .swiper-button-prev {
        right: -34px !important;
    }
}

.academy-detail__related {
    margin-top: var(--space-8);
    margin-bottom: var(--space-6);
}

.academy-detail__related-head {
    margin-bottom: var(--space-5);
}

.academy-detail__related-title {
    color: var(--zino-text);
    font-size: clamp(0.875rem, 0.47vw + 0.777rem, 1.125rem);
    font-weight: 600;
}

.academy-detail__related-icon {
    color: var(--zino-text-sub);
    font-size: clamp(0.875rem, 0.47vw + 0.777rem, 1.125rem);
}

.academy-detail__cats .academy-section__title {
    font-size: clamp(0.875rem, 0.47vw + 0.777rem, 1.125rem);
    font-weight: 600;
    color: var(--zino-text-heading);
}

@media (max-width: 991.98px) {
    .academy-detail__side {
        position: static;
        margin-top: var(--space-4);
    }

    .academy-detail__hero {
        max-height: none;
    }

    .academy-detail__hero--native {
        max-height: none;
    }

    .academy-detail__hero--native video {
        max-height: none;
    }
}
