﻿:root {
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* General Styles */
.course-detail-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 15px;
}

.course-detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin: 30px 0;
}

/* Main Content */
.course-main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    padding: 20px 24px;
}

.card-body {
    padding: 24px;
}

/* Course Header */
.course-header-card {
    padding: 24px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

    .tag.category {
        background: var(--primary-light);
        color: forestgreen;
    }

    .tag.certificate {
        background: rgba(247, 183, 51, 0.2);
        color: #b4690e;
    }

    .tag.level {
        background: rgba(34, 139, 230, 0.2);
        color: #0b5b99;
    }

.course-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin: 16px 0;
    line-height: 1.2;
}

.course-description {
    color: var(--gray);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.instructor-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 24px 0;
    padding: 20px;
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.instructor-details {
    flex: 1;
}

.instructor-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-dark); /* highlight with your global gold */
    margin-bottom: 4px;
}

.instructor-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
}

.instructor-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray);
}

.course-stats {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray);
}

    .stat-item i {
        color: var(--primary);
    }

/* What You'll Learn */
.learn-card {
    padding: 24px;
}

    .learn-card h3 {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.learn-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.learn-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
}

    .learn-item i {
        color: var(--success);
        margin-top: 2px;
    }

/* Course Content */
.content-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-stats {
    font-size: 14px;
    color: var(--gray);
}

.accordion-button {
    padding: 16px 24px;
    font-weight: 600;
    background: var(--white);
}

    .accordion-button:not(.collapsed) {
        background: var(--white);
        color: var(--dark);
        box-shadow: inset 0 -1px 0 var(--light-gray);
    }

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.module-title {
    font-weight: 600;
}

.module-meta {
    font-size: 14px;
    color: var(--gray);
    display: flex;
    gap: 8px;
}

.topic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-item {
    display: flex;
    align-items: center;
    justify-content: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

    .topic-item:last-child {
        border-bottom: none;
    }

    .topic-item i {
        color: var(--gray);
        margin-right: 12px;
    }

.topic-duration {
    font-size: 14px;
    color: var(--gray);
}

/* Requirements */
.requirements-card {
    padding: 24px;
}

    .requirements-card h3 {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 16px;
    }

    .requirements-card ul {
        padding-inline-start: 20px;
        margin: 0;
    }

    .requirements-card li {
        margin-bottom: 8px;
        color: var(--gray);
    }

/* Reviews */
.reviews-card {
    padding: 24px;
}

    .reviews-card h3 {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 16px;
    }

.rating-overview {
    display: flex;
    gap: 40px;
}

.average-rating {
    text-align: center;
}

.rating-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--dark);
}

.stars {
    color: var(--warning);
    margin: 8px 0;
}

.rating-count {
    font-size: 14px;
    color: var(--gray);
}

.rating-bars {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

    .rating-bar .stars {
        width: 50px;
        font-size: 14px;
        color: var(--gray);
    }

.progress {
    flex: 1;
    height: 8px;
    background: var(--light-gray);
    border-radius: 4px;
}

.progress-bar {
    background: var(--warning);
    border-radius: 4px;
}

.percentage {
    width: 40px;
    font-size: 14px;
    color: var(--gray);
    text-align: right;
}

/* Sidebar */
.course-sidebar {
    position: relative;
}

.sticky-sidebar {
    position: sticky;
    top: 20px;
}

.purchase-card {
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.course-preview {
    position: relative;
}

.course-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: opacity 0.3s;
}

    .video-overlay:hover {
        opacity: 0.9;
    }

    .video-overlay i {
        font-size: 48px;
        margin-bottom: 8px;
    }

.pricing {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.final-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.original-price {
    font-size: 16px;
    color: var(--gray);
    text-decoration: line-through;
}

.discount-badge {
    background: #ffe799;
    color: #593d00;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    align-self: center;
}


.btn-enroll {
    display: block; /* or inline-block */
    width: calc(100% - 32px);
    margin: 0 16px 12px;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none; /* remove underline */
    text-align: center; /* center text inside */
}

    .btn-enroll:hover {
        background-color: green;
        color:white;
    }


.btn-wishlist {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 12px;
    background: transparent;
    color: var(--dark);
    border: 1px solid var(--dark);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-wishlist:hover {
        background: var(--light);
    }

.guarantee-badge {
    text-align: center;
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 16px;
    padding: 0 16px;
}

    .guarantee-badge i {
        margin-right: 8px;
        color: var(--success);
    }

.purchase-details {
    padding: 16px;
    border-top: 1px solid var(--light-gray);
}

    .purchase-details h4 {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 12px;
    }

    .purchase-details ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .purchase-details li {
        margin-bottom: 8px;
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .purchase-details i {
        color: var(--gray);
    }

.share-course {
    padding: 16px;
    border-top: 1px solid var(--light-gray);
}

    .share-course h4 {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 12px;
    }

/* Responsive Design */
@media (max-width: 992px) {
    .course-detail-grid {
        grid-template-columns: 1fr;
    }

    .learn-items {
        grid-template-columns: 1fr;
    }

    .rating-overview {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .course-title {
        font-size: 24px;
    }

    .course-stats {
        flex-wrap: wrap;
    }

    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
