/**
 * 2008-2026 Prestaworld
 *
 * NOTICE OF LICENSE
 *
 * The source code of this module is under a commercial license.
 * Each license is unique and can be installed and used on only one website.
 * Any reproduction or representation total or partial of the module, one or more of its components,
 * by any means whatsoever, without express permission from us is prohibited.
 *
 * DISCLAIMER
 *
 * Do not alter or add/update to this file if you wish to upgrade this module to newer
 * versions in the future.
 *
 * @author    prestaworld
 * @copyright 2008-2026 Prestaworld
 * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 * International Registered Trademark & Property of prestaworld
 */

/**
 * Course Detail Page Styles
 * Coursera-style design
 */

.prestaelearning-course-detail {
    background-color: #f7f9fa;
}

/* Hero Section */
.course-hero {
    position: relative;
    padding: 0;
    margin: 0;
    max-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.course-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1501504905252-473c47e087f8?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.course-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 86, 210, 0.85) 0%, rgba(0, 68, 148, 0.75) 100%);
    z-index: 2;
}

.course-hero-content {
    position: relative;
    z-index: 3;
    padding: 4rem 15px;
    width: 100%;
}

.course-hero .container {
    position: relative;
    z-index: 3;
}

.course-breadcrumb {
    margin-bottom: 1.5rem;
}

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

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

.course-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
}

.course-breadcrumb .breadcrumb-item a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.course-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.course-instructor-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.instructor-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

.instructor-details {
    display: flex;
    flex-direction: column;
}

.instructor-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.instructor-badge {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.enrollment-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.course-cta {
    text-align: end;
}

.btn-enroll {
    background-color: #ffffff;
    color: #0056d2;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-enroll:hover {
    background-color: #f0f0f0;
    color: #004494;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.course-start-date {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

/* Metrics Bar */
.course-metrics {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
}

.metric-item {
    display: flex;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.metric-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.metric-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.25rem;
    font-weight: 500;
}

.metric-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.25rem;
}

.recommendation-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.thumbs-up {
    font-size: 1.25rem;
}

/* Main Content */
.course-main-content {
    padding: 3rem 0;
    background-color: #ffffff;
    position: relative;
    z-index: 4;
}

/* Tabs */
.course-tabs {
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 2rem;
}

.course-tabs .nav-link {
    color: #666;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.course-tabs .nav-link:hover {
    color: #0056d2;
    border-bottom-color: #e0e0e0;
}

.course-tabs .nav-link.active {
    color: #0056d2;
    border-bottom-color: #0056d2;
    background: transparent;
}

.course-tabs .nav-link:hover, .course-tabs .nav-link:focus {
    color: #0056d2 !important;
    border-bottom-color: #0056d2 !important;
    background: transparent !important;
}

.course-tab-content {
    min-height: 400px;
}

/* Course Sections */
.course-section {
    margin-bottom: 3rem;
}

.course-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

/* Learning Points */
.learning-points {
    list-style: none;
    padding: 0;
}

.learning-points li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-left: 0;
}

.check-icon {
    color: #0056d2;
    font-weight: bold;
    margin-right: 1rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Course Description */
.course-description {
    line-height: 1.8;
    color: #333;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
}

.detail-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.detail-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

.detail-content p {
    margin: 0;
    color: #666;
    font-size: 0.875rem;
}

/* Modules List */
.modules-list {
    margin-top: 2rem;
}

.module-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.module-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.module-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    background-color: #ffffff;
    transition: background-color 0.2s;
}

.module-header:hover {
    background-color: #f7f9fa;
}

.module-header[aria-expanded="true"] {
    border-bottom: 1px solid #e0e0e0;
}

.module-header[aria-expanded="true"] .module-toggle i {
    transform: rotate(180deg);
}

.module-number {
    font-weight: 600;
    color: #0056d2;
    margin-right: 1rem;
    min-width: 80px;
}

.module-title {
    flex: 1;
    font-weight: 500;
    color: #1a1a1a;
    margin-right: 1rem;
}

.module-meta {
    margin-right: 1rem;
}

.module-duration {
    color: #666;
    font-size: 0.875rem;
}

.module-toggle {
    color: #666;
    transition: transform 0.2s;
}

.module-toggle i {
    transition: transform 0.2s;
}

.module-content {
    padding: 1.5rem;
    background-color: #f7f9fa;
}

.module-description {
    margin-bottom: 1rem;
    color: #666;
}

.lessons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lesson-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-type-icon {
    margin-right: 1rem;
    font-size: 1.25rem;
}

.lesson-title {
    flex: 1;
    color: #1a1a1a;
}

.lesson-duration {
    color: #666;
    font-size: 0.875rem;
    margin-right: 1rem;
}

.lesson-preview-badge {
    background-color: #0056d2;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Reviews Section */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.overall-rating {
    text-align: right;
}

.rating-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
}

.rating-stars {
    margin: 0.5rem 0;
    color: #ffc107;
}

.rating-count {
    color: #666;
    font-size: 0.875rem;
}

.rating-distribution {
    margin-bottom: 2rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.rating-label {
    min-width: 60px;
    font-size: 0.875rem;
    color: #666;
}

.rating-progress {
    flex: 1;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.rating-progress-fill {
    height: 100%;
    background-color: #0056d2;
    transition: width 0.3s;
}

.rating-percent {
    min-width: 40px;
    text-align: right;
    font-size: 0.875rem;
    color: #666;
}

.testimonial-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #0056d2;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 1rem;
}

.testimonial-name {
    font-weight: 600;
    color: #1a1a1a;
}

.testimonial-rating {
    color: #ffc107;
    font-size: 0.875rem;
}

.testimonial-text {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Sidebar */
.course-sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.sidebar-instructor {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.sidebar-instructor img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-right: 1rem;
}

.sidebar-instructor-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.sidebar-instructor-rating {
    color: #ffc107;
    margin-bottom: 0.5rem;
}

.sidebar-instructor-stats {
    font-size: 0.875rem;
    color: #666;
}

.sidebar-instructor-bio {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.offered-by {
    display: flex;
    align-items: center;
}

.offered-by-logo {
    font-size: 2rem;
    margin-right: 1rem;
}

.offered-by-name {
    font-weight: 600;
    color: #1a1a1a;
}

.course-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-details-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.course-details-list li:last-child {
    border-bottom: none;
}

.course-details-list strong {
    color: #1a1a1a;
    margin-right: 0.5rem;
}

.sidebar-enroll {
    margin-top: 1.5rem;
}

.sidebar-enroll .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Related Courses */
.related-courses {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e0e0e0;
}

.related-courses h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2rem;
}

.related-course-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.related-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-course-image {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.related-course-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
    min-height: 48px;
    line-height: 1.5;
}

.related-course-link {
    color: #0056d2;
    text-decoration: none;
    font-weight: 500;
}

.related-course-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 991px) {
    .course-sidebar {
        position: relative;
        top: 0;
        margin-top: 3rem;
    }

    .course-title {
        font-size: 2rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .course-title {
        font-size: 1.75rem;
    }

    .metric-item {
        margin-bottom: 1rem;
    }

    .course-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .overall-rating {
        text-align: left;
        margin-top: 1rem;
    }
}

