/* Hero Section for Certificates */
.certificate-hero {
    height: 35vh;
    min-height: 250px;
}

.certificate-hero img {
    object-position: center 30%;
}

/* Main Container Override */
.main-container {
    display: block; /* Override grid from global styles */
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

/* Certificate Grid System */
.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Certificate Card Styling */
.cert-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.cert-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

/* Image Wrapper for Aspect Ratio */
.cert-img-wrapper {
    width: 100%;
    height: 220px; /* Fixed height for uniformity */
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.cert-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensures image isn't cropped */
    transition: transform 0.3s ease;
}

.cert-card:hover img {
    transform: scale(1.05);
}

/* Card Info Section */
.cert-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cert-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 10px;
    line-height: 1.4;
}

.cert-info span {
    font-size: 0.9rem;
    color: #d32f2f; /* Accent color */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto; /* Pushes it to the bottom */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .certificate-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .cert-info h3 {
        font-size: 1rem;
    }
}