/* --- Subject Page Specific Styles --- */

/* Subject Section Container */
.subject-section {
    margin-bottom: 3rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.subject-section h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--bg-subtle);
}

/* Course Card */
.course-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

.course-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.course-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-card h4::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.25rem;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Material List */
.material-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.material-list li {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: 0.2s;
}

.material-list li:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.material-list li i {
    font-size: 1.25rem;
    color: var(--muted-text);
    min-width: 24px;
    text-align: center;
}

/* Icon Colors */
.material-list li i.fa-file-pdf {
    color: #ef4444;
}

.material-list li i.fa-youtube,
.material-list li i.fa-video {
    color: #ef4444;
}

.material-list li i.fa-external-link-alt,
.material-list li i.fa-globe {
    color: #2563eb;
}

.material-list li i.fa-image {
    color: #10b981;
}

.material-list li i.fa-file-alt,
.material-list li i.fa-sticky-note {
    color: #f59e0b;
}

.material-list li a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.material-list li p.material-info-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* YouTube Thumbnail Customization */
.youtube-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: black;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: 0.3s;
}

.youtube-thumbnail:hover img {
    opacity: 0.6;
}

.youtube-thumbnail .play-icon {
    position: absolute;
    font-size: 3rem;
    color: white;
    z-index: 2;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Special Layout for Video Items */
.material-list li:has(.youtube-thumbnail) {
    grid-column: span 1;
    /* Keep standard size or span all */
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    overflow: hidden;
    border: none;
    background: transparent;
}

.material-list li:has(.youtube-thumbnail):hover {
    background: transparent;
    border-color: transparent;
}

/* Info Box */
.role-info-box {
    background: #e0f2fe;
    /* Light blue bg */
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.role-info-box i {
    font-size: 1.5rem;
}

.loading-text,
.info-text,
.error-text {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.error-text {
    color: #ef4444;
}