.med-spec-grid-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
}

.med-spec-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 180px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #f7f9fc;
}

.med-spec-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.med-spec-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.med-spec-card:hover .med-spec-bg {
    transform: scale(1.08);
}

.med-spec-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

.med-spec-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.med-spec-title {
    color: #ffffff;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    padding: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
