/* ==========================================================================
   강사 목록 섹션 스타일
   ========================================================================== */

.teachers-list {
    padding: 20px 20px 60px;
    background: #ffffff;
}

.teachers-list__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 검색 필터 */
.teachers-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    align-items: stretch;
}

.teachers-filter__select {
    flex: 0 0 300px;
    width: 300px;
    height: 59px;
    padding: 0 20px;
    border: 1px solid #D9D9D9;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #121212;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    transition: border-color 0.2s;
}

.teachers-filter__select:hover {
    border-color: #8105ed;
}

.teachers-filter__select-text {
    flex: 1;
}

.teachers-filter__select i {
    font-size: 14px;
    color: #121212;
    margin-left: 10px;
    flex-shrink: 0;
}

.teachers-filter__search {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 59px;
    padding: 0 20px;
    border: 1px solid #D9D9D9;
    border-radius: 50px;
    background: white;
}

.teachers-filter__input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #121212;
    background: transparent;
}

.teachers-filter__input::placeholder {
    color: #808080;
}

.teachers-filter__search i {
    font-size: 14px;
    color: #121212;
    margin-left: 10px;
    flex-shrink: 0;
}

/* 강사 카드 그리드 */
.teachers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.teacher-card {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 16px;
    text-align: center;
    box-shadow: 4px 4px 30px 0 rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.teacher-card:hover {
    transform: translateY(-4px);
    box-shadow: 4px 8px 35px 0 rgba(0, 0, 0, 0.3);
}

.teacher-card__image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #F3F3F3;
}

/* 이미지 로드 실패 시 기본 사람 아이콘 표시 */
.teacher-card__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.teacher-card__fallback-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: #bbb;
    z-index: 1;
}

.teacher-card__image img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-card__category {
    background: rgba(4, 132, 255, 0.1);
    padding: 6px 10px;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #121212;
    margin-bottom: 6px;
    display: none; /* 데이터 준비 전까지 숨김 */
}

.teacher-card__name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
    color: #121212;
    margin: 6px 0;
}

.teacher-card__fullname {
    font-family: var(--font-primary);
    font-size: 10px;
    color: #808080;
    margin: 0 0 6px 0;
}

.teacher-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 60px;
    background: transparent;
    font-family: var(--font-display);
    font-size: 16px;
    color: #0484FF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.teacher-card__button:hover {
    background: rgba(4, 132, 255, 0.1);
}

.teacher-card__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 페이지네이션 */
/* 페이지네이션: 공통 pagination.css pagination-circle 사용 */
.pagination .pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 검색 결과 없음 */
.teachers-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #808080;
}

.teachers-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
    display: block;
}

.teachers-empty p {
    font-size: 18px;
    margin-bottom: 20px;
}

.teachers-empty__reset {
    background: #0484FF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--font-primary);
    transition: opacity 0.2s;
}

.teachers-empty__reset:hover {
    opacity: 0.8;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .teachers-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .teachers-list {
        padding: 20px 16px 40px;
    }

    .teachers-filter {
        flex-direction: column;
        gap: 10px;
    }

    .teachers-filter__select {
        flex: 1 1 auto;
        width: 100%;
    }

    .teachers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .teachers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .teacher-card {
        padding: 12px;
    }

    .teacher-card__category {
        font-size: 12px;
        padding: 4px 8px;
    }

    .teacher-card__name {
        font-size: 14px;
    }

    .teacher-card__fullname {
        font-size: 9px;
    }

    .teacher-card__button {
        font-size: 14px;
        padding: 6px 10px;
    }
}

/* ==========================================================================
   Teacher Detail Modal
   ========================================================================== */

/* Modal Dialog */
.teacher-detail-modal .modal-dialog {
    max-width: 500px;
    margin: 1.75rem auto;
}

/* Modal Content */
.teacher-detail-modal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Modal Header */
.teacher-detail-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.teacher-detail-header .modal-title {
    font-family: var(--font-display);
    font-size: 20px;
    color: #121212;
    margin: 0;
}

.teacher-detail-header .btn-close {
    opacity: 1;
}

/* Modal Body */
.teacher-detail-body {
    padding: 16px;
    max-height: 75vh;
    overflow-y: auto;
    display: block;
}


/* Teacher Profile Section - Modal specific to override base.css conflicts */
.teacher-detail-modal .teacher-profile {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
    max-width: none;
    width: auto;
    aspect-ratio: auto;
    border-radius: 0;
    object-fit: unset;
}

.teacher-detail-modal .teacher-profile__image {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 100px;
    overflow: hidden;
    background: #f3f3f3;
    border: 2px solid #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.teacher-detail-modal .teacher-profile__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-detail-modal .teacher-profile__fallback {
    font-size: 40px;
    color: #bbb;
    position: absolute;
}

/* Profile Info Container (right side) */
.teacher-detail-modal .teacher-profile__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

/* Tags Section */
.teacher-detail-modal .teacher-profile__tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 4px;
}

.teacher-detail-modal .teacher-profile__tag {
    padding: 6px 10px;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
}

.teacher-detail-modal .teacher-profile__tag--tesol {
    background: rgba(129, 5, 237, 0.05);
    color: #8105ED;
}

.teacher-detail-modal .teacher-profile__tag--feature {
    background: rgba(4, 132, 255, 0.1);
    color: #121212;
}

/* Teacher Name */
.teacher-detail-modal .teacher-profile__name {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 700;
    color: #121212;
    line-height: normal;
    word-wrap: break-word;
    margin: 0;
    text-align: left;
}

.teacher-detail-modal .teacher-profile__fullname {
    display: none;
}

/* YouTube Video Section */
.teacher-video {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.teacher-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.teacher-video--empty {
    background: #f3f3f3;
    padding: 40px 20px;
    text-align: center;
    color: #808080;
    height: auto;
    padding-bottom: 0;
}

/* Slide Content Section */
.teacher-slides {
    background: #f8f8ff;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    min-height: 120px;
    max-height: 200px;
    display: flex;
    flex-direction: column;
}

.teacher-slides__content {
    flex: 1;
    overflow-y: auto;
}

.teacher-slides__item {
    display: none;
}

.teacher-slides__item--active {
    display: block;
    animation: teacherFadeIn 0.3s ease;
}

@keyframes teacherFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.teacher-slides__category {
    font-family: var(--font-display);
    font-size: 16px;
    color: #8105ED;
    margin: 0 0 12px 0;
}

.teacher-slides__text {
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.6;
    color: #121212;
    margin: 0;
    white-space: pre-line;
}

.teacher-slides__empty {
    color: #808080;
    font-style: italic;
}

/* Slide Indicators */
.teacher-slides__indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.teacher-slides__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d9d9d9;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.teacher-slides__dot--active {
    background: #8105ED;
    width: 24px;
    border-radius: 4px;
}

/* Tab Navigation (replaces dots) */
.teacher-slides__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow: visible;
    padding: 4px 0;
    justify-content: flex-start;
}


.teacher-slides__tab {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #8105ED;
    background: transparent;
    color: #8105ED;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.teacher-slides__tab:hover {
    background: rgba(129, 5, 237, 0.1);
}

.teacher-slides__tab--active {
    background: #8105ED;
    color: white;
    border-color: #8105ED;
}

/* Hide dot indicators when tabs are present */
.teacher-slides--with-tabs .teacher-slides__indicators {
    display: none;
}

/* Modal Footer */
.teacher-detail-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
}

.teacher-detail-footer .btn-close-modal {
    background: #f3f3f3;
    color: #121212;
    border: none;
    border-radius: 25px;
    padding: 10px 40px;
    font-family: var(--font-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.teacher-detail-footer .btn-close-modal:hover {
    background: #e0e0e0;
}

/* Loading State */
.teacher-detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.teacher-detail-loading__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #8105ED;
    border-radius: 50%;
    animation: teacherSpin 1s linear infinite;
}

@keyframes teacherSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.teacher-detail-loading__text {
    margin-top: 12px;
    font-size: 14px;
    color: #808080;
}

/* Error State */
.teacher-detail-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

/* Responsive */
@media (max-width: 576px) {
    .teacher-detail-modal .modal-dialog {
        margin: 10px;
    }

    .teacher-detail-body {
        padding: 12px;
    }

    .teacher-detail-modal .teacher-profile {
        gap: 16px;
    }

    .teacher-detail-modal .teacher-profile__image {
        width: 64px;
        height: 64px;
        min-width: 64px;
    }

    .teacher-detail-modal .teacher-profile__tag {
        padding: 4px 8px;
        font-size: 12px;
    }

    .teacher-detail-modal .teacher-profile__name {
        font-size: 16px;
    }

    .teacher-detail-modal .teacher-slides {
        padding: 12px;
    }

    .teacher-detail-modal .teacher-slides__tab {
        padding: 5px 12px;
        font-size: 11px;
    }

    .teacher-detail-modal .teacher-profile__fallback {
        font-size: 28px;
    }
}

/* ============================================
   카테고리 필터 드롭다운
   ============================================ */
.teachers-filter__dropdown {
    position: relative;
}

.teachers-filter__menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 300px;
    background: #fff;
    border: 1px solid #D9D9D9;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    padding: 8px 0;
    margin-top: 4px;
}

.teachers-filter__menu.show {
    display: block;
}

.teachers-filter__option {
    display: block;
    width: 100%;
    padding: 10px 20px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.teachers-filter__option:hover {
    background: #f3e5ff;
}

/* ============================================
   강사 카드 배지
   ============================================ */
.teacher-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #8105ed, #a855f7);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 1;
    white-space: nowrap;
}
