/* --- Professional Library & Resource Styles --- */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    /* This adds space on the top/bottom and centers it horizontally */
    padding: 0 2rem;
    /* This ensures there is always space on the sides */
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.cta-button {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

/* --- Search and Filter Bar --- */
.filter-bar {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-bar select,
.filter-bar input {
    padding: 12px;
    border: 1px solid #dce1e8;
    border-radius: 8px;
    font-size: 1rem;
}

.filter-bar input {
    flex-grow: 1;
}

.filter-bar button {
    padding: 12px 25px;
    border: none;
    background-color: #5a67d8;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* --- Resource Grid --- */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.resource-thumbnail {
    height: 180px;
    background-color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.resource-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.resource-category {
    font-size: 0.85rem;
    font-weight: 600;
    color: #5a67d8;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.resource-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: #333;
}

.resource-content p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

.resource-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    text-align: right;
}

.resource-footer a {
    text-decoration: none;
    font-weight: 600;
    margin-left: 1rem;
}

.edit-link {
    color: #5a67d8;
}

.delete-link {
    color: #dc3545;
}