﻿

/* Course Banner */
.course-banner {
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.banner-content {
    position: relative;
    z-index: 2;
}

    .banner-content h1 {
        font-size: 2.8rem;
        margin-bottom: 15px;
    }

    .banner-content p {
        font-size: 1.2rem;
        opacity: 0.9;
        max-width: 600px;
    }

/* Course Main Content */
.course-main {
    display: flex;
    gap: 40px;
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.course-content {
    flex: 1;
}

.course-sidebar {
    width: 350px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 25px;
    align-self: flex-start;
}

.course-info {
    margin-bottom: 25px;
}

.course-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    color: var(--light-text);
}

.course-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.enroll-btn {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.course-features {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

/* Course Chapters */
.chapters-section {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
}

.chapter {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.chapter-header {
    padding: 15px 20px;
    background-color: var(--bg-light);
    display: flex;
    justify-content: between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

    .chapter-header:hover {
        background-color: #f0f2ff;
    }

.chapter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.chapter-toggle {
    transition: var(--transition);
}

.chapter.active .chapter-toggle {
    transform: rotate(180deg);
}

.lessons {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.chapter.active .lessons {
    max-height: 1000px;
}

.lesson {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

    .lesson:hover {
        background-color: #f9f9f9;
    }

    .lesson:last-child {
        border-bottom: none;
    }

.lesson-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

    .play-btn:hover {
        background-color: var(--secondary-color);
        transform: scale(1.1);
    }

.lesson-duration {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Comments Section */
.comments-section {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
}

.comment {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

    .comment:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ddd;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
}

.comment-date {
    color: var(--light-text);
    font-size: 0.9rem;
}

.comment-text {
    color: var(--light-text);
}

.comment-rating {
    color: #ffc107;
    margin-top: 5px;
}

/* FAQ Section */
.faq-section {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 15px 20px;
    background-color: var(--bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

    .faq-question:hover {
        background-color: #f0f2ff;
    }

.faq-toggle {
    transition: var(--transition);
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 20px;
}

/* Expandable Text Section */
.expandable-section {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
}

.expandable-content h2 {
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: var(--text-color);
}

.content-preview {
    position: relative;
    overflow: hidden;
    max-height: 120px; /* حدود 3 خط */
}

.content-full {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

    .content-full.expanded {
        max-height: 1000px; /* ارتفاع کافی برای نمایش کل محتوا */
    }

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .read-more-btn:hover {
        color: var(--secondary-color);
    }

/* Video Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.video-modal {
    width: 90%;
    max-width: 900px;
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .video-modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: var(--white);
}

.close-modal {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

/* Footer */
footer {
    background-color: #1a1a1a;
    color: var(--white);
    padding: 70px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

    .footer-column h3::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 40px;
        height: 2px;
        background-color: var(--primary-color);
    }

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #aaa;
    transition: var(--transition);
}

    .footer-links a:hover {
        color: var(--white);
        padding-right: 5px;
    }

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

    .social-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        transition: var(--transition);
    }

        .social-links a:hover {
            background-color: var(--primary-color);
            transform: translateY(-5px);
        }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .course-main {
        flex-direction: column;
    }

    .course-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-buttons {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .course-banner {
        height: 300px;
    }

    .banner-content h1 {
        font-size: 2.2rem;
    }

    .chapters-section,
    .comments-section,
    .faq-section,
    .expandable-section {
        padding: 20px;
    }
}
