@import url('variables.css');

.teacher-profile {
    padding: 30px 0;
}
.teacher-profile .container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.teacher-profile .sidebar {
    background: var(--bg-color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 24px 20px;
    position: sticky;
    top: 90px;
    height: fit-content;
    border: 1px solid var(--border-color);
}
.teacher-profile .sidebar .avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--primary-color);
}
.teacher-profile .sidebar .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.teacher-profile .sidebar .avatar i {
    color: white;
    font-size: 48px;
}
.teacher-profile .sidebar .name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 4px;
}
.teacher-profile .sidebar .specialization {
    text-align: center;
    color: var(--text-color-2);
    font-size: 14px;
    margin-bottom: 12px;
}
.teacher-profile .sidebar .bio {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 16px;
    text-align: center;
    padding: 8px 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    border-bottom: 3px solid var(--primary-color);
}
.teacher-profile .sidebar .contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid var(--gray-100);
}
.teacher-profile .sidebar .contact-item:last-child {
    border-bottom: none;
}
.teacher-profile .sidebar .contact-item i {
    width: 20px;
    color: var(--primary-color);
}
.teacher-profile .sidebar .contact-item .whatsapp-icon {
    color: #25D366;
}
.teacher-profile .sidebar .contact-item a {
    color: #25D366;
    text-decoration: none;
    font-weight: 500;
}
.teacher-profile .sidebar .contact-item a:hover {
    text-decoration: underline;
}
.teacher-profile .sidebar .balance-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--bg-hover), #eef2ff);
    border-radius: var(--radius-xl);
    margin: 16px 0;
    border: 2px solid var(--primary-color);
    border-style: dashed;
}
.teacher-profile .sidebar .balance-section .balance {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}
.teacher-profile .sidebar .balance-section .label {
    font-size: 14px;
    color: var(--text-color-2);
    font-weight: 600;
}
.teacher-profile .sidebar .balance-section .currency-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-bottom: 4px;
}
.teacher-profile .sidebar .actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.teacher-profile .sidebar .btn-whatsapp {
    background: #25D366;
    color: white;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    transition: var(--transition-base);
    border: none;
    width: 100%;
    font-weight: 500;
}
.teacher-profile .sidebar .btn-whatsapp:hover {
    background: #1da851;
    transform: scale(1.02);
}
.teacher-profile .sidebar .btn-charge {
    background: var(--primary-color);
    color: white;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    transition: var(--transition-base);
    border: none;
    width: 100%;
    font-weight: 500;
}
.teacher-profile .sidebar .btn-charge:hover {
    background: var(--primary-color-dark);
    transform: scale(1.02);
}
.teacher-profile .sidebar .btn-login {
    background: var(--primary-color);
    color: white;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    transition: var(--transition-base);
    border: none;
    width: 100%;
    font-weight: 500;
}
.teacher-profile .sidebar .btn-login:hover {
    background: var(--primary-color-dark);
    transform: scale(1.02);
}
.teacher-profile .sidebar .meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    color: #555;
}
.teacher-profile .sidebar .meta-item i {
    color: var(--primary-color);
    width: 20px;
}
.teacher-profile .sidebar .meta-item:last-child {
    border-bottom: none;
}
.teacher-profile .sidebar .centers-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.teacher-profile .sidebar .centers-section.hidden {
    display: none;
}
.teacher-profile .sidebar .centers-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 8px 0;
    transition: var(--transition-base);
    user-select: none;
}
.teacher-profile .sidebar .centers-toggle:hover {
    opacity: 0.8;
}
.teacher-profile .sidebar .centers-toggle .centers-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.teacher-profile .sidebar .centers-toggle .centers-title i {
    color: var(--primary-color);
}
.teacher-profile .sidebar .centers-toggle .centers-arrow {
    color: #999;
    transition: transform 0.3s ease;
    font-size: 16px;
}
.teacher-profile .sidebar .centers-toggle .centers-arrow.rotated {
    transform: rotate(180deg);
}
.teacher-profile .sidebar .centers-list-wrapper {
    display: none;
    transition: var(--transition-base);
}
.teacher-profile .sidebar .centers-list-wrapper.active {
    display: block;
}
.teacher-profile .sidebar .centers-list {
    padding-top: 10px;
}
.teacher-profile .sidebar .center-card {
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 10px;
    text-align: left;
}
.teacher-profile .sidebar .center-card:last-child {
    margin-bottom: 0;
}
.teacher-profile .sidebar .center-card .center-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 6px 0;
    text-align: left;
}
.teacher-profile .sidebar .center-card .center-info p {
    margin: 3px 0;
    color: #555;
    font-size: 13px;
    text-align: left;
}
.teacher-profile .sidebar .center-card .center-info p i {
    color: var(--primary-color);
    width: 18px;
    margin-right: 6px;
    font-size: 13px;
}
.teacher-profile .sidebar .center-card .center-info p a {
    color: #555;
    text-decoration: none;
}
.teacher-profile .sidebar .center-card .center-info p a:hover {
    color: var(--primary-color);
}
.teacher-profile .sidebar .center-card .center-schedule {
    padding-top: 8px;
    border-top: 1px solid var(--gray-200);
    margin-top: 6px;
}
.teacher-profile .sidebar .center-card .center-schedule p {
    margin: 3px 0;
    color: #555;
    font-size: 12px;
    text-align: left;
}
.teacher-profile .sidebar .center-card .center-schedule p i {
    color: var(--primary-color);
    width: 18px;
    margin-right: 6px;
    font-size: 13px;
}
.teacher-profile .sidebar .no-centers {
    font-size: 13px;
    color: #999;
    text-align: center;
    padding: 10px 0;
}
.teacher-profile .sidebar .no-centers i {
    display: block;
    font-size: 28px;
    color: #ddd;
    margin-bottom: 6px;
}
.teacher-profile .content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.teacher-profile .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--bg-color-white);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-color);
    transition: var(--transition-base);
    box-shadow: var(--shadow-xs);
    margin-bottom: 20px;
    width: fit-content;
}
.teacher-profile .back-btn i {
    font-size: 13px;
    transition: var(--transition-base);
}
.teacher-profile .back-btn:hover {
    background: var(--primary-color);
    color: var(--bg-color-white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateX(-3px);
}
.teacher-profile .back-btn:hover i {
    transform: translateX(-3px);
}
.teacher-profile .subjects-section .section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    padding: 14px 20px;
    background: var(--bg-color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: center;
    gap: 12px;
}
.teacher-profile .subjects-section .section-title i {
    color: var(--primary-color);
    font-size: 22px;
}
.teacher-profile .subjects-section .section-title .count-badge {
    background: var(--primary-color);
    color: var(--bg-color-white);
    font-size: 13px;
    font-weight: 600;
    padding: 2px 12px;
    border-radius: var(--radius-full);
    margin-right: auto;
}
.teacher-profile .no-subjects {
    text-align: center;
    padding: 40px;
    color: var(--text-color-2);
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
}
.teacher-profile .no-subjects i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}
.teacher-profile .no-subjects h4 {
    color: #333;
    margin-bottom: 6px;
}
.teacher-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--bg-color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}
.teacher-catalog-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    background: #f8f9fc;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #eef0f5;

}
.teacher-catalog-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.teacher-catalog-card .card-image {
    height: 140px;
    background: var(--bg-hover);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.teacher-catalog-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.teacher-catalog-card .card-image .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 16px;
    background: var(--primary-color);
    color: var(--bg-color-white);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--somar-regular);
}
.teacher-catalog-card .card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.teacher-catalog-card .card-body .title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.teacher-catalog-card .card-body .meta {
    font-size: 13px;
    color: var(--text-color-2);
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.teacher-catalog-card .card-body .meta span {
    background: var(--gray-100);
    padding: 2px 10px;
    border-radius: var(--radius-lg);
    font-size: 12px;
}
.teacher-catalog-card .card-body .btn-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
}
.teacher-catalog-card .card-body .btn-content:hover {
    background: var(--primary-color-dark);
    transform: scale(1.02);
}

@media (max-width: 991px) {
    .teacher-profile .container {
        grid-template-columns: 1fr;
    }
    .teacher-profile .sidebar {
        position: static;
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 20px;
        align-items: start;
        padding: 20px;
    }
    .teacher-profile .sidebar .avatar {
        margin: 0;
        width: 100px;
        height: 100px;
    }
    .teacher-profile .sidebar .info {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .teacher-profile .sidebar .name {
        text-align: left;
        font-size: 18px;
    }
    .teacher-profile .sidebar .specialization {
        text-align: left;
    }
    .teacher-profile .sidebar .bio {
        text-align: left;
    }
    .teacher-profile .sidebar .meta-item {
        justify-content: flex-start;
        font-size: 13px;
    }
    .teacher-profile .sidebar .contact-item {
        justify-content: flex-start;
    }
    .teacher-profile .sidebar .actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .teacher-profile .sidebar .actions .btn-whatsapp,
    .teacher-profile .sidebar .actions .btn-charge,
    .teacher-profile .sidebar .actions .btn-login {
        flex: 1;
        min-width: 120px;
        font-size: 13px;
        padding: 8px 12px;
    }
    .teacher-profile .sidebar .balance-section {
        margin: 12px 0;
    }
    .teacher-catalog-grid {
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .teacher-profile .sidebar .center-card {
        padding: 12px 14px;
    }
    .teacher-profile .sidebar .centers-toggle .centers-title {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .teacher-profile .sidebar {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 16px;
    }
    .teacher-profile .sidebar .avatar {
        margin: 0 auto;
        width: 80px;
        height: 80px;
    }
    .teacher-profile .sidebar .name {
        text-align: center;
        font-size: 16px;
    }
    .teacher-profile .sidebar .specialization {
        text-align: center;
    }
    .teacher-profile .sidebar .bio {
        text-align: center;
        border-left: none;
        border-right: none;
        border-bottom: 3px solid var(--primary-color);
    }
    .teacher-profile .sidebar .meta-item {
        font-size: 13px;
    }
    .teacher-profile .sidebar .contact-item {
        justify-content: center;
    }
    .teacher-profile .sidebar .balance-section {
        flex-direction: column;
        gap: 6px;
    }
    .teacher-profile .sidebar .actions {
        flex-direction: column;
    }
    .teacher-profile .sidebar .actions .btn-whatsapp,
    .teacher-profile .sidebar .actions .btn-charge,
    .teacher-profile .sidebar .actions .btn-login {
        flex: none;
        width: 100%;
    }
    .teacher-catalog-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .teacher-catalog-card .card-image {
        height: 100px;
    }
    .teacher-catalog-card .card-body {
        padding: 10px 12px 12px;
    }
    .teacher-catalog-card .card-body .title {
        font-size: 13px;
    }
    .teacher-catalog-card .card-body .btn-content {
        font-size: 12px;
        padding: 6px 12px;
    }
    .teacher-profile .sidebar .center-card {
        padding: 10px 12px;
    }
    .teacher-profile .sidebar .center-card .center-info p {
        font-size: 12px;
    }
    .teacher-profile .sidebar .center-card .center-schedule p {
        font-size: 11px;
    }
    .teacher-profile .sidebar .centers-toggle .centers-title {
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .teacher-catalog-grid {
        grid-template-columns: 1fr;
    }
}

html[dir="rtl"] .teacher-profile .sidebar .bio {
    border-left: none;
    border-bottom: 3px solid var(--primary-color);
}
html[dir="rtl"] .teacher-profile .sidebar .meta-item i {
    margin-left: 10px;
    margin-right: 0;
}
html[dir="rtl"] .teacher-profile .sidebar .contact-item i {
    margin-left: 10px;
    margin-right: 0;
}
html[dir="rtl"] .teacher-catalog-card .card-image .badge {
    left: auto;
    right: 8px;
}
html[dir="rtl"] .teacher-profile .sidebar .center-card {
    text-align: right;
}
html[dir="rtl"] .teacher-profile .sidebar .center-card .center-name {
    text-align: right;
}
html[dir="rtl"] .teacher-profile .sidebar .center-card .center-info p {
    text-align: right;
}
html[dir="rtl"] .teacher-profile .sidebar .center-card .center-info p i {
    margin-right: 0;
    margin-left: 6px;
}
html[dir="rtl"] .teacher-profile .sidebar .center-card .center-schedule p {
    text-align: right;
}
html[dir="rtl"] .teacher-profile .sidebar .center-card .center-schedule p i {
    margin-right: 0;
    margin-left: 6px;
}
html[dir="rtl"] .teacher-profile .back-btn:hover {
    transform: translateX(3px);
}
html[dir="rtl"] .teacher-profile .back-btn:hover i {
    transform: translateX(3px);
}
html[dir="rtl"] .teacher-profile .subjects-section .section-title .count-badge {
    margin-right: 0;
    margin-left: auto;
}