/**
 * Стили для страницы отдельного преподавателя
 * 
 * @copyright Copyright (c) 2024 Кузьменко Валентин (Valentink2410)
 * @author Кузьменко Валентин (Valentink2410)
 */

/* Общие стили для страницы */
.teacher-page-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Кнопка возврата ко всем преподавателям */
.back-to-teachers {
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.back-to-teachers-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #8B2D3D 0%, #68202D 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    max-width: 1200px;
    margin: 0 auto;
}

.back-to-teachers-btn:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #8B2D3D 0%, #68202D 100%);
}

.back-to-teachers-btn svg {
    transition: transform 0.3s ease;
}

.back-to-teachers-btn:hover svg {
    transform: translateX(-3px);
}

/* Hero секция с фото и основной информацией */
.teacher-hero-section {
    position: relative;
    background: linear-gradient(135deg, #8B2D3D 0%, #68202D 100%);
    padding: 80px 20px;
    color: #fff;
    overflow: hidden;
}

.teacher-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.teacher-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.teacher-photo-large {
    flex-shrink: 0;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.teacher-photo-large:hover {
    transform: scale(1.05) rotate(2deg);
}

.teacher-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-hero-info {
    flex: 1;
}

.teacher-name {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 15px 0;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.teacher-position {
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 20px 0;
    opacity: 0.95;
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.teacher-education-header {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    color: #fff;
    opacity: 0.95;
    max-width: 700px;
}

.teacher-education-header p {
    margin: 0 0 8px 0;
    color: inherit;
}

.teacher-education-header p:last-child {
    margin-bottom: 0;
}

.teacher-description-header {
    margin: 0 0 20px 0;
    max-width: 700px;
}

.teacher-description-header .teacher-description-short {
    color: #fff;
}

.teacher-description-short {
    font-size: 18px;
    line-height: 1.6;
    margin: 25px 0;
    opacity: 0.95;
    max-width: 700px;
}

/* Контакты в hero секции */
.teacher-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 25px 0;
}

.teacher-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.teacher-contact-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.teacher-contact-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Социальные сети */
.teacher-social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.social-link svg {
    width: 22px;
    height: 22px;
}

/* Секция с контентом */
.teacher-content-section {
    padding: 60px 20px;
    background: #fff;
}

.teacher-content-container {
    max-width: 1200px;
    margin: 0 auto;
}

.teacher-description-full,
.teacher-education {
    margin-bottom: 50px;
}

.teacher-description-full h2,
.teacher-education h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: #2d3748;
    position: relative;
    padding-bottom: 15px;
}

.teacher-description-full h2::after,
.teacher-education h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #8B2D3D 0%, #68202D 100%);
    border-radius: 2px;
}

.teacher-description-text,
.teacher-education-text {
    font-size: 17px;
    line-height: 1.8;
    color: #4a5568;
}

.teacher-description-text p,
.teacher-education-text p {
    margin-bottom: 20px;
}

/* Секция с курсами */
.teacher-courses-section {
    padding: 60px 20px 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
}

.teacher-courses-container {
    max-width: 1200px;
    margin: 0 auto;
}

.teacher-courses-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 50px 0;
    color: #2d3748;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.teacher-courses-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #8B2D3D 0%, #68202D 100%);
    border-radius: 2px;
}

.teacher-courses-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
    border-radius: 2px;
}

.teacher-courses-title .courses-label {
    display: block;
    font-size: 36px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #8B2D3D 0%, #68202D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.teacher-courses-title .courses-count {
    display: inline-block;
    font-size: 48px;
    font-weight: 800;
    color: #68202D;
    background: linear-gradient(135deg, #8B2D3D 0%, #68202D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 15px;
    position: relative;
}

.teacher-courses-title .courses-count::before,
.teacher-courses-title .courses-count::after {
    content: '•';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #f093fb;
    font-size: 24px;
}

.teacher-courses-title .courses-count::before {
    left: -10px;
}

.teacher-courses-title .courses-count::after {
    right: -10px;
}

.teacher-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Карточка курса */
.teacher-course-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.teacher-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.course-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.course-card-thumbnail {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #8B2D3D 0%, #68202D 100%);
}

.course-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.teacher-course-card:hover .course-card-thumbnail img {
    transform: scale(1.1);
}

.course-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8B2D3D 0%, #68202D 100%);
}

.course-placeholder .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.5);
}

.course-discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f56565;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.4);
}

.course-card-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    line-height: 1.3;
}

.course-card-content {
    padding: 20px;
}

.course-card-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.course-old-price {
    font-size: 16px;
    color: #a0aec0;
    text-decoration: line-through;
}

.course-current-price {
    font-size: 24px;
    font-weight: 700;
    color: #68202D;
}

.course-card-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.stars-rating {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 18px;
    line-height: 1;
}

.star-filled {
    color: #f6ad55;
}

.star-empty {
    color: #e2e8f0;
}

.reviews-count {
    font-size: 14px;
    color: #718096;
}

.course-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
}

/* Сообщение об отсутствии курсов */
.teacher-no-courses {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
}

.teacher-no-courses p {
    font-size: 18px;
    color: #718096;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .teacher-hero-container {
        gap: 40px;
    }
    
    .teacher-photo-large {
        width: 220px;
        height: 220px;
    }
    
    .teacher-name {
        font-size: 40px;
    }
    
    .teacher-courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .back-to-teachers {
        padding: 15px;
    }
    
    .back-to-teachers-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .teacher-hero-section {
        padding: 50px 20px;
    }
    
    .teacher-hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .teacher-photo-large {
        width: 200px;
        height: 200px;
    }
    
    .teacher-name {
        font-size: 32px;
    }
    
    .teacher-position {
        font-size: 18px;
    }
    
    .teacher-description-short {
        font-size: 16px;
    }
    
    .teacher-contacts {
        justify-content: center;
    }
    
    .teacher-social-links {
        justify-content: center;
    }
    
    .teacher-content-section {
        padding: 40px 20px;
    }
    
    .teacher-description-full h2,
    .teacher-education h2 {
        font-size: 26px;
    }
    
    .teacher-courses-section {
        padding: 40px 20px 60px;
    }
    
    .teacher-courses-title {
        font-size: 28px;
    }
    
    .teacher-courses-title .courses-label {
        font-size: 28px;
    }
    
    .teacher-courses-title .courses-count {
        font-size: 40px;
    }
    
    .teacher-courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .back-to-teachers {
        padding: 12px;
    }
    
    .back-to-teachers-btn {
        font-size: 13px;
        padding: 8px 16px;
        gap: 6px;
    }
    
    .back-to-teachers-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .teacher-hero-section {
        padding: 40px 15px;
    }
    
    .teacher-photo-large {
        width: 160px;
        height: 160px;
    }
    
    .teacher-name {
        font-size: 28px;
    }
    
    .teacher-position {
        font-size: 16px;
        padding: 6px 15px;
    }
    
    .teacher-description-short {
        font-size: 15px;
    }
    
    .teacher-contact-item {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .teacher-content-section {
        padding: 30px 15px;
    }
    
    .teacher-description-full h2,
    .teacher-education h2 {
        font-size: 22px;
    }
    
    .teacher-description-text,
    .teacher-education-text {
        font-size: 15px;
    }
    
    .teacher-courses-section {
        padding: 30px 15px 50px;
    }
    
    .teacher-courses-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .teacher-courses-title .courses-label {
        font-size: 22px;
    }
    
    .teacher-courses-title .courses-count {
        font-size: 32px;
    }
    
    .course-card-thumbnail {
        height: 180px;
    }
    
    .course-card-title-overlay {
        font-size: 18px;
        padding: 15px;
    }
}
