/* RDCH Departments Dropdown and Results Styling */

.rdch-departments-page {
    padding: 20px 0;
}

.rdch-departments-header {
    margin-bottom: 30px;
    text-align: center;
}

.rdch-departments-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.rdch-departments-header p {
    font-size: 16px;
    color: #666;
}

.rdch-department-dropdown-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.rdch-year-select,
.rdch-subject-select {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.rdch-year-select:focus,
.rdch-subject-select:focus {
    border-color: #0073aa;
    outline: none;
}

.rdch-subject-select:disabled {
    background-color: #eee;
    cursor: not-allowed;
    opacity: 0.7;
}

.rdch-department-filter-btn {
    padding: 12px 25px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background-color: #0073aa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.rdch-department-filter-btn:hover {
    background-color: #005a87;
}

.rdch-department-results {
    min-height: 100px;
}

.rdch-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.rdch-loading:after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #ccc;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: rdch-spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes rdch-spin {
    to {
        transform: rotate(360deg);
    }
}

.rdch-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.rdch-post-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.rdch-post-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rdch-post-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.rdch-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rdch-post-item:hover .rdch-post-thumbnail img {
    transform: scale(1.05);
}

.rdch-post-content {
    padding: 20px;
}

.rdch-post-title {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.rdch-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.rdch-post-title a:hover {
    color: #0073aa;
}

.rdch-post-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.rdch-post-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.rdch-read-more {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #0073aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.rdch-read-more:hover {
    color: #005a87;
}

.rdch-no-posts {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
    background: #f9f9f9;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .rdch-department-dropdown-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .rdch-year-select,
    .rdch-subject-select,
    .rdch-department-filter-btn {
        width: 100%;
        min-width: auto;
    }

    .rdch-posts-grid {
        grid-template-columns: 1fr;
    }
}
