/* Class Page Styles */

:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
}

.hero-content {
    flex: 1;
}

.hero-section .container {
    display: flex;
    gap: 60px;
    align-items: center;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

.breadcrumb span {
    opacity: 0.7;
}

.course-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.course-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item .icon {
    font-size: 1.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    flex: 0 0 400px;
}

.image-placeholder {
    background: rgba(255,255,255,0.1);
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 12px;
    padding: 60px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.image-placeholder span {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--bg-white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-block {
    width: 100%;
    display: block;
    margin-bottom: 12px;
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Content Cards */
.content-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.content-card h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.content-card h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-dark);
}

.content-card p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 30px;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-color);
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Curriculum */
.curriculum {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.curriculum-section {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    background: var(--bg-light);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.section-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.section-duration {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.lesson-list li {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.lesson-icon {
    font-size: 1rem;
}

.lesson-list li span:nth-child(2) {
    flex: 1;
}

.lesson-duration {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Instructor */
.instructor-profile {
    display: flex;
    gap: 30px;
    align-items: start;
}

.instructor-avatar {
    width: 120px;
    height: 120px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    flex-shrink: 0;
}

.instructor-info h3 {
    margin: 0 0 0.5rem;
}

.instructor-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem !important;
}

.instructor-stats {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat strong {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.stat span {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Sidebar */
.sidebar {
    position: relative;
}

.sticky {
    position: sticky;
    top: 90px;
}

.info-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.current-price {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-dark);
}

.original-price {
    font-size: 1.5rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-badge {
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.info-list {
    margin: 25px 0;
}

.info-list h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.info-list ul {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
}

.info-list .icon {
    font-size: 1.2rem;
}

.guarantee {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-weight: 500;
}

/* Reviews Section */
.reviews-section {
    background: var(--bg-white);
}

.review-summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.summary-main {
    flex: 0 0 auto;
}

.rating-large {
    text-align: center;
}

.rating-number {
    font-size: 4rem;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.stars-large {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stars-large .star {
    color: #ffd700;
}

.review-count {
    font-size: 1.1rem;
    opacity: 0.9;
}

.rating-breakdown {
    flex: 1;
    max-width: 400px;
    margin-left: 60px;
}

.distribution-bar {
    display: flex;
    align-items: center;
    margin: 12px 0;
    gap: 15px;
}

.distribution-bar .label {
    width: 60px;
    font-size: 1rem;
}

.distribution-bar .bar-container {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.distribution-bar .bar-fill {
    height: 100%;
    background: #ffd700;
    transition: width 0.5s ease;
}

.distribution-bar .count {
    width: 50px;
    text-align: right;
}

/* Review Form */
.review-form-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.review-form-card h3 {
    margin-bottom: 10px;
}

.form-description {
    color: var(--text-light);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.required {
    color: var(--accent-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.star-rating-input {
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    gap: 8px;
}

.star-rating-input .star {
    color: #ddd;
    transition: color 0.2s;
}

.star-rating-input .star:hover,
.star-rating-input .star.active {
    color: #ffd700;
}

.char-counter {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 5px;
}

.char-counter .warning {
    color: var(--accent-color);
    margin-left: 10px;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Reviews List */
.reviews-list-section {
    margin-top: 40px;
}

.reviews-list-section h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
}

#reviewsContainer {
    display: grid;
    gap: 20px;
}

.review-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
    position: relative;
    padding-bottom: 50px;
}

.review-card:hover {
    box-shadow: var(--shadow-md);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.review-author {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.review-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 5px;
}

.review-rating {
    font-size: 1.3rem;
}

.review-rating .star {
    color: #ddd;
}

.review-rating .star.filled {
    color: #ffd700;
}

.review-comment {
    color: var(--text-dark);
    line-height: 1.8;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-style: italic;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* Responsive */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }

    .hero-section .container {
        flex-direction: column;
    }

    .hero-image {
        flex: 1;
        width: 100%;
    }

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

    .review-summary-card {
        flex-direction: column;
        text-align: center;
    }

    .rating-breakdown {
        margin-left: 0;
        margin-top: 30px;
        max-width: 100%;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .instructor-profile {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .course-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .content-card {
        padding: 25px;
    }

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

    .nav-menu {
        display: none;
    }
}
