/* ============ Hermes Teacher Profile Page ============ */

.hermes-teacher-page {
    direction: rtl;
}

/* بنر صفحه مدرس */
.hermes-teacher-banner {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 15px;
    overflow: hidden;
    margin-bottom: 24px;
   
}

.hermes-teacher-banner-bg {
    height: 210px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 15px;
}

.hermes-teacher-banner-inner {
    position: relative;
    z-index: 2;
    padding-top: 15px;
    text-align: right;
}

/* ردیف بالا: دکمه + پروفایل */
.hermes-teacher-top {
    margin-top: -80px;
    display: flex;
    padding: 10px 40px;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
}

.hermes-teacher-right {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.hermes-teacher-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hermes-teacher-left .btn {
    border-radius: 5px;
    padding: .4rem 1.1rem;
    font-weight: 600;
    font-size: 1rem;
}

/* تاریخ عضویت */
.hermes-teacher-join {
    font-size: 16px;
    margin-top: 4rem;
    font-weight: 600;
    color: rgb(82 98 145);
}

.hermes-teacher-join .label {
    margin-left: .35rem;
}

/* آواتار و اطلاعات مدرس */
.hermes-teacher-avatar-wrapper {
    position: relative;
    margin-bottom: 6rem;
}

.hermes-teacher-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 10px solid #fff;
    overflow: hidden;
    background: #fff;
}

.hermes-teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hermes-teacher-main {
    margin-right: 1rem;
    margin-top: 80px;
}

.ht-row1 {
    margin-bottom: .25rem;
}

.hermes-teacher-main .ht-row1 h1 {
    color: #484d6c !important;
    text-shadow: none !important;
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 .25rem;
}

/* ردیف آیدی / تخصص / آخرین فعالیت */
.ht-row2 {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    font-size: .9rem;
    margin-top: 20px;
    color: rgb(82 98 145);
}

/* نسخه scoped برای صفحه مدرس */
.hermes-teacher-page .ht-row2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* خط عمودی بین آیتم‌ها (دسکتاپ) */
.hermes-teacher-page .ht-vsep {
    display: inline-block;
    width: 1px;
    height: 16px;
    background-color: rgb(82 98 145);
    margin: 0 8px;
    vertical-align: middle;
}

/* آیکن آخرین فعالیت */
.hermes-teacher-page .ht-lastseen {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ht-username {
    opacity: .9;
    direction: ltr;
}

.ht-separator {
    opacity: .5;
}

.ht-specialty,
.ht-lastseen {
    opacity: .9;
}

/* آمار دنبال‌کننده / دنبال‌شده */
.hermes-teacher-stats {
    margin-top: 3rem;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    color: rgb(82 98 145);
    font-size: .9rem;
}

.hermes-teacher-stats .stat-item {
    display: flex;
    flex-direction: row;
    gap: .3rem;
    align-items: center;
}

.hermes-teacher-stats .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.hermes-teacher-stats .stat-label {
    opacity: .85;
}

/* شبکه‌های اجتماعی */
.hermes-teacher-social {
    display: flex;
    flex-direction: row;
    gap: .75rem;
    margin-top: 1.8rem;
    justify-content: flex-end;
}

.hermes-teacher-social .social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: rgba(255, 255, 255, .85);
}

/* تب‌ها */
.hermes-teacher-tabs-wrapper {
    padding-right: 10px;
    position: relative;
}

.hermes-teacher-separator {
    border-color: rgba(255, 255, 255, .12);
    margin-bottom: .75rem;
}

.hermes-teacher-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: .5rem;
    list-style: none;
    padding: 10px;
    margin: 0;
}

.hermes-teacher-tabs .nav-link {
    padding: .3rem;
    border: none;
    border-radius: 0;
    color: rgba(100, 104, 135, .75);
    font-size: 18px;
    white-space: nowrap;
}

.hermes-teacher-tabs .nav-link.active {
    color: #2f89ff;
    font-weight: 600;
}

/* کارت بیوگرافی و دوره‌ها + نوارهای کناری */
.hermes-teacher-bio-card,
.hermes-teacher-courses-card {
    position: relative;
    overflow: visible;
    border-radius: 18px;
    border: none;
    background: #fff;
}

.hermes-teacher-bio-card::before,
.hermes-teacher-courses-card::before,
.hermes-teacher-bio-card::after,
.hermes-teacher-courses-card::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 64px;
    background: linear-gradient(180deg, #ffa93f, #e9711b);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
    z-index: 1;
}

.hermes-teacher-bio-card::before,
.hermes-teacher-courses-card::before {
    left: 0;
    top: 50%;
    border-radius: 0 50px 50px 0;
    transform: translateY(-50%);
}

.hermes-teacher-bio-card::after,
.hermes-teacher-courses-card::after {
    right: 0;
    top: 50%;
    border-radius: 50px 0 0 50px;
    transform: translateY(-50%);
}

.hermes-teacher-bio-card .card-header {
    color: #2196F3;
    font-size: 20px;
    font-weight: 500 !important;
    padding: 20px 30px !important;
}

.hermes-teacher-courses-card .card-header {
    color: #2196F3;
    font-size: 20px;
    font-weight: 500 !important;
    padding: 20px 30px !important;
}

/* متن بیو */
.hermes-teacher-page p.mb-0.pad {
    padding: 15px 30px 30px;
    font-size: 18px !important;
    font-weight: 300;
    margin-bottom: 0;
    color: #333a45;
}

/* دکمه تغییر تصویر کاور */
.hermes-teacher-cover-edit-btn {
    position: absolute;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, .85);
    color: #fff;
    cursor: pointer;
    margin-top: -90px;
    margin-right: 50px;
    z-index: 5;
}

.hermes-teacher-cover-edit-btn:hover {
    background: rgba(15, 23, 42, 1);
}

/* لودر لود دوره‌ها */
.hermes-teacher-courses-loader {
    text-align: center;
}

.hermes-teacher-courses-loader .ht-loader-spinner {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    animation: ht-teacher-spin .7s linear infinite;
    margin: 0 auto;
    opacity: .9;
}

@keyframes ht-teacher-spin {
    to {
        transform: rotate(360deg);
    }
}

/* گرید دوره‌ها (ستون‌ها) */
.ht-course-col {
    padding-left: .35rem;
    padding-right: .35rem;
}

/* کارت دوره */
.ht-course-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
    text-decoration: none;
    color: inherit;
    padding: .45rem .55rem .55rem;
}

.ht-course-card:hover {
    border-color: #c4d7ff;
    background: #f9fafb;
    border-radius: 20px;
}

.ht-course-header {
    margin-bottom: .35rem;
}

.ht-course-title {
    font-size: .8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 10px;
}

.tich-b {
    padding: 0 10px;
}

/* تصویر و متا */
.ht-course-main {
    display: flex;
    align-items: stretch;
    gap: .5rem;
}

.ht-course-thumb {
    flex: 0 0 45%;
    max-width: 45%;
}

.ht-course-thumb img,
.ht-course-thumb-placeholder {
    width: 100%;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 10px;
}

.ht-course-thumb-placeholder {
    background: radial-gradient(circle at 30% 20%, #e0f2fe, #e5e7eb);
    width: 110px;
}

.tich {
    padding: 20px;
}

.ht-course-main-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: .25rem;
    direction: rtl;
    text-align: right;
    align-items: center;
}

/* امتیاز دوره و ستاره‌ها */
.ht-course-rating {
    font-size: .7rem;
    display: flex;
    justify-content: flex-start;
}

.hermes-teacher-page .ht-course-rating .star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: .75rem;
    line-height: 1;
    margin: 0;
}

.hermes-teacher-page .ht-course-rating .star-rating svg {
    width: 16px;
    height: 16px;
}

.hermes-teacher-page .ht-course-rating .star-rating svg.text-warning {
    color: #fbbf24;
    fill: #fbbf24;
}

.hermes-teacher-page .ht-course-rating .star-rating svg.text-muted {
    color: #9ca3af;
    fill: #9ca3af;
}

.hermes-teacher-page .ht-course-rating .star-rating::before,
.hermes-teacher-page .ht-course-rating .star-rating span::before {
    font-size: inherit;
}

.ht-course-rating-empty {
    font-size: .7rem;
    color: #9ca3af;
}

/* قیمت دوره‌ها در صفحه مدرس */
.hermes-teacher-page .ht-course-price {
    display: inline-flex;
    align-items: baseline;
    gap: .25rem;
    direction: rtl;
    font-weight: 800;
}

.hermes-teacher-page .ht-course-price .amount {
    font-size: .85rem;
    color: #2563eb;
}

.hermes-teacher-page .ht-course-price del {
    font-size: .7rem;
    color: #9ca3af;
    opacity: .9;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: #9ca3af;
    margin-inline-start: .15rem;
}

.hermes-teacher-page .ht-course-price ins {
    font-size: .95rem;
    font-weight: 900;
    color: #2563eb;
    text-decoration: none;
}

.hermes-teacher-page .ht-course-price del .amount,
.hermes-teacher-page .ht-course-price ins .amount {
    text-decoration: none;
}

.hermes-teacher-page .ht-course-price .ht-price-out,
.ht-course-price .ht-price-out {
    font-size: .8rem;
    font-weight: 700;
    color: #f85555;
}

.hermes-teacher-page .ht-course-price .ht-price-free,
.ht-course-price .ht-price-free {
    font-size: .85rem;
    font-weight: 800;
    color: #059669;
}

/* ============ ریسپانسیو ============ */

/* موبایل: ساختار کلی بنر */
@media (max-width: 767.98px) {
    .hermes-teacher-banner-inner {
        padding: 1.25rem 1.5rem 1.8rem;
        margin-top: 0;
    }

    .hermes-teacher-top {
        flex-direction: column-reverse;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
        padding: 12px 16px;
        text-align: center;
    }

    .hermes-teacher-right,
    .hermes-teacher-left {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hermes-teacher-main {
        margin-top: 1rem;
        margin-right: 0;
        text-align: center;
    }

    .ht-row2,
    .hermes-teacher-stats {
        justify-content: center;
        text-align: center;
    }

    .hermes-teacher-stats {
        gap: 1rem;
        margin-top: .5rem;
    }

    .hermes-teacher-join {
        text-align: center;
        font-size: 15px;
        margin-top: 1rem;
    }

    .hermes-teacher-avatar {
        width: 120px;
        height: 120px;
    }

    .hermes-teacher-avatar-wrapper {
        margin-top: -20px;
        margin-bottom: 0;
    }

    .hermes-teacher-main .ht-row1 h1 {
        font-size: 22px;
    }

    .hermes-teacher-stats .stat-number {
        font-size: 1.6rem;
        font-weight: 700;
    }

    .hermes-teacher-social {
        justify-content: center;
    }

    button.btn.btn-primary.hermes-follow-teacher {
        font-size: 16px !important;
    }

    /* ردیف آیدی/تخصص/آخرین فعالیت در موبایل: ستونی و بدون خط عمودی */
    .hermes-teacher-page .ht-row2 {
        display: block;
    }

    .hermes-teacher-page .ht-row2 .ht-username,
    .hermes-teacher-page .ht-row2 .ht-specialty,
    .hermes-teacher-page .ht-row2 .ht-lastseen {
        display: block;
        margin-bottom: 4px;
    }

    .hermes-teacher-page .ht-row2 .ht-vsep {
        display: none !important;
    }

    .hermes-teacher-page .ht-row2 .ht-lastseen {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
}

/* گرید دوره‌ها – موبایل: ۱ ستون */
@media (max-width: 575.98px) {
    .hermes-teacher-page .ht-course-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .ht-course-card {
        border-radius: 12px;
        padding: .4rem .5rem .5rem;
    }

    .ht-course-main {
        gap: .4rem;
    }

    .ht-course-title {
        font-size: .78rem;
    }

    .hermes-teacher-tabs-wrapper {
        padding-right: 0;
        overflow-y: hidden;
    }
}

/* گرید دوره‌ها – تبلت: ۲ ستون */
@media (min-width: 576px) and (max-width: 991.98px) {
    .hermes-teacher-page .ht-course-col {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .hermes-teacher-page p.mb-0.pad {
        font-size: 15px !important;
    }
}

/* گرید دوره‌ها – دسکتاپ: ۴ ستون */
@media (min-width: 992px) {
    .hermes-teacher-page .ht-course-col {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* تب‌ها – اسکرول افقی در موبایل و تبلت */
@media (max-width: 991.98px) {
    .hermes-teacher-tabs-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hermes-teacher-tabs {
        min-width: max-content;
        padding-bottom: 4px;
    }

    .hermes-teacher-tabs .nav-link {
        padding-inline: .75rem;
    }
}

/* ===== صفحه دنبال‌شده‌ها (پروفایل کاربر) ===== */

.hermes-follow-wrapper {
    margin-top: 1.5rem;
}

/* تب‌های بالای صفحه (مقالات، پادکست‌ها، ... ) */
.hermes-follow-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    width: fit-content;
    background: #fff;
    border-radius: 5px;
    padding: .4rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: row-reverse;
}

.hf-tab {
    border: none;
    background: transparent;
    padding: .45rem 1.3rem;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 400;
    color: #6b7280;
    white-space: nowrap;
    cursor: pointer;
}

.hf-tab-active {
    background: #3b82f6;
    color: #fff;
}

/* لیست کارت‌ها */
.hermes-follow-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hf-empty {
    color: #6b7280;
}

/* کارت هر مدرس */
.hermes-follow-teacher-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .05);
}

.hft-left {
    flex: 0 0 auto;
}

.hft-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.hft-main {
    flex: 1;
    text-align: right;
}

.hft-name {
    margin: 0 0 .35rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #111827;
}

.hft-name a {
    color: inherit;
    text-decoration: none;
}

.hft-bio {
    margin: 0;
    font-size: .87rem;
    line-height: 1.8;
    color: #4b5563;
}

.hft-bio-empty {
    color: #9ca3af;
}

.hft-actions {
    flex: 0 0 auto;
}

.hft-actions .btn {
    border-radius: 5px;
    padding: .45rem 1.4rem;
    font-size: .9rem;
    font-weight: 600;
}

/* ریسپانسیو کارت‌ها در موبایل */
@media (max-width: 767.98px) {
    .hermes-follow-teacher-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hft-main {
        text-align: center;
    }
}

/* نسخه دسکتاپ / موبایل تب‌های دنبال‌شده‌ها */
.hermes-follow-tabs-mobile {
    display: none;
}

@media (max-width: 767.98px) {
    .hermes-follow-tabs-desktop {
        display: none;
    }

    .hermes-follow-tabs-mobile {
        display: block;
        width: 100%;
        margin-bottom: 1.5rem;
        position: relative;
    }

    .hf-tabs-mobile-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: .55rem 1rem;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
    }

    .hf-tabs-mobile-current {
        white-space: nowrap;
    }

    .hf-tabs-mobile-arrow {
        font-size: .85rem;
    }

    .hf-tabs-mobile-menu {
        list-style: none;
        margin: 0;
        padding: .4rem 0;
        position: absolute;
        inset-inline-start: 0;
        inset-inline-end: 0;
        top: calc(100% + .25rem);
        background: #ffffff;
        border-radius: 10px;
        box-shadow: 0 20px 45px rgba(15, 23, 42, .15);
        border: 1px solid #e5e7eb;
        display: none;
        z-index: 30;
    }

    .hf-tabs-mobile-menu.is-open {
        display: block;
    }

    .hf-tabs-mobile-menu li {
        padding: .45rem 1rem;
        font-size: .95rem;
        cursor: pointer;
    }

    .hf-tabs-mobile-menu li:hover {
        background: #f3f4f6;
    }

    .hf-tabs-mobile-menu li.is-active {
        font-weight: 600;
        background: #eff6ff;
        color: #1d4ed8;
    }
}
.card-body {
    padding: 20px;
}