/**
 * Instructors Page & Instructor Detail – Modern E-learning theme
 * Blue/Purple gradient, Poppins/Inter-friendly (Plus Jakarta Sans), responsive.
 */

/* ---------- Hero ---------- */
.instructors-hero {
    background:
        linear-gradient(135deg,
            rgba(15, 83, 45, 0.92) 0%,
            rgba(40, 199, 111, 0.78) 48%,
            rgba(30, 58, 138, 0.82) 100%),
        var(--instructors-hero-image, url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?w=1920&q=80')) center/cover no-repeat;
    color: #fff;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.instructors-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.instructors-hero .container {
    position: relative;
    z-index: 1;
}

.instructors-breadcrumb {
    margin-bottom: 1rem;
}

.instructors-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.instructors-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.instructors-breadcrumb .breadcrumb-item a:hover {
    color: #fff;
    text-decoration: underline;
}

.instructors-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.85);
}

.instructors-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
}

.instructors-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.instructors-hero-desc {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 560px;
    margin-bottom: 0;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.15);
}

/* ---------- Stats section ---------- */
.instructors-stats {
    background: var(--bs-body-bg, #fff);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.instructor-stat-card {
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.instructor-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.15);
}

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #28c76f, #34d399);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.instructor-stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--bs-body-color, #1c1917);
    line-height: 1.2;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.instructor-stat-card .stat-number-decimal {
    font-size: 1.5rem;
}

.instructor-stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #64748b);
    margin-top: 0.25rem;
}

/* ---------- Filters ---------- */
.instructors-filters {
    background: var(--bs-body-bg, #fff);
}

.instructors-filter-form .form-control,
.instructors-filter-form .form-select {
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.instructors-filter-form .input-group-text {
    border-radius: 10px 0 0 10px;
    background: var(--bs-light, #f8fafc);
    border-color: rgba(0, 0, 0, 0.1);
}

/* ---------- Instructor cards grid ---------- */
.instructors-grid-section {
    background: var(--bs-body-bg, #f8fafc);
}

.instructor-card-col {
    display: flex;
}

.instructor-card {
    border-radius: 18px !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    background: #fff !important;
    border: 1px solid #e8eef5 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05) !important;
}

.instructor-card:hover {
    transform: translateY(-6px);
    border-color: rgba(40, 199, 111, 0.28) !important;
    box-shadow: 0 18px 36px rgba(40, 199, 111, 0.14) !important;
}

.instructor-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none !important;
    color: inherit;
}

.instructor-card-photo-wrap {
    padding-top: 1.6rem;
    text-align: center;
    background: linear-gradient(180deg, #eefbf4 0%, transparent 100%);
}

.instructor-card-photo {
    width: 108px;
    height: 108px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 10px 24px rgba(40, 199, 111, 0.18);
}

.instructor-card-photo.placeholder {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28c76f, #34d399);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    border: 4px solid #fff;
    box-shadow: 0 10px 24px rgba(40, 199, 111, 0.18);
}

.instructor-card .card-body {
    padding: 1.1rem 1.15rem 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.instructor-card-name {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.3;
}

.instructor-card-title {
    margin-bottom: 0.55rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: #64748b;
}

.instructor-card-bio {
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 0.9rem;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 28ch;
}

.instructor-card-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
}

.instructor-card-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: #f3fbf7;
    border: 1px solid #d9f0e4;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
}

.instructor-card-chip i {
    color: #28c76f;
    font-size: 0.8rem;
}

.instructor-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    color: #f59e0b;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.instructor-card-rating span {
    margin-left: 0.3rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
}

.instructor-card-social {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    padding: 0 1rem 0.35rem;
}

.instructor-card-social .social-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.instructor-card-social .social-icon:hover {
    background: #28c76f;
    border-color: #28c76f;
    color: #fff;
    transform: translateY(-2px);
}

.instructor-card-footer {
    padding: 0 1.15rem 1.25rem;
    margin-top: auto;
}

.instructor-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.55rem 1rem;
    background: #28c76f;
    color: #fff !important;
    text-decoration: none !important;
    border: none;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.instructor-card-btn:hover {
    background: #1fa75d;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(40, 199, 111, 0.3);
}

/* Pagination */
.instructors-pagination .page-link {
    border-radius: 10px;
    margin: 0 2px;
    padding: 0.5rem 1rem;
}

.instructors-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #28c76f, #34d399);
    border-color: transparent;
}

/* ---------- Instructor detail page ---------- */
.instructor-detail-page .instructor-detail-hero {
    background: linear-gradient(180deg, #f0fdf4 0%, #f8fafc 45%, #fff 100%);
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}

.instructor-detail-page .instructors-breadcrumb--light .breadcrumb-item a {
    color: #1fa75d;
    text-decoration: none;
    font-weight: 600;
}

.instructor-detail-page .instructors-breadcrumb--light .breadcrumb-item a:hover {
    text-decoration: underline;
    color: #14532d;
}

.instructor-detail-page .instructors-breadcrumb--light .breadcrumb-item.active {
    color: #64748b;
}

.instructor-detail-page .instructors-breadcrumb--light .breadcrumb-item + .breadcrumb-item::before {
    color: #94a3b8;
}

.instructor-profile-card {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.instructor-profile-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.75rem 1.4rem 1.5rem;
    background: linear-gradient(165deg, #f3fbf7 0%, #fff 58%);
    border-bottom: 1px solid #eef2f7;
}

@media (min-width: 768px) {
    .instructor-profile-hero {
        grid-template-columns: 168px 1fr;
        gap: 1.85rem;
        padding: 2.1rem 2.1rem 1.85rem;
        align-items: start;
    }
}

.instructor-profile-avatar-wrap {
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    .instructor-profile-avatar-wrap {
        justify-content: flex-start;
    }
}

.instructor-profile-avatar {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 12px 28px rgba(40, 199, 111, 0.22);
}

.instructor-profile-avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f8ef;
    color: #28c76f;
    font-size: 3.5rem;
}

.instructor-profile-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1fa75d;
    margin-bottom: 0.4rem;
}

.instructor-profile-name {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.2;
}

.instructor-profile-role {
    margin: 0.35rem 0 1.15rem;
    color: #64748b;
    font-size: 1.02rem;
    font-weight: 500;
}

.instructor-profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.instructor-profile-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 8.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.instructor-profile-stat-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #28c76f;
    color: #fff;
    font-size: 1rem;
}

.instructor-profile-stat-icon--amber {
    background: #f59e0b;
}

.instructor-profile-stat strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.15;
}

.instructor-profile-stat span {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: capitalize;
}

.instructor-profile-social {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.instructor-profile-social a {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    color: #475569;
    background: #fff;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.instructor-profile-social a:hover {
    background: #28c76f;
    border-color: #28c76f;
    color: #fff;
}

.instructor-profile-about {
    padding: 1.4rem 1.4rem 1.7rem;
}

@media (min-width: 768px) {
    .instructor-profile-about {
        padding: 1.5rem 2.1rem 2rem;
    }
}

.instructor-profile-about-title {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.instructor-profile-about-text {
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.75;
    max-width: 72ch;
}

.instructor-profile-about-empty {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
    font-style: italic;
}

/* Legacy detail helpers */
.instructor-detail-photo {
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.instructor-detail-photo.placeholder {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
    font-size: 4rem;
}

.instructor-detail-name {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--bs-body-color, #1c1917);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.instructor-detail-title {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.instructor-detail-meta {
    color: var(--bs-secondary-color, #64748b);
}

.instructor-detail-social .social-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bs-light, #f1f5f9);
    color: var(--bs-secondary-color, #64748b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.instructor-detail-social .social-icon:hover {
    background: linear-gradient(135deg, #28c76f, #34d399);
    color: #fff;
}

.instructor-detail-bio {
    margin-top: 1.5rem;
}

/* Instructor courses on detail page */
.instructor-course-card {
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instructor-course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1) !important;
}

.instructor-course-card .card-img-top {
    transition: transform 0.3s ease;
}

.instructor-course-card:hover .card-img-top {
    transform: scale(1.03);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-body-color, #1c1917);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Dark theme adjustments */
[data-bs-theme="dark"] .instructors-stats,
[data-bs-theme="dark"] .instructor-stat-card {
    background: var(--bs-body-bg);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .instructor-card {
    background: #0f172a !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .instructor-card-photo-wrap {
    background: linear-gradient(180deg, rgba(40, 199, 111, 0.14) 0%, transparent 100%);
}

[data-bs-theme="dark"] .instructor-card-name {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .instructor-card-title,
[data-bs-theme="dark"] .instructor-card-bio {
    color: #94a3b8;
}

[data-bs-theme="dark"] .instructor-card-chip {
    background: #14532d;
    border-color: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .instructor-card-social .social-icon {
    background: #14532d;
    border-color: #334155;
    color: #cbd5e1;
}

[data-bs-theme="dark"] .instructor-detail-page .instructor-detail-hero {
    background: #0b1220;
}

[data-bs-theme="dark"] .instructor-profile-card,
[data-bs-theme="dark"] .instructor-profile-stat,
[data-bs-theme="dark"] .instructor-profile-social a {
    background: #0f172a;
    border-color: #334155;
}

[data-bs-theme="dark"] .instructor-profile-hero {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .instructor-profile-name,
[data-bs-theme="dark"] .instructor-profile-about-title,
[data-bs-theme="dark"] .instructor-profile-stat strong {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .instructor-profile-role,
[data-bs-theme="dark"] .instructor-profile-about-text,
[data-bs-theme="dark"] .instructor-profile-about-empty {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .instructor-profile-social a {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .instructor-profile-social a:hover {
    background: #28c76f;
    border-color: #28c76f;
    color: #fff;
}

@media (max-width: 767.98px) {
    .instructors-hero {
        padding: 4rem 0 3rem;
    }
    .instructor-stat-card .stat-number {
        font-size: 1.5rem;
    }
    .instructor-detail-photo,
    .instructor-detail-photo.placeholder {
        width: 140px;
        height: 140px;
    }
    .instructor-detail-photo.placeholder {
        font-size: 3rem;
    }
}
