.categories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: stretch;
}

.card-container {
    max-width: 24rem;
    background-color: #F9F9F9;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin: 1rem;
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 2rem;
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6a2032;
    margin-bottom: 0.75rem;
}

.card-description {
    color: #4a5568;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-button {
    width: 100%;
    background-color: #6a2032;
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin-top: auto;
}

.card-button:hover {
    background-color: #4a1525;
}

/* Upcoming Courses card design */
.upcoming-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 300px;
    max-width: 24rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article.course-card.upcoming-card {
    justify-content: space-between;
}

.upcoming-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.upcoming-card .card-header {
    background-color: #5f1a30;
    color: #ffffff;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upcoming-card .date-label {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.95;
}

.upcoming-card .card-body {
    padding: 24px 24px 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: #1d1d1f;
}

.upcoming-card .title-row {
    display: flex;
    justify-content: center;
    align-items: center;
}

.upcoming-card .card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    max-width: 100%;
    color: #000000;
}

.upcoming-card .menu-icon {
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    fill: #000000;
    width: 24px;
    height: 24px;
}

.upcoming-card .menu-icon:hover {
    opacity: 1;
    fill: #5f1a30;
}

.upcoming-card .card-description {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
    color: #000000;
    margin-bottom: 8px;
}

.upcoming-card .card-footer {
    padding: 0 24px 24px 24px;
}

.upcoming-card .btn-outline {
    background-color: #5f1a30;
    color: #ffffff;
    border: 1px solid #5f1a30;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.upcoming-card .btn-outline:hover {
    background-color: #4a1426;
    border-color: #4a1426;
}

.custom-pagination {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination-btn {
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s, color 0.3s;
}

.prev-btn, .next-btn {
    background-color: #6a2032;
    color: #ffffff;
}

.prev-btn:hover, .next-btn:hover {
    background-color: #4a1525;
}

.page-btn {
    background-color: #f3f4f6;
    color: #6a2032;
    border: 1px solid #6a2032;
}

.page-btn:hover {
    background-color: #e2e8f0;
}

.page-btn.active {
    background-color: #6a2032;
    color: #ffffff;
}
