/* Programs Section */
.programs-section {
    padding: 6rem 0;
    min-height: calc(100vh - 80px);
    background-color: var(--bg-light);
}

/* Header and Filter Styles */
.programs-header {
    margin-bottom: 2rem;
}

.programs-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.filter-form {
    background: var(--mbdi-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--mbdi-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    outline: none;
}

/* Programs Grid */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Program Card */
.program-card {
    background: var(--mbdi-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.program-image {
    height: 200px;
    overflow: hidden;
}

.program-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.program-card:hover .program-image img {
    transform: scale(1.05);
}

.program-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.program-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.program-category {
    background: var(--mbdi-blue-light);
    color: var(--mbdi-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.program-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.program-status.upcoming {
    background: #e1f5fe;
    color: #0288d1;
}

.program-status.ongoing {
    background: #e8f5e9;
    color: #2e7d32;
}

.program-status.completed {
    background: #ede7f6;
    color: #512da8;
}

.program-content h3 {
    font-size: 1.25rem;
    margin: 0.5rem 0;
    color: var(--text-dark);
    line-height: 1.4;
}

.program-details {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.program-details span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.program-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.program-action {
    margin-top: auto;
    text-align: center;
    padding-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    gap: 0.5rem;
    text-decoration: none !important;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--mbdi-blue);
    color: #ffffff !important;
    border: 2px solid var(--mbdi-blue);
}

.btn-primary:hover, 
.btn-primary:focus {
    background-color: #004d99; /* Darker blue */
    border-color: #004d99;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 77, 153, 0.2);
}

.btn-secondary {
    background-color: #e9ecef;
    color: #495057 !important;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #dde2e6;
    border-color: #dde2e6;
    color: #343a40 !important;
}

.program-action .btn {
    width: auto;
    min-width: 160px;
    font-weight: 600;
}

/* No Results State */
.no-programs {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--mbdi-white);
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.no-programs i {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.no-programs p {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .programs-section {
        padding: 4rem 1rem;
    }

    .programs-header h1 {
        font-size: 2rem;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .programs-grid {
        grid-template-columns: 1fr;
    }

    .program-image {
        height: 180px;
    }
}

/* Filter Button Group */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 576px) {
    .filter-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

.program-action .btn {
    width: auto;
    min-width: 160px;
    font-weight: 600;
}

/* Ensure text contrast */
.program-card a {
    text-decoration: none;
    color: inherit;
}

.program-card a.btn-primary {
    color: #ffffff !important;
}

.program-card a.btn-primary:hover,
.program-card a.btn-primary:focus {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Add focus states for accessibility */
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);
} 