/* =================================================================
   COURSE DETAILS PAGE - MODERN REDESIGN
   Purple gradient theme matching Enroll Now button
   ================================================================= */

:root {
    --course-primary: #667eea;
    --course-secondary: #764ba2;
    --course-accent: #f093fb;
}

/* =================================================================
   PAGE LAYOUT
   ================================================================= */

.course-detail-page {
    background: linear-gradient(135deg, #0a0e13 0%, #1a1f26 100%);
    min-height: 100vh;
}

.course-detail-content {
    padding-top: 5rem;
}

/* =================================================================
   HERO SECTION
   ================================================================= */

.course-hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 50%, rgba(240, 147, 251, 0.1) 100%);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    padding: 3.5rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.course-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* Thick divider line to match Tool Details hero */
    height: 3px;
    background: linear-gradient(90deg, var(--course-primary) 0%, var(--course-secondary) 50%, var(--course-accent) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.course-hero-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
}

/* Left side - Main content */
.course-hero-main {
    text-align: left;
}

.hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.hero-breadcrumb a {
    color: var(--course-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-breadcrumb a:hover {
    color: var(--course-accent);
}

.hero-breadcrumb span {
    color: rgba(255, 255, 255, 0.4);
}

.course-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.course-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.course-rating-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.rating-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--course-accent);
}

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

.meta-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.meta-icon {
    font-size: 1.1rem;
}

.hero-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.hero-badge.platform {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    color: var(--course-primary);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.hero-badge.level {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 158, 11, 0.2));
    color: var(--course-accent);
    border: 1px solid rgba(240, 147, 251, 0.3);
}

.hero-badge.type-free {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.hero-badge.type-paid {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(79, 70, 229, 0.2));
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Right side - CTA Card */
.course-cta-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 6rem;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
}

.cta-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-card-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cta-card-price {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--course-primary), var(--course-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-enroll-now,
.btn-visit-platform {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-enroll-now {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-enroll-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #7589f1 0%, #8558b0 100%);
}

.btn-visit-platform {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-family: inherit;
}

.btn-visit-platform:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: rgba(255, 255, 255, 0.9);
}

.cta-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.cta-feature-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--course-primary), var(--course-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

/* =================================================================
   MAIN CONTENT AREA
   ================================================================= */

.course-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
}

/* Left column - Main content */
.course-main-content {
    min-width: 0;
}

.content-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.content-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-section h2::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(135deg, var(--course-primary), var(--course-secondary));
    border-radius: 2px;
}

.description-content {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.description-content p {
    margin-bottom: 1rem;
}

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

.detail-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.detail-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.detail-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Tags & Categories */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.content-tag {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.content-tag.language {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    color: var(--course-primary);
    border-color: rgba(102, 126, 234, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.content-tag.category {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.15), rgba(245, 158, 11, 0.15));
    color: var(--course-accent);
    border-color: rgba(240, 147, 251, 0.2);
}

.content-tag.tag-item {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.content-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Right column - Sidebar */
.course-sidebar {
    position: sticky;
    top: 6rem;
    height: fit-content;
}

.sidebar-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.sidebar-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--course-primary);
}

/* =================================================================
   REVIEWS SECTION
   ================================================================= */

.reviews-section {
    margin-top: 3rem;
}

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

.reviews-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.add-review-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.add-review-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--course-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Star Rating Input */
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
}

.rating-input input {
    display: none;
}

.rating-input label {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
    color: var(--course-accent);
    transform: scale(1.1);
}

.submit-review-btn {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    align-self: flex-start;
}

.submit-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #7589f1 0%, #8558b0 100%);
}

.review-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Reviews List */
.reviews-list h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.review-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.review-item:hover {
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(4px);
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reviewer-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.review-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

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

/* Change review stars to purple matching Submit Review button */
.review-rating {
    filter: hue-rotate(200deg) saturate(1.2);
}

.review-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.no-reviews {
    text-align: center;
    padding: 3rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

@media (max-width: 992px) {
    .course-hero {
        margin-top: 8rem;
    }
    
    .course-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .course-cta-card {
        position: static;
    }

    .course-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .course-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .course-hero {
        margin-top: 8rem;
    }
    
    .course-title {
        font-size: 2rem;
    }
    

    .course-subtitle {
        font-size: 1rem;
    }

    .course-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .meta-divider {
        display: none;
    }

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

    .content-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-container,
    .course-content-wrapper {
        padding-left: 1rem;
        padding-right: 1rem;
    }

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

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