/* Module Sidebar Component - edX-style metadata sidebar */

/* Main sidebar container */
.module-sidebar {
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Sticky behavior on desktop */
@media (min-width: 992px) {
    .module-sidebar-sticky {
        position: sticky;
        top: 20px;
    }
}

/* Featured Image */
.module-featured-image {
    padding: 0;
    border-bottom: 1px solid #e3e8ee;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.module-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Metadata item */
.metadata-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

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

.metadata-item i {
    font-size: 18px;
    color: #5c6ac4;
    min-width: 20px;
    margin-top: 2px;
}

.metadata-content {
    flex: 1;
}

.metadata-label {
    font-size: 13px;
    font-weight: 600;
    color: #637381;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metadata-value {
    font-size: 15px;
    color: #212b35;
    font-weight: 500;
}

/* Tag pills */
.tag-pill {
    display: inline-block;
    background: #f0f2f5;
    color: #5c6ac4;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    margin: 2px 4px 2px 0;
}

/* Difficulty badge colors */
.difficulty-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
}

.difficulty-easy {
    background: #d4edda;
    color: #155724;
}

.difficulty-moderate {
    background: #d1ecf1;
    color: #0c5460;
}

.difficulty-intermediate {
    background: #fff3cd;
    color: #856404;
}

.difficulty-challenging {
    background: #f8d7da;
    color: #721c24;
}

.difficulty-advanced {
    background: #f5c6cb;
    color: #721c24;
}

/* Social share buttons */
.share-buttons {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e3e8ee;
}

.share-buttons-title {
    font-size: 13px;
    font-weight: 600;
    color: #637381;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 8px;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #fff;
    text-decoration: none;
}

.share-btn-twitter {
    background: #1da1f2;
}

.share-btn-facebook {
    background: #1877f2;
}

.share-btn-linkedin {
    background: #0077b5;
}

.share-btn-email {
    background: #637381;
}

/* Content sections */
.content-section {
    margin-bottom: 48px;
    background: #fff;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.content-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #212b35;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e3e8ee;
}

.content-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #212b35;
    margin-top: 24px;
    margin-bottom: 12px;
}

.content-section p,
.content-section li {
    font-size: 16px;
    line-height: 1.7;
    color: #454f5b;
    margin-bottom: 12px;
}

.content-section ul,
.content-section ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.content-section ul li,
.content-section ol li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.content-section strong {
    font-weight: 600;
    color: #212b35;
}

.content-section em {
    font-style: italic;
}

.content-section code {
    background: #f0f2f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e01e5a;
}

.content-section pre {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.content-section pre code {
    background: none;
    padding: 0;
    color: #212b35;
}

.content-section a {
    color: #5c6ac4;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.2s;
}

.content-section a:hover {
    border-bottom-color: #5c6ac4;
}

.content-section blockquote {
    border-left: 4px solid #5c6ac4;
    padding-left: 16px;
    margin: 20px 0;
    color: #637381;
    font-style: italic;
}

/* Link in metadata */
.metadata-link {
    color: #5c6ac4;
    text-decoration: none;
    font-weight: 500;
}

.metadata-link:hover {
    color: #3c4dbf;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .module-sidebar {
        margin-bottom: 32px;
    }

    .metadata-item {
        padding: 12px 16px;
    }
}
